Version Description
- Fix - DCC orders randomly failing #503
- Fix - Multi-currency broke #481
- Fix - Address information from PayPal shortcut flow not loaded #451
- Fix - WooCommerce as mu-plugin is not detected as active #461
- Fix - Check if PayPal Payments is an available gateway before displaying it on Product/Cart pages #447
- Enhancement - Improve onboarding flow, allow no card processing #443 #508 #510
- Enhancement - Add Germany to supported ACDC countries #459
- Enhancement - Add filters to allow ACDC for countries #437
- Enhancement - Update 3D Secure #464
- Enhancement - Extend event, error logging & order notes #456
- Enhancement - Display API response errors in checkout page with user-friendly error message #457
- Enhancement - Pass address details to credit card fields #479
- Enhancement - Improve onboarding notice #465
- Enhancement - Add transaction ID to WC order and order note when refund is received #473
- Enhancement - Asset caching may cause bugs on upgrades #501
- Enhancement - Allow partial capture #483
- Enhancement - PayPal Payments doesn't set transaction fee metadata #467
- Enhancement - Show PayPal fee information in order #489
Download this release
Release Info
Developer | woothemes |
Plugin | WooCommerce PayPal Payments |
Version | 1.7.0 |
Comparing to | |
See all releases |
Code changes from version 1.6.5 to 1.7.0
- changelog.txt +22 -2
- modules/ppcp-admin-notices/src/Repository/Repository.php +3 -0
- modules/ppcp-api-client/services.php +225 -161
- modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php +16 -10
- modules/ppcp-api-client/src/Endpoint/PartnerReferrals.php +5 -16
- modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php +14 -3
- modules/ppcp-api-client/src/Entity/Address.php +9 -7
- modules/ppcp-api-client/src/Entity/Capture.php +37 -15
- modules/ppcp-api-client/src/Entity/ExchangeRate.php +90 -0
- modules/ppcp-api-client/src/Entity/PaymentToken.php +3 -0
- modules/ppcp-api-client/src/Entity/PlatformFee.php +74 -0
- modules/ppcp-api-client/src/Entity/SellerReceivableBreakdown.php +211 -0
- modules/ppcp-api-client/src/Exception/PayPalApiException.php +9 -0
- modules/ppcp-api-client/src/Factory/AmountFactory.php +15 -15
- modules/ppcp-api-client/src/Factory/CaptureFactory.php +21 -5
- modules/ppcp-api-client/src/Factory/ExchangeRateFactory.php +41 -0
- modules/ppcp-api-client/src/Factory/MoneyFactory.php +39 -0
- modules/ppcp-api-client/src/Factory/PayerFactory.php +66 -8
- modules/ppcp-api-client/src/Factory/PlatformFeeFactory.php +64 -0
- modules/ppcp-api-client/src/Factory/PurchaseUnitFactory.php +7 -9
- modules/ppcp-api-client/src/Factory/SellerReceivableBreakdownFactory.php +97 -0
- modules/ppcp-api-client/src/Repository/ApplicationContextRepository.php +4 -1
- modules/ppcp-api-client/src/Repository/CustomerRepository.php +2 -0
- modules/ppcp-api-client/src/Repository/PartnerReferralsData.php +30 -25
- modules/ppcp-button/assets/js/button.js +1 -1
- modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js +6 -1
- modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js +5 -5
- modules/ppcp-button/services.php +2 -1
- modules/ppcp-button/src/Assets/SmartButton.php +42 -8
- modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php +11 -0
- modules/ppcp-compat/src/PPEC/PPECHelper.php +3 -0
- modules/ppcp-onboarding/assets/css/onboarding.css +135 -59
- modules/ppcp-onboarding/assets/images/cards-screen-acdc.png +0 -0
- modules/ppcp-onboarding/assets/images/cards-screen-basic.png +0 -0
- modules/ppcp-onboarding/assets/js/onboarding.js +229 -181
- modules/ppcp-onboarding/assets/js/settings.js +3 -3
- modules/ppcp-onboarding/services.php +15 -6
- modules/ppcp-onboarding/src/Assets/OnboardingAssets.php +47 -9
- modules/ppcp-onboarding/src/Endpoint/LoginSellerEndpoint.php +21 -0
- modules/ppcp-onboarding/src/OnboardingModule.php +6 -7
- modules/ppcp-onboarding/src/OnboardingRESTController.php +3 -32
- modules/ppcp-onboarding/src/Render/OnboardingOptionsRenderer.php +224 -0
- modules/ppcp-onboarding/src/Render/OnboardingRenderer.php +39 -14
- modules/ppcp-onboarding/src/State.php +40 -44
- modules/ppcp-subscription/src/RenewalHandler.php +3 -0
- modules/ppcp-vaulting/services.php +2 -1
- modules/ppcp-vaulting/src/Assets/MyAccountPaymentsAssets.php +12 -2
- modules/ppcp-wc-gateway/assets/images/amex.svg +15 -6
- modules/ppcp-wc-gateway/assets/images/ideal-dark.svg +22 -0
- modules/ppcp-wc-gateway/assets/images/mastercard-dark.svg +17 -0
- modules/ppcp-wc-gateway/assets/images/paylater.svg +1 -0
- modules/ppcp-wc-gateway/assets/images/paypal-button.svg +1 -0
- modules/ppcp-wc-gateway/assets/images/paypal.png +0 -0
- modules/ppcp-wc-gateway/assets/images/sofort.svg +12 -8
- modules/ppcp-wc-gateway/assets/images/venmo.svg +1 -0
- modules/ppcp-wc-gateway/assets/images/visa-dark.svg +14 -0
- modules/ppcp-wc-gateway/services.php +334 -259
- modules/ppcp-wc-gateway/src/Admin/FeesRenderer.php +86 -0
- modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php +8 -10
- modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php +1 -0
- modules/ppcp-wc-gateway/src/Gateway/ProcessPaymentTrait.php +17 -3
- modules/ppcp-wc-gateway/src/Notice/ConnectAdminNotice.php +2 -2
- modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php +19 -11
- modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php +1 -0
- modules/ppcp-wc-gateway/src/Processor/PaymentsStatusHandlingTrait.php +4 -0
- modules/ppcp-wc-gateway/src/Processor/TransactionIdHandlingTrait.php +9 -0
- modules/ppcp-wc-gateway/src/Settings/SettingsListener.php +7 -1
- modules/ppcp-wc-gateway/src/Settings/SettingsRenderer.php +26 -5
- modules/ppcp-wc-gateway/src/WCGatewayModule.php +53 -3
- modules/ppcp-webhooks/extensions.php +0 -3
- modules/ppcp-webhooks/services.php +2 -1
- modules/ppcp-webhooks/src/Handler/PaymentCaptureRefunded.php +7 -1
- modules/ppcp-webhooks/src/Status/Assets/WebhooksStatusPageAssets.php +13 -3
- psalm-baseline.xml +34 -26
- psalm.xml.dist +2 -2
- readme.txt +23 -3
- src/FilePathPluginFactory.php +144 -0
- src/Plugin.php +180 -0
- src/PluginModule.php +4 -1
- src/extensions.php +12 -0
- src/services.php +27 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +4 -0
- vendor/composer/autoload_files.php +1 -0
- vendor/composer/autoload_psr4.php +6 -0
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +45 -3
- vendor/composer/installed.json +330 -24
- vendor/dhii/human-readable-interface/.editorconfig +16 -0
- vendor/dhii/human-readable-interface/.env +8 -0
- vendor/dhii/human-readable-interface/.env.example +8 -0
- vendor/dhii/human-readable-interface/CHANGELOG.md +21 -0
- vendor/dhii/human-readable-interface/LICENSE +19 -0
- vendor/dhii/human-readable-interface/README.md +30 -0
- vendor/dhii/human-readable-interface/composer.json +46 -0
- vendor/dhii/human-readable-interface/docker-compose.yml +31 -0
- vendor/dhii/human-readable-interface/docker/Dockerfile +39 -0
- vendor/dhii/human-readable-interface/phpcs.xml.dist +52 -0
- vendor/dhii/human-readable-interface/phpunit.xml.dist +20 -0
- vendor/dhii/human-readable-interface/psalm.xml.dist +152 -0
- vendor/dhii/human-readable-interface/src/CaptionAwareInterface.php +23 -0
- vendor/dhii/human-readable-interface/src/DescriptionAwareInterface.php +23 -0
- vendor/dhii/human-readable-interface/src/LabelAwareInterface.php +22 -0
- vendor/dhii/human-readable-interface/src/MessageAwareInterface.php +23 -0
- vendor/dhii/human-readable-interface/src/TitleAwareInterface.php +22 -0
- vendor/dhii/human-readable-interface/tests/bootstrap.php +5 -0
- vendor/dhii/human-readable-interface/tests/functional/CaptionAwareInterfaceTest.php +36 -0
- vendor/dhii/human-readable-interface/tests/functional/DescriptionAwareInterfaceTest.php +36 -0
- vendor/dhii/human-readable-interface/tests/functional/LabelAwareInterfaceTest.php +36 -0
- vendor/dhii/human-readable-interface/tests/functional/MessageAwareInterfaceTest.php +36 -0
- vendor/dhii/human-readable-interface/tests/functional/TitleAwareInterfaceTest.php +38 -0
- vendor/dhii/package-interface/src/PackageInterface.php +42 -0
- vendor/dhii/package-interface/src/Version/Constraint/Exception/ConstraintFailedExceptionInterface.php +14 -0
- vendor/dhii/package-interface/src/Version/Constraint/VersionConstraintInterface.php +26 -0
- vendor/dhii/package-interface/src/Version/StringVersionFactoryInterface.php +26 -0
- vendor/dhii/package-interface/src/Version/VersionInterface.php +62 -0
- vendor/dhii/validation-interface/.env.example +6 -0
- vendor/dhii/validation-interface/CHANGELOG.md +64 -0
- vendor/dhii/validation-interface/LICENSE +21 -0
- vendor/dhii/validation-interface/README.md +34 -0
- vendor/dhii/validation-interface/composer.json +42 -0
- vendor/dhii/validation-interface/phpcs.xml.dist +50 -0
- vendor/dhii/validation-interface/psalm.xml.dist +157 -0
- vendor/dhii/validation-interface/src/Exception/ValidationFailedExceptionInterface.php +36 -0
- vendor/dhii/validation-interface/src/ValidatorInterface.php +24 -0
- vendor/dhii/validation-interface/tests/bootstrap.php +9 -0
- vendor/dhii/validation-interface/tests/unit/Exception/ValidationFailedExceptionInterfaceTest.php +39 -0
- vendor/dhii/validation-interface/tests/unit/ValidatorInterfaceTest.php +37 -0
- vendor/dhii/versions/.editorconfig +16 -0
- vendor/dhii/versions/src/StringVersionFactory.php +145 -0
- vendor/dhii/versions/src/Version.php +240 -0
- vendor/symfony/polyfill-php80/LICENSE +19 -0
- vendor/symfony/polyfill-php80/Php80.php +105 -0
- vendor/symfony/polyfill-php80/README.md +24 -0
- vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +22 -0
- vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php +11 -0
- vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php +7 -0
- vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php +7 -0
- vendor/symfony/polyfill-php80/bootstrap.php +42 -0
- vendor/symfony/polyfill-php80/composer.json +40 -0
- vendor/wp-oop/wordpress-interface/.editorconfig +16 -0
- vendor/wp-oop/wordpress-interface/CHANGELOG.md +14 -0
- vendor/wp-oop/wordpress-interface/README.md +24 -0
- vendor/wp-oop/wordpress-interface/composer.json +37 -0
- vendor/wp-oop/wordpress-interface/phpcs.xml.dist +52 -0
- vendor/wp-oop/wordpress-interface/phpunit.xml.dist +20 -0
- vendor/wp-oop/wordpress-interface/psalm.xml.dist +152 -0
- vendor/wp-oop/wordpress-interface/src/Gutenberg/BlockInterface.php +39 -0
- vendor/wp-oop/wordpress-interface/src/Gutenberg/BlockParserInterface.php +17 -0
- vendor/wp-oop/wordpress-interface/src/Plugin/FilePathPluginFactoryInterface.php +24 -0
- vendor/wp-oop/wordpress-interface/src/Plugin/PluginInterface.php +57 -0
- woocommerce-paypal-payments.php +25 -10
changelog.txt
CHANGED
@@ -1,7 +1,27 @@
|
|
1 |
*** Changelog ***
|
2 |
|
3 |
-
= 1.
|
4 |
-
* Fix -
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* Fix - Transaction ID missing for renewal order #424
|
6 |
* Fix - Save your credit card checkbox should be removed in pay for order for subscriptions #420
|
7 |
* Fix - Null currency error when the Aelia currency switcher plugin is active #426
|
1 |
*** Changelog ***
|
2 |
|
3 |
+
= 1.7.0 - 2022-02-28 =
|
4 |
+
* Fix - DCC orders randomly failing #503
|
5 |
+
* Fix - Multi-currency broke #481
|
6 |
+
* Fix - Address information from PayPal shortcut flow not loaded #451
|
7 |
+
* Fix - WooCommerce as mu-plugin is not detected as active #461
|
8 |
+
* Fix - Check if PayPal Payments is an available gateway before displaying it on Product/Cart pages #447
|
9 |
+
* Enhancement - Improve onboarding flow, allow no card processing #443 #508 #510
|
10 |
+
* Enhancement - Add Germany to supported ACDC countries #459
|
11 |
+
* Enhancement - Add filters to allow ACDC for countries #437
|
12 |
+
* Enhancement - Update 3D Secure #464
|
13 |
+
* Enhancement - Extend event, error logging & order notes #456
|
14 |
+
* Enhancement - Display API response errors in checkout page with user-friendly error message #457
|
15 |
+
* Enhancement - Pass address details to credit card fields #479
|
16 |
+
* Enhancement - Improve onboarding notice #465
|
17 |
+
* Enhancement - Add transaction ID to WC order and order note when refund is received #473
|
18 |
+
* Enhancement - Asset caching may cause bugs on upgrades #501
|
19 |
+
* Enhancement - Allow partial capture #483
|
20 |
+
* Enhancement - PayPal Payments doesn't set transaction fee metadata #467
|
21 |
+
* Enhancement - Show PayPal fee information in order #489
|
22 |
+
|
23 |
+
= 1.6.5 - 2022-01-31 =
|
24 |
+
* Fix - Allow guest users to purchase subscription products from checkout page #422
|
25 |
* Fix - Transaction ID missing for renewal order #424
|
26 |
* Fix - Save your credit card checkbox should be removed in pay for order for subscriptions #420
|
27 |
* Fix - Null currency error when the Aelia currency switcher plugin is active #426
|
modules/ppcp-admin-notices/src/Repository/Repository.php
CHANGED
@@ -25,6 +25,9 @@ class Repository implements RepositoryInterface {
|
|
25 |
*/
|
26 |
public function current_message(): array {
|
27 |
return array_filter(
|
|
|
|
|
|
|
28 |
(array) apply_filters(
|
29 |
self::NOTICES_FILTER,
|
30 |
array()
|
25 |
*/
|
26 |
public function current_message(): array {
|
27 |
return array_filter(
|
28 |
+
/**
|
29 |
+
* Returns the list of admin messages.
|
30 |
+
*/
|
31 |
(array) apply_filters(
|
32 |
self::NOTICES_FILTER,
|
33 |
array()
|
modules/ppcp-api-client/services.php
CHANGED
@@ -26,7 +26,9 @@ use WooCommerce\PayPalCommerce\ApiClient\Factory\AmountFactory;
|
|
26 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\ApplicationContextFactory;
|
27 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\AuthorizationFactory;
|
28 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\CaptureFactory;
|
|
|
29 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\ItemFactory;
|
|
|
30 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\OrderFactory;
|
31 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PatchCollectionFactory;
|
32 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PayeeFactory;
|
@@ -34,7 +36,9 @@ use WooCommerce\PayPalCommerce\ApiClient\Factory\PayerFactory;
|
|
34 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PaymentsFactory;
|
35 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PaymentSourceFactory;
|
36 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PaymentTokenFactory;
|
|
|
37 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PurchaseUnitFactory;
|
|
|
38 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\SellerStatusFactory;
|
39 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\ShippingFactory;
|
40 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\WebhookEventFactory;
|
@@ -127,7 +131,6 @@ return array(
|
|
127 |
return new PartnerReferrals(
|
128 |
$container->get( 'api.host' ),
|
129 |
$container->get( 'api.bearer' ),
|
130 |
-
$container->get( 'api.repository.partner-referrals-data' ),
|
131 |
$container->get( 'woocommerce.logger.woocommerce' )
|
132 |
);
|
133 |
},
|
@@ -209,9 +212,8 @@ return array(
|
|
209 |
},
|
210 |
'api.repository.partner-referrals-data' => static function ( ContainerInterface $container ) : PartnerReferralsData {
|
211 |
|
212 |
-
$merchant_email = $container->get( 'api.merchant_email' );
|
213 |
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
214 |
-
return new PartnerReferralsData( $
|
215 |
},
|
216 |
'api.repository.cart' => static function ( ContainerInterface $container ): CartRepository {
|
217 |
$factory = $container->get( 'api.factory.purchase-unit' );
|
@@ -241,7 +243,10 @@ return array(
|
|
241 |
'api.factory.capture' => static function ( ContainerInterface $container ): CaptureFactory {
|
242 |
|
243 |
$amount_factory = $container->get( 'api.factory.amount' );
|
244 |
-
return new CaptureFactory(
|
|
|
|
|
|
|
245 |
},
|
246 |
'api.factory.purchase-unit' => static function ( ContainerInterface $container ): PurchaseUnitFactory {
|
247 |
|
@@ -282,9 +287,13 @@ return array(
|
|
282 |
$item_factory = $container->get( 'api.factory.item' );
|
283 |
return new AmountFactory(
|
284 |
$item_factory,
|
|
|
285 |
$container->get( 'api.shop.currency' )
|
286 |
);
|
287 |
},
|
|
|
|
|
|
|
288 |
'api.factory.payer' => static function ( ContainerInterface $container ): PayerFactory {
|
289 |
$address_factory = $container->get( 'api.factory.address' );
|
290 |
return new PayerFactory( $address_factory );
|
@@ -317,6 +326,22 @@ return array(
|
|
317 |
'api.factory.authorization' => static function ( ContainerInterface $container ): AuthorizationFactory {
|
318 |
return new AuthorizationFactory();
|
319 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
'api.helpers.dccapplies' => static function ( ContainerInterface $container ) : DccApplies {
|
321 |
return new DccApplies(
|
322 |
$container->get( 'api.dcc-supported-country-currency-matrix' ),
|
@@ -327,12 +352,16 @@ return array(
|
|
327 |
},
|
328 |
|
329 |
'api.shop.currency' => static function ( ContainerInterface $container ) : string {
|
330 |
-
|
331 |
-
|
|
|
|
|
|
|
332 |
$currency = get_option( 'woocommerce_currency' );
|
333 |
if ( ! $currency ) {
|
334 |
return 'NO_CURRENCY'; // Unlikely to happen.
|
335 |
}
|
|
|
336 |
return $currency;
|
337 |
},
|
338 |
'api.shop.country' => static function ( ContainerInterface $container ) : string {
|
@@ -393,123 +422,147 @@ return array(
|
|
393 |
* The matrix which countries and currency combinations can be used for DCC.
|
394 |
*/
|
395 |
'api.dcc-supported-country-currency-matrix' => static function ( ContainerInterface $container ) : array {
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
'
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
'
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
'
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
'
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
'
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
'
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
'
|
511 |
-
|
512 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
);
|
514 |
},
|
515 |
|
@@ -517,44 +570,55 @@ return array(
|
|
517 |
* Which countries support which credit cards. Empty credit card arrays mean no restriction on currency.
|
518 |
*/
|
519 |
'api.dcc-supported-country-card-matrix' => static function ( ContainerInterface $container ) : array {
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
'
|
557 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
);
|
559 |
},
|
560 |
|
26 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\ApplicationContextFactory;
|
27 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\AuthorizationFactory;
|
28 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\CaptureFactory;
|
29 |
+
use WooCommerce\PayPalCommerce\ApiClient\Factory\ExchangeRateFactory;
|
30 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\ItemFactory;
|
31 |
+
use WooCommerce\PayPalCommerce\ApiClient\Factory\MoneyFactory;
|
32 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\OrderFactory;
|
33 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PatchCollectionFactory;
|
34 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PayeeFactory;
|
36 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PaymentsFactory;
|
37 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PaymentSourceFactory;
|
38 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PaymentTokenFactory;
|
39 |
+
use WooCommerce\PayPalCommerce\ApiClient\Factory\PlatformFeeFactory;
|
40 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PurchaseUnitFactory;
|
41 |
+
use WooCommerce\PayPalCommerce\ApiClient\Factory\SellerReceivableBreakdownFactory;
|
42 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\SellerStatusFactory;
|
43 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\ShippingFactory;
|
44 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\WebhookEventFactory;
|
131 |
return new PartnerReferrals(
|
132 |
$container->get( 'api.host' ),
|
133 |
$container->get( 'api.bearer' ),
|
|
|
134 |
$container->get( 'woocommerce.logger.woocommerce' )
|
135 |
);
|
136 |
},
|
212 |
},
|
213 |
'api.repository.partner-referrals-data' => static function ( ContainerInterface $container ) : PartnerReferralsData {
|
214 |
|
|
|
215 |
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
216 |
+
return new PartnerReferralsData( $dcc_applies );
|
217 |
},
|
218 |
'api.repository.cart' => static function ( ContainerInterface $container ): CartRepository {
|
219 |
$factory = $container->get( 'api.factory.purchase-unit' );
|
243 |
'api.factory.capture' => static function ( ContainerInterface $container ): CaptureFactory {
|
244 |
|
245 |
$amount_factory = $container->get( 'api.factory.amount' );
|
246 |
+
return new CaptureFactory(
|
247 |
+
$amount_factory,
|
248 |
+
$container->get( 'api.factory.seller-receivable-breakdown' )
|
249 |
+
);
|
250 |
},
|
251 |
'api.factory.purchase-unit' => static function ( ContainerInterface $container ): PurchaseUnitFactory {
|
252 |
|
287 |
$item_factory = $container->get( 'api.factory.item' );
|
288 |
return new AmountFactory(
|
289 |
$item_factory,
|
290 |
+
$container->get( 'api.factory.money' ),
|
291 |
$container->get( 'api.shop.currency' )
|
292 |
);
|
293 |
},
|
294 |
+
'api.factory.money' => static function ( ContainerInterface $container ): MoneyFactory {
|
295 |
+
return new MoneyFactory();
|
296 |
+
},
|
297 |
'api.factory.payer' => static function ( ContainerInterface $container ): PayerFactory {
|
298 |
$address_factory = $container->get( 'api.factory.address' );
|
299 |
return new PayerFactory( $address_factory );
|
326 |
'api.factory.authorization' => static function ( ContainerInterface $container ): AuthorizationFactory {
|
327 |
return new AuthorizationFactory();
|
328 |
},
|
329 |
+
'api.factory.exchange-rate' => static function ( ContainerInterface $container ): ExchangeRateFactory {
|
330 |
+
return new ExchangeRateFactory();
|
331 |
+
},
|
332 |
+
'api.factory.platform-fee' => static function ( ContainerInterface $container ): PlatformFeeFactory {
|
333 |
+
return new PlatformFeeFactory(
|
334 |
+
$container->get( 'api.factory.money' ),
|
335 |
+
$container->get( 'api.factory.payee' )
|
336 |
+
);
|
337 |
+
},
|
338 |
+
'api.factory.seller-receivable-breakdown' => static function ( ContainerInterface $container ): SellerReceivableBreakdownFactory {
|
339 |
+
return new SellerReceivableBreakdownFactory(
|
340 |
+
$container->get( 'api.factory.money' ),
|
341 |
+
$container->get( 'api.factory.exchange-rate' ),
|
342 |
+
$container->get( 'api.factory.platform-fee' )
|
343 |
+
);
|
344 |
+
},
|
345 |
'api.helpers.dccapplies' => static function ( ContainerInterface $container ) : DccApplies {
|
346 |
return new DccApplies(
|
347 |
$container->get( 'api.dcc-supported-country-currency-matrix' ),
|
352 |
},
|
353 |
|
354 |
'api.shop.currency' => static function ( ContainerInterface $container ) : string {
|
355 |
+
$currency = get_woocommerce_currency();
|
356 |
+
if ( $currency ) {
|
357 |
+
return $currency;
|
358 |
+
}
|
359 |
+
|
360 |
$currency = get_option( 'woocommerce_currency' );
|
361 |
if ( ! $currency ) {
|
362 |
return 'NO_CURRENCY'; // Unlikely to happen.
|
363 |
}
|
364 |
+
|
365 |
return $currency;
|
366 |
},
|
367 |
'api.shop.country' => static function ( ContainerInterface $container ) : string {
|
422 |
* The matrix which countries and currency combinations can be used for DCC.
|
423 |
*/
|
424 |
'api.dcc-supported-country-currency-matrix' => static function ( ContainerInterface $container ) : array {
|
425 |
+
/**
|
426 |
+
* Returns which countries and currency combinations can be used for DCC.
|
427 |
+
*/
|
428 |
+
return apply_filters(
|
429 |
+
'woocommerce_paypal_payments_supported_country_currency_matrix',
|
430 |
+
array(
|
431 |
+
'AU' => array(
|
432 |
+
'AUD',
|
433 |
+
'CAD',
|
434 |
+
'CHF',
|
435 |
+
'CZK',
|
436 |
+
'DKK',
|
437 |
+
'EUR',
|
438 |
+
'GBP',
|
439 |
+
'HKD',
|
440 |
+
'HUF',
|
441 |
+
'JPY',
|
442 |
+
'NOK',
|
443 |
+
'NZD',
|
444 |
+
'PLN',
|
445 |
+
'SEK',
|
446 |
+
'SGD',
|
447 |
+
'USD',
|
448 |
+
),
|
449 |
+
'DE' => array(
|
450 |
+
'AUD',
|
451 |
+
'CAD',
|
452 |
+
'CHF',
|
453 |
+
'CZK',
|
454 |
+
'DKK',
|
455 |
+
'EUR',
|
456 |
+
'GBP',
|
457 |
+
'HKD',
|
458 |
+
'HUF',
|
459 |
+
'JPY',
|
460 |
+
'NOK',
|
461 |
+
'NZD',
|
462 |
+
'PLN',
|
463 |
+
'SEK',
|
464 |
+
'SGD',
|
465 |
+
'USD',
|
466 |
+
),
|
467 |
+
'ES' => array(
|
468 |
+
'AUD',
|
469 |
+
'CAD',
|
470 |
+
'CHF',
|
471 |
+
'CZK',
|
472 |
+
'DKK',
|
473 |
+
'EUR',
|
474 |
+
'GBP',
|
475 |
+
'HKD',
|
476 |
+
'HUF',
|
477 |
+
'JPY',
|
478 |
+
'NOK',
|
479 |
+
'NZD',
|
480 |
+
'PLN',
|
481 |
+
'SEK',
|
482 |
+
'SGD',
|
483 |
+
'USD',
|
484 |
+
),
|
485 |
+
'FR' => array(
|
486 |
+
'AUD',
|
487 |
+
'CAD',
|
488 |
+
'CHF',
|
489 |
+
'CZK',
|
490 |
+
'DKK',
|
491 |
+
'EUR',
|
492 |
+
'GBP',
|
493 |
+
'HKD',
|
494 |
+
'HUF',
|
495 |
+
'JPY',
|
496 |
+
'NOK',
|
497 |
+
'NZD',
|
498 |
+
'PLN',
|
499 |
+
'SEK',
|
500 |
+
'SGD',
|
501 |
+
'USD',
|
502 |
+
),
|
503 |
+
'GB' => array(
|
504 |
+
'AUD',
|
505 |
+
'CAD',
|
506 |
+
'CHF',
|
507 |
+
'CZK',
|
508 |
+
'DKK',
|
509 |
+
'EUR',
|
510 |
+
'GBP',
|
511 |
+
'HKD',
|
512 |
+
'HUF',
|
513 |
+
'JPY',
|
514 |
+
'NOK',
|
515 |
+
'NZD',
|
516 |
+
'PLN',
|
517 |
+
'SEK',
|
518 |
+
'SGD',
|
519 |
+
'USD',
|
520 |
+
),
|
521 |
+
'IT' => array(
|
522 |
+
'AUD',
|
523 |
+
'CAD',
|
524 |
+
'CHF',
|
525 |
+
'CZK',
|
526 |
+
'DKK',
|
527 |
+
'EUR',
|
528 |
+
'GBP',
|
529 |
+
'HKD',
|
530 |
+
'HUF',
|
531 |
+
'JPY',
|
532 |
+
'NOK',
|
533 |
+
'NZD',
|
534 |
+
'PLN',
|
535 |
+
'SEK',
|
536 |
+
'SGD',
|
537 |
+
'USD',
|
538 |
+
),
|
539 |
+
'US' => array(
|
540 |
+
'AUD',
|
541 |
+
'CAD',
|
542 |
+
'EUR',
|
543 |
+
'GBP',
|
544 |
+
'JPY',
|
545 |
+
'USD',
|
546 |
+
),
|
547 |
+
'CA' => array(
|
548 |
+
'AUD',
|
549 |
+
'CAD',
|
550 |
+
'CHF',
|
551 |
+
'CZK',
|
552 |
+
'DKK',
|
553 |
+
'EUR',
|
554 |
+
'GBP',
|
555 |
+
'HKD',
|
556 |
+
'HUF',
|
557 |
+
'JPY',
|
558 |
+
'NOK',
|
559 |
+
'NZD',
|
560 |
+
'PLN',
|
561 |
+
'SEK',
|
562 |
+
'SGD',
|
563 |
+
'USD',
|
564 |
+
),
|
565 |
+
)
|
566 |
);
|
567 |
},
|
568 |
|
570 |
* Which countries support which credit cards. Empty credit card arrays mean no restriction on currency.
|
571 |
*/
|
572 |
'api.dcc-supported-country-card-matrix' => static function ( ContainerInterface $container ) : array {
|
573 |
+
/**
|
574 |
+
* Returns which countries support which credit cards. Empty credit card arrays mean no restriction on currency.
|
575 |
+
*/
|
576 |
+
return apply_filters(
|
577 |
+
'woocommerce_paypal_payments_supported_country_card_matrix',
|
578 |
+
array(
|
579 |
+
'AU' => array(
|
580 |
+
'mastercard' => array(),
|
581 |
+
'visa' => array(),
|
582 |
+
'amex' => array( 'AUD' ),
|
583 |
+
),
|
584 |
+
'DE' => array(
|
585 |
+
'mastercard' => array(),
|
586 |
+
'visa' => array(),
|
587 |
+
'amex' => array( 'EUR' ),
|
588 |
+
),
|
589 |
+
'ES' => array(
|
590 |
+
'mastercard' => array(),
|
591 |
+
'visa' => array(),
|
592 |
+
'amex' => array( 'EUR' ),
|
593 |
+
),
|
594 |
+
'FR' => array(
|
595 |
+
'mastercard' => array(),
|
596 |
+
'visa' => array(),
|
597 |
+
'amex' => array( 'EUR' ),
|
598 |
+
),
|
599 |
+
'GB' => array(
|
600 |
+
'mastercard' => array(),
|
601 |
+
'visa' => array(),
|
602 |
+
'amex' => array( 'GBP', 'USD' ),
|
603 |
+
),
|
604 |
+
'IT' => array(
|
605 |
+
'mastercard' => array(),
|
606 |
+
'visa' => array(),
|
607 |
+
'amex' => array( 'EUR' ),
|
608 |
+
),
|
609 |
+
'US' => array(
|
610 |
+
'mastercard' => array(),
|
611 |
+
'visa' => array(),
|
612 |
+
'amex' => array( 'USD' ),
|
613 |
+
'discover' => array( 'USD' ),
|
614 |
+
),
|
615 |
+
'CA' => array(
|
616 |
+
'mastercard' => array(),
|
617 |
+
'visa' => array(),
|
618 |
+
'amex' => array( 'CAD' ),
|
619 |
+
'jcb' => array( 'CAD' ),
|
620 |
+
),
|
621 |
+
)
|
622 |
);
|
623 |
},
|
624 |
|
modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php
CHANGED
@@ -198,14 +198,20 @@ class OrderEndpoint {
|
|
198 |
return $is_purchase_unit;
|
199 |
}
|
200 |
);
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
|
211 |
$bearer = $this->bearer->bearer();
|
@@ -218,7 +224,7 @@ class OrderEndpoint {
|
|
218 |
$items
|
219 |
),
|
220 |
'application_context' => $this->application_context_repository
|
221 |
-
->current_context( $
|
222 |
);
|
223 |
if ( $payer ) {
|
224 |
$data['payer'] = $payer->to_array();
|
@@ -591,7 +597,7 @@ class OrderEndpoint {
|
|
591 |
/**
|
592 |
* Checks if there is at least one item without shipping.
|
593 |
*
|
594 |
-
* @param
|
595 |
* @return bool Whether items contains shipping or not.
|
596 |
*/
|
597 |
private function has_items_without_shipping( array $items ): bool {
|
198 |
return $is_purchase_unit;
|
199 |
}
|
200 |
);
|
201 |
+
|
202 |
+
$shipping_preference = ApplicationContext::SHIPPING_PREFERENCE_NO_SHIPPING;
|
203 |
+
if ( $contains_physical_goods ) {
|
204 |
+
if ( $shipping_address_is_fixed ) {
|
205 |
+
// Checkout + no address given? Probably something weird happened, like no form validation?
|
206 |
+
// Also note that $items currently always seems to be an array with one item.
|
207 |
+
if ( $this->has_items_without_shipping( $items ) ) {
|
208 |
+
$shipping_preference = ApplicationContext::SHIPPING_PREFERENCE_NO_SHIPPING;
|
209 |
+
} else {
|
210 |
+
$shipping_preference = ApplicationContext::SHIPPING_PREFERENCE_SET_PROVIDED_ADDRESS;
|
211 |
+
}
|
212 |
+
} else {
|
213 |
+
$shipping_preference = ApplicationContext::SHIPPING_PREFERENCE_GET_FROM_FILE;
|
214 |
+
}
|
215 |
}
|
216 |
|
217 |
$bearer = $this->bearer->bearer();
|
224 |
$items
|
225 |
),
|
226 |
'application_context' => $this->application_context_repository
|
227 |
+
->current_context( $shipping_preference )->to_array(),
|
228 |
);
|
229 |
if ( $payer ) {
|
230 |
$data['payer'] = $payer->to_array();
|
597 |
/**
|
598 |
* Checks if there is at least one item without shipping.
|
599 |
*
|
600 |
+
* @param PurchaseUnit[] $items The items.
|
601 |
* @return bool Whether items contains shipping or not.
|
602 |
*/
|
603 |
private function has_items_without_shipping( array $items ): bool {
|
modules/ppcp-api-client/src/Endpoint/PartnerReferrals.php
CHANGED
@@ -12,7 +12,6 @@ namespace WooCommerce\PayPalCommerce\ApiClient\Endpoint;
|
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
15 |
-
use WooCommerce\PayPalCommerce\ApiClient\Repository\PartnerReferralsData;
|
16 |
use Psr\Log\LoggerInterface;
|
17 |
|
18 |
/**
|
@@ -36,13 +35,6 @@ class PartnerReferrals {
|
|
36 |
*/
|
37 |
private $bearer;
|
38 |
|
39 |
-
/**
|
40 |
-
* The PartnerReferralsData.
|
41 |
-
*
|
42 |
-
* @var PartnerReferralsData
|
43 |
-
*/
|
44 |
-
private $data;
|
45 |
-
|
46 |
/**
|
47 |
* The logger.
|
48 |
*
|
@@ -53,32 +45,29 @@ class PartnerReferrals {
|
|
53 |
/**
|
54 |
* PartnerReferrals constructor.
|
55 |
*
|
56 |
-
* @param string
|
57 |
-
* @param Bearer
|
58 |
-
* @param
|
59 |
-
* @param LoggerInterface $logger The logger.
|
60 |
*/
|
61 |
public function __construct(
|
62 |
string $host,
|
63 |
Bearer $bearer,
|
64 |
-
PartnerReferralsData $data,
|
65 |
LoggerInterface $logger
|
66 |
) {
|
67 |
|
68 |
$this->host = $host;
|
69 |
$this->bearer = $bearer;
|
70 |
-
$this->data = $data;
|
71 |
$this->logger = $logger;
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
* Fetch the signup link.
|
76 |
*
|
|
|
77 |
* @return string
|
78 |
* @throws RuntimeException If the request fails.
|
79 |
*/
|
80 |
-
public function signup_link(): string {
|
81 |
-
$data = $this->data->data();
|
82 |
$bearer = $this->bearer->bearer();
|
83 |
$args = array(
|
84 |
'method' => 'POST',
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
|
|
15 |
use Psr\Log\LoggerInterface;
|
16 |
|
17 |
/**
|
35 |
*/
|
36 |
private $bearer;
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
/**
|
39 |
* The logger.
|
40 |
*
|
45 |
/**
|
46 |
* PartnerReferrals constructor.
|
47 |
*
|
48 |
+
* @param string $host The host.
|
49 |
+
* @param Bearer $bearer The bearer.
|
50 |
+
* @param LoggerInterface $logger The logger.
|
|
|
51 |
*/
|
52 |
public function __construct(
|
53 |
string $host,
|
54 |
Bearer $bearer,
|
|
|
55 |
LoggerInterface $logger
|
56 |
) {
|
57 |
|
58 |
$this->host = $host;
|
59 |
$this->bearer = $bearer;
|
|
|
60 |
$this->logger = $logger;
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
* Fetch the signup link.
|
65 |
*
|
66 |
+
* @param array $data The partner referrals data.
|
67 |
* @return string
|
68 |
* @throws RuntimeException If the request fails.
|
69 |
*/
|
70 |
+
public function signup_link( array $data ): string {
|
|
|
71 |
$bearer = $this->bearer->bearer();
|
72 |
$args = array(
|
73 |
'method' => 'POST',
|
modules/ppcp-api-client/src/Endpoint/PaymentsEndpoint.php
CHANGED
@@ -12,6 +12,7 @@ namespace WooCommerce\PayPalCommerce\ApiClient\Endpoint;
|
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Authorization;
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Capture;
|
|
|
15 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Refund;
|
16 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
@@ -146,22 +147,32 @@ class PaymentsEndpoint {
|
|
146 |
/**
|
147 |
* Capture an authorization by a given ID.
|
148 |
*
|
149 |
-
* @param string
|
|
|
150 |
*
|
151 |
* @return Capture
|
152 |
* @throws RuntimeException If the request fails.
|
153 |
* @throws PayPalApiException If the request fails.
|
154 |
*/
|
155 |
-
public function capture( string $authorization_id ): Capture {
|
156 |
$bearer = $this->bearer->bearer();
|
157 |
$url = trailingslashit( $this->host ) . 'v2/payments/authorizations/' . $authorization_id . '/capture';
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
'method' => 'POST',
|
160 |
'headers' => array(
|
161 |
'Authorization' => 'Bearer ' . $bearer->token(),
|
162 |
'Content-Type' => 'application/json',
|
163 |
'Prefer' => 'return=representation',
|
164 |
),
|
|
|
165 |
);
|
166 |
|
167 |
$response = $this->request( $url, $args );
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Authorization;
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Capture;
|
15 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\Money;
|
16 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Refund;
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
18 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
147 |
/**
|
148 |
* Capture an authorization by a given ID.
|
149 |
*
|
150 |
+
* @param string $authorization_id The id.
|
151 |
+
* @param Money|null $amount The amount to capture. If not specified, the whole authorized amount is captured.
|
152 |
*
|
153 |
* @return Capture
|
154 |
* @throws RuntimeException If the request fails.
|
155 |
* @throws PayPalApiException If the request fails.
|
156 |
*/
|
157 |
+
public function capture( string $authorization_id, ?Money $amount = null ): Capture {
|
158 |
$bearer = $this->bearer->bearer();
|
159 |
$url = trailingslashit( $this->host ) . 'v2/payments/authorizations/' . $authorization_id . '/capture';
|
160 |
+
|
161 |
+
$data = array(
|
162 |
+
'final_capture' => true,
|
163 |
+
);
|
164 |
+
if ( $amount ) {
|
165 |
+
$data['amount'] = $amount->to_array();
|
166 |
+
}
|
167 |
+
|
168 |
+
$args = array(
|
169 |
'method' => 'POST',
|
170 |
'headers' => array(
|
171 |
'Authorization' => 'Bearer ' . $bearer->token(),
|
172 |
'Content-Type' => 'application/json',
|
173 |
'Prefer' => 'return=representation',
|
174 |
),
|
175 |
+
'body' => wp_json_encode( $data, JSON_FORCE_OBJECT ),
|
176 |
);
|
177 |
|
178 |
$response = $this->request( $url, $args );
|
modules/ppcp-api-client/src/Entity/Address.php
CHANGED
@@ -143,13 +143,15 @@ class Address {
|
|
143 |
* @return array
|
144 |
*/
|
145 |
public function to_array(): array {
|
146 |
-
return
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
|
|
|
|
153 |
);
|
154 |
}
|
155 |
}
|
143 |
* @return array
|
144 |
*/
|
145 |
public function to_array(): array {
|
146 |
+
return array_filter(
|
147 |
+
array(
|
148 |
+
'country_code' => $this->country_code(),
|
149 |
+
'address_line_1' => $this->address_line_1(),
|
150 |
+
'address_line_2' => $this->address_line_2(),
|
151 |
+
'admin_area_1' => $this->admin_area_1(),
|
152 |
+
'admin_area_2' => $this->admin_area_2(),
|
153 |
+
'postal_code' => $this->postal_code(),
|
154 |
+
)
|
155 |
);
|
156 |
}
|
157 |
}
|
modules/ppcp-api-client/src/Entity/Capture.php
CHANGED
@@ -51,6 +51,13 @@ class Capture {
|
|
51 |
*/
|
52 |
private $seller_protection;
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* The invoice id.
|
56 |
*
|
@@ -68,13 +75,14 @@ class Capture {
|
|
68 |
/**
|
69 |
* Capture constructor.
|
70 |
*
|
71 |
-
* @param string
|
72 |
-
* @param CaptureStatus
|
73 |
-
* @param Amount
|
74 |
-
* @param bool
|
75 |
-
* @param string
|
76 |
-
* @param string
|
77 |
-
* @param string
|
|
|
78 |
*/
|
79 |
public function __construct(
|
80 |
string $id,
|
@@ -83,16 +91,18 @@ class Capture {
|
|
83 |
bool $final_capture,
|
84 |
string $seller_protection,
|
85 |
string $invoice_id,
|
86 |
-
string $custom_id
|
|
|
87 |
) {
|
88 |
|
89 |
-
$this->id
|
90 |
-
$this->status
|
91 |
-
$this->amount
|
92 |
-
$this->final_capture
|
93 |
-
$this->seller_protection
|
94 |
-
$this->invoice_id
|
95 |
-
$this->custom_id
|
|
|
96 |
}
|
97 |
|
98 |
/**
|
@@ -158,6 +168,15 @@ class Capture {
|
|
158 |
return $this->custom_id;
|
159 |
}
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
/**
|
162 |
* Returns the entity as array.
|
163 |
*
|
@@ -177,6 +196,9 @@ class Capture {
|
|
177 |
if ( $details ) {
|
178 |
$data['status_details'] = array( 'reason' => $details->reason() );
|
179 |
}
|
|
|
|
|
|
|
180 |
return $data;
|
181 |
}
|
182 |
}
|
51 |
*/
|
52 |
private $seller_protection;
|
53 |
|
54 |
+
/**
|
55 |
+
* The detailed breakdown of the capture activity (fees, ...).
|
56 |
+
*
|
57 |
+
* @var SellerReceivableBreakdown|null
|
58 |
+
*/
|
59 |
+
private $seller_receivable_breakdown;
|
60 |
+
|
61 |
/**
|
62 |
* The invoice id.
|
63 |
*
|
75 |
/**
|
76 |
* Capture constructor.
|
77 |
*
|
78 |
+
* @param string $id The ID.
|
79 |
+
* @param CaptureStatus $status The status.
|
80 |
+
* @param Amount $amount The amount.
|
81 |
+
* @param bool $final_capture The final capture.
|
82 |
+
* @param string $seller_protection The seller protection.
|
83 |
+
* @param string $invoice_id The invoice id.
|
84 |
+
* @param string $custom_id The custom id.
|
85 |
+
* @param SellerReceivableBreakdown|null $seller_receivable_breakdown The detailed breakdown of the capture activity (fees, ...).
|
86 |
*/
|
87 |
public function __construct(
|
88 |
string $id,
|
91 |
bool $final_capture,
|
92 |
string $seller_protection,
|
93 |
string $invoice_id,
|
94 |
+
string $custom_id,
|
95 |
+
?SellerReceivableBreakdown $seller_receivable_breakdown
|
96 |
) {
|
97 |
|
98 |
+
$this->id = $id;
|
99 |
+
$this->status = $status;
|
100 |
+
$this->amount = $amount;
|
101 |
+
$this->final_capture = $final_capture;
|
102 |
+
$this->seller_protection = $seller_protection;
|
103 |
+
$this->invoice_id = $invoice_id;
|
104 |
+
$this->custom_id = $custom_id;
|
105 |
+
$this->seller_receivable_breakdown = $seller_receivable_breakdown;
|
106 |
}
|
107 |
|
108 |
/**
|
168 |
return $this->custom_id;
|
169 |
}
|
170 |
|
171 |
+
/**
|
172 |
+
* Returns the detailed breakdown of the capture activity (fees, ...).
|
173 |
+
*
|
174 |
+
* @return SellerReceivableBreakdown|null
|
175 |
+
*/
|
176 |
+
public function seller_receivable_breakdown() : ?SellerReceivableBreakdown {
|
177 |
+
return $this->seller_receivable_breakdown;
|
178 |
+
}
|
179 |
+
|
180 |
/**
|
181 |
* Returns the entity as array.
|
182 |
*
|
196 |
if ( $details ) {
|
197 |
$data['status_details'] = array( 'reason' => $details->reason() );
|
198 |
}
|
199 |
+
if ( $this->seller_receivable_breakdown ) {
|
200 |
+
$data['seller_receivable_breakdown'] = $this->seller_receivable_breakdown->to_array();
|
201 |
+
}
|
202 |
return $data;
|
203 |
}
|
204 |
}
|
modules/ppcp-api-client/src/Entity/ExchangeRate.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The exchange rate object.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\ApiClient\Entity
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\ApiClient\Entity;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class ExchangeRate.
|
14 |
+
*/
|
15 |
+
class ExchangeRate {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The source currency from which to convert an amount.
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
private $source_currency;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The target currency to which to convert an amount.
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $target_currency;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* The target currency amount. Equivalent to one unit of the source currency.
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
private $value;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* ExchangeRate constructor.
|
40 |
+
*
|
41 |
+
* @param string $source_currency The source currency from which to convert an amount.
|
42 |
+
* @param string $target_currency The target currency to which to convert an amount.
|
43 |
+
* @param string $value The target currency amount. Equivalent to one unit of the source currency.
|
44 |
+
*/
|
45 |
+
public function __construct( string $source_currency, string $target_currency, string $value ) {
|
46 |
+
$this->source_currency = $source_currency;
|
47 |
+
$this->target_currency = $target_currency;
|
48 |
+
$this->value = $value;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* The source currency from which to convert an amount.
|
53 |
+
*
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function source_currency(): string {
|
57 |
+
return $this->source_currency;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* The target currency to which to convert an amount.
|
62 |
+
*
|
63 |
+
* @return string
|
64 |
+
*/
|
65 |
+
public function target_currency(): string {
|
66 |
+
return $this->target_currency;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* The target currency amount. Equivalent to one unit of the source currency.
|
71 |
+
*
|
72 |
+
* @return string
|
73 |
+
*/
|
74 |
+
public function value(): string {
|
75 |
+
return $this->value;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Returns the object as array.
|
80 |
+
*
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public function to_array(): array {
|
84 |
+
return array(
|
85 |
+
'source_currency' => $this->source_currency,
|
86 |
+
'target_currency' => $this->target_currency,
|
87 |
+
'value' => $this->value,
|
88 |
+
);
|
89 |
+
}
|
90 |
+
}
|
modules/ppcp-api-client/src/Entity/PaymentToken.php
CHANGED
@@ -105,6 +105,9 @@ class PaymentToken {
|
|
105 |
* @return array
|
106 |
*/
|
107 |
public static function get_valid_types() {
|
|
|
|
|
|
|
108 |
return apply_filters(
|
109 |
'woocommerce_paypal_payments_valid_payment_token_types',
|
110 |
array(
|
105 |
* @return array
|
106 |
*/
|
107 |
public static function get_valid_types() {
|
108 |
+
/**
|
109 |
+
* Returns a list of valid payment token types.
|
110 |
+
*/
|
111 |
return apply_filters(
|
112 |
'woocommerce_paypal_payments_valid_payment_token_types',
|
113 |
array(
|
modules/ppcp-api-client/src/Entity/PlatformFee.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The platform fee object.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\ApiClient\Entity
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\ApiClient\Entity;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class PlatformFee.
|
14 |
+
*/
|
15 |
+
class PlatformFee {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The fee.
|
19 |
+
*
|
20 |
+
* @var Money
|
21 |
+
*/
|
22 |
+
private $amount;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The recipient of the fee.
|
26 |
+
*
|
27 |
+
* @var Payee|null
|
28 |
+
*/
|
29 |
+
private $payee;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* PlatformFee constructor.
|
33 |
+
*
|
34 |
+
* @param Money $amount The fee.
|
35 |
+
* @param Payee|null $payee The recipient of the fee.
|
36 |
+
*/
|
37 |
+
public function __construct( Money $amount, ?Payee $payee ) {
|
38 |
+
$this->amount = $amount;
|
39 |
+
$this->payee = $payee;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* The fee.
|
44 |
+
*
|
45 |
+
* @return Money
|
46 |
+
*/
|
47 |
+
public function amount(): Money {
|
48 |
+
return $this->amount;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* The recipient of the fee.
|
53 |
+
*
|
54 |
+
* @return Payee|null
|
55 |
+
*/
|
56 |
+
public function payee(): ?Payee {
|
57 |
+
return $this->payee;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Returns the object as array.
|
62 |
+
*
|
63 |
+
* @return array
|
64 |
+
*/
|
65 |
+
public function to_array(): array {
|
66 |
+
$data = array(
|
67 |
+
'amount' => $this->amount->to_array(),
|
68 |
+
);
|
69 |
+
if ( $this->payee ) {
|
70 |
+
$data['payee'] = $this->payee->to_array();
|
71 |
+
}
|
72 |
+
return $data;
|
73 |
+
}
|
74 |
+
}
|
modules/ppcp-api-client/src/Entity/SellerReceivableBreakdown.php
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The info about fees and amount that will be received by the seller.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\ApiClient\Entity
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\ApiClient\Entity;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class SellerReceivableBreakdown
|
14 |
+
*/
|
15 |
+
class SellerReceivableBreakdown {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The amount for this captured payment in the currency of the transaction.
|
19 |
+
*
|
20 |
+
* @var Money
|
21 |
+
*/
|
22 |
+
private $gross_amount;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The applicable fee for this captured payment in the currency of the transaction.
|
26 |
+
*
|
27 |
+
* @var Money|null
|
28 |
+
*/
|
29 |
+
private $paypal_fee;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* The applicable fee for this captured payment in the receivable currency.
|
33 |
+
*
|
34 |
+
* Present only in cases the fee is charged in the receivable currency.
|
35 |
+
*
|
36 |
+
* @var Money|null
|
37 |
+
*/
|
38 |
+
private $paypal_fee_in_receivable_currency;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* The net amount that the payee receives for this captured payment in their PayPal account.
|
42 |
+
*
|
43 |
+
* Computed as gross_amount minus the paypal_fee minus the platform_fees.
|
44 |
+
*
|
45 |
+
* @var Money|null
|
46 |
+
*/
|
47 |
+
private $net_amount;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* The net amount that is credited to the payee's PayPal account.
|
51 |
+
*
|
52 |
+
* Present only when the currency of the captured payment is different from the currency
|
53 |
+
* of the PayPal account where the payee wants to credit the funds. Computed as net_amount times exchange_rate.
|
54 |
+
*
|
55 |
+
* @var Money|null
|
56 |
+
*/
|
57 |
+
private $receivable_amount;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* The exchange rate that determines the amount that is credited to the payee's PayPal account.
|
61 |
+
*
|
62 |
+
* Present when the currency of the captured payment is different from the currency of the PayPal account where the payee wants to credit the funds.
|
63 |
+
*
|
64 |
+
* @var ExchangeRate|null
|
65 |
+
*/
|
66 |
+
private $exchange_rate;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
|
70 |
+
*
|
71 |
+
* @var PlatformFee[]
|
72 |
+
*/
|
73 |
+
private $platform_fees;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* SellerReceivableBreakdown constructor.
|
77 |
+
*
|
78 |
+
* @param Money $gross_amount The amount for this captured payment in the currency of the transaction.
|
79 |
+
* @param Money|null $paypal_fee The applicable fee for this captured payment in the currency of the transaction.
|
80 |
+
* @param Money|null $paypal_fee_in_receivable_currency The applicable fee for this captured payment in the receivable currency.
|
81 |
+
* @param Money|null $net_amount The net amount that the payee receives for this captured payment in their PayPal account.
|
82 |
+
* @param Money|null $receivable_amount The net amount that is credited to the payee's PayPal account.
|
83 |
+
* @param ExchangeRate|null $exchange_rate The exchange rate that determines the amount that is credited to the payee's PayPal account.
|
84 |
+
* @param PlatformFee[] $platform_fees An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
|
85 |
+
*/
|
86 |
+
public function __construct(
|
87 |
+
Money $gross_amount,
|
88 |
+
?Money $paypal_fee,
|
89 |
+
?Money $paypal_fee_in_receivable_currency,
|
90 |
+
?Money $net_amount,
|
91 |
+
?Money $receivable_amount,
|
92 |
+
?ExchangeRate $exchange_rate,
|
93 |
+
array $platform_fees
|
94 |
+
) {
|
95 |
+
$this->gross_amount = $gross_amount;
|
96 |
+
$this->paypal_fee = $paypal_fee;
|
97 |
+
$this->paypal_fee_in_receivable_currency = $paypal_fee_in_receivable_currency;
|
98 |
+
$this->net_amount = $net_amount;
|
99 |
+
$this->receivable_amount = $receivable_amount;
|
100 |
+
$this->exchange_rate = $exchange_rate;
|
101 |
+
$this->platform_fees = $platform_fees;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* The amount for this captured payment in the currency of the transaction.
|
106 |
+
*
|
107 |
+
* @return Money
|
108 |
+
*/
|
109 |
+
public function gross_amount(): ?Money {
|
110 |
+
return $this->gross_amount;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* The applicable fee for this captured payment in the currency of the transaction.
|
115 |
+
*
|
116 |
+
* @return Money|null
|
117 |
+
*/
|
118 |
+
public function paypal_fee(): ?Money {
|
119 |
+
return $this->paypal_fee;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* The applicable fee for this captured payment in the receivable currency.
|
124 |
+
*
|
125 |
+
* Present only in cases the fee is charged in the receivable currency.
|
126 |
+
*
|
127 |
+
* @return Money|null
|
128 |
+
*/
|
129 |
+
public function paypal_fee_in_receivable_currency(): ?Money {
|
130 |
+
return $this->paypal_fee_in_receivable_currency;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* The net amount that the payee receives for this captured payment in their PayPal account.
|
135 |
+
*
|
136 |
+
* Computed as gross_amount minus the paypal_fee minus the platform_fees.
|
137 |
+
*
|
138 |
+
* @return Money|null
|
139 |
+
*/
|
140 |
+
public function net_amount(): ?Money {
|
141 |
+
return $this->net_amount;
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* The net amount that is credited to the payee's PayPal account.
|
146 |
+
*
|
147 |
+
* Present only when the currency of the captured payment is different from the currency
|
148 |
+
* of the PayPal account where the payee wants to credit the funds. Computed as net_amount times exchange_rate.
|
149 |
+
*
|
150 |
+
* @return Money|null
|
151 |
+
*/
|
152 |
+
public function receivable_amount(): ?Money {
|
153 |
+
return $this->receivable_amount;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* The exchange rate that determines the amount that is credited to the payee's PayPal account.
|
158 |
+
*
|
159 |
+
* Present when the currency of the captured payment is different from the currency of the PayPal account where the payee wants to credit the funds.
|
160 |
+
*
|
161 |
+
* @return ExchangeRate|null
|
162 |
+
*/
|
163 |
+
public function exchange_rate(): ?ExchangeRate {
|
164 |
+
return $this->exchange_rate;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
|
169 |
+
*
|
170 |
+
* @return PlatformFee[]
|
171 |
+
*/
|
172 |
+
public function platform_fees(): array {
|
173 |
+
return $this->platform_fees;
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Returns the object as array.
|
178 |
+
*
|
179 |
+
* @return array
|
180 |
+
*/
|
181 |
+
public function to_array(): array {
|
182 |
+
$data = array(
|
183 |
+
'gross_amount' => $this->gross_amount->to_array(),
|
184 |
+
);
|
185 |
+
if ( $this->paypal_fee ) {
|
186 |
+
$data['paypal_fee'] = $this->paypal_fee->to_array();
|
187 |
+
}
|
188 |
+
if ( $this->paypal_fee_in_receivable_currency ) {
|
189 |
+
$data['paypal_fee_in_receivable_currency'] = $this->paypal_fee_in_receivable_currency->to_array();
|
190 |
+
}
|
191 |
+
if ( $this->net_amount ) {
|
192 |
+
$data['net_amount'] = $this->net_amount->to_array();
|
193 |
+
}
|
194 |
+
if ( $this->receivable_amount ) {
|
195 |
+
$data['receivable_amount'] = $this->receivable_amount->to_array();
|
196 |
+
}
|
197 |
+
if ( $this->exchange_rate ) {
|
198 |
+
$data['exchange_rate'] = $this->exchange_rate->to_array();
|
199 |
+
}
|
200 |
+
if ( $this->platform_fees ) {
|
201 |
+
$data['platform_fees'] = array_map(
|
202 |
+
function ( PlatformFee $fee ) {
|
203 |
+
return $fee->to_array();
|
204 |
+
},
|
205 |
+
$this->platform_fees
|
206 |
+
);
|
207 |
+
}
|
208 |
+
|
209 |
+
return $data;
|
210 |
+
}
|
211 |
+
}
|
modules/ppcp-api-client/src/Exception/PayPalApiException.php
CHANGED
@@ -110,4 +110,13 @@ class PayPalApiException extends RuntimeException {
|
|
110 |
}
|
111 |
return false;
|
112 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
110 |
}
|
111 |
return false;
|
112 |
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Returns response issues.
|
116 |
+
*
|
117 |
+
* @return array
|
118 |
+
*/
|
119 |
+
public function issues(): array {
|
120 |
+
return $this->response->issues ?? array();
|
121 |
+
}
|
122 |
}
|
modules/ppcp-api-client/src/Factory/AmountFactory.php
CHANGED
@@ -28,6 +28,13 @@ class AmountFactory {
|
|
28 |
*/
|
29 |
private $item_factory;
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* 3-letter currency code of the shop.
|
33 |
*
|
@@ -38,12 +45,14 @@ class AmountFactory {
|
|
38 |
/**
|
39 |
* AmountFactory constructor.
|
40 |
*
|
41 |
-
* @param ItemFactory
|
42 |
-
* @param
|
|
|
43 |
*/
|
44 |
-
public function __construct( ItemFactory $item_factory, string $currency ) {
|
45 |
-
$this->item_factory
|
46 |
-
$this->
|
|
|
47 |
}
|
48 |
|
49 |
/**
|
@@ -169,16 +178,7 @@ class AmountFactory {
|
|
169 |
* @throws RuntimeException When JSON object is malformed.
|
170 |
*/
|
171 |
public function from_paypal_response( \stdClass $data ): Amount {
|
172 |
-
|
173 |
-
throw new RuntimeException( __( 'No value given', 'woocommerce-paypal-payments' ) );
|
174 |
-
}
|
175 |
-
if ( ! isset( $data->currency_code ) ) {
|
176 |
-
throw new RuntimeException(
|
177 |
-
__( 'No currency given', 'woocommerce-paypal-payments' )
|
178 |
-
);
|
179 |
-
}
|
180 |
-
|
181 |
-
$money = new Money( (float) $data->value, $data->currency_code );
|
182 |
$breakdown = ( isset( $data->breakdown ) ) ? $this->break_down( $data->breakdown ) : null;
|
183 |
return new Amount( $money, $breakdown );
|
184 |
}
|
28 |
*/
|
29 |
private $item_factory;
|
30 |
|
31 |
+
/**
|
32 |
+
* The Money factory.
|
33 |
+
*
|
34 |
+
* @var MoneyFactory
|
35 |
+
*/
|
36 |
+
private $money_factory;
|
37 |
+
|
38 |
/**
|
39 |
* 3-letter currency code of the shop.
|
40 |
*
|
45 |
/**
|
46 |
* AmountFactory constructor.
|
47 |
*
|
48 |
+
* @param ItemFactory $item_factory The Item factory.
|
49 |
+
* @param MoneyFactory $money_factory The Money factory.
|
50 |
+
* @param string $currency 3-letter currency code of the shop.
|
51 |
*/
|
52 |
+
public function __construct( ItemFactory $item_factory, MoneyFactory $money_factory, string $currency ) {
|
53 |
+
$this->item_factory = $item_factory;
|
54 |
+
$this->money_factory = $money_factory;
|
55 |
+
$this->currency = $currency;
|
56 |
}
|
57 |
|
58 |
/**
|
178 |
* @throws RuntimeException When JSON object is malformed.
|
179 |
*/
|
180 |
public function from_paypal_response( \stdClass $data ): Amount {
|
181 |
+
$money = $this->money_factory->from_paypal_response( $data );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
$breakdown = ( isset( $data->breakdown ) ) ? $this->break_down( $data->breakdown ) : null;
|
183 |
return new Amount( $money, $breakdown );
|
184 |
}
|
modules/ppcp-api-client/src/Factory/CaptureFactory.php
CHANGED
@@ -25,14 +25,26 @@ class CaptureFactory {
|
|
25 |
*/
|
26 |
private $amount_factory;
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
/**
|
29 |
* CaptureFactory constructor.
|
30 |
*
|
31 |
-
* @param AmountFactory
|
|
|
32 |
*/
|
33 |
-
public function __construct(
|
|
|
|
|
|
|
34 |
|
35 |
-
$this->amount_factory
|
|
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -44,7 +56,10 @@ class CaptureFactory {
|
|
44 |
*/
|
45 |
public function from_paypal_response( \stdClass $data ) : Capture {
|
46 |
|
47 |
-
$reason
|
|
|
|
|
|
|
48 |
|
49 |
return new Capture(
|
50 |
(string) $data->id,
|
@@ -56,7 +71,8 @@ class CaptureFactory {
|
|
56 |
(bool) $data->final_capture,
|
57 |
(string) $data->seller_protection->status,
|
58 |
(string) $data->invoice_id,
|
59 |
-
(string) $data->custom_id
|
|
|
60 |
);
|
61 |
}
|
62 |
}
|
25 |
*/
|
26 |
private $amount_factory;
|
27 |
|
28 |
+
/**
|
29 |
+
* The SellerReceivableBreakdown factory.
|
30 |
+
*
|
31 |
+
* @var SellerReceivableBreakdownFactory
|
32 |
+
*/
|
33 |
+
private $seller_receivable_breakdown_factory;
|
34 |
+
|
35 |
/**
|
36 |
* CaptureFactory constructor.
|
37 |
*
|
38 |
+
* @param AmountFactory $amount_factory The amount factory.
|
39 |
+
* @param SellerReceivableBreakdownFactory $seller_receivable_breakdown_factory The SellerReceivableBreakdown factory.
|
40 |
*/
|
41 |
+
public function __construct(
|
42 |
+
AmountFactory $amount_factory,
|
43 |
+
SellerReceivableBreakdownFactory $seller_receivable_breakdown_factory
|
44 |
+
) {
|
45 |
|
46 |
+
$this->amount_factory = $amount_factory;
|
47 |
+
$this->seller_receivable_breakdown_factory = $seller_receivable_breakdown_factory;
|
48 |
}
|
49 |
|
50 |
/**
|
56 |
*/
|
57 |
public function from_paypal_response( \stdClass $data ) : Capture {
|
58 |
|
59 |
+
$reason = $data->status_details->reason ?? null;
|
60 |
+
$seller_receivable_breakdown = isset( $data->seller_receivable_breakdown ) ?
|
61 |
+
$this->seller_receivable_breakdown_factory->from_paypal_response( $data->seller_receivable_breakdown )
|
62 |
+
: null;
|
63 |
|
64 |
return new Capture(
|
65 |
(string) $data->id,
|
71 |
(bool) $data->final_capture,
|
72 |
(string) $data->seller_protection->status,
|
73 |
(string) $data->invoice_id,
|
74 |
+
(string) $data->custom_id,
|
75 |
+
$seller_receivable_breakdown
|
76 |
);
|
77 |
}
|
78 |
}
|
modules/ppcp-api-client/src/Factory/ExchangeRateFactory.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The ExchangeRateFactory Factory.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\ApiClient\Factory
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\ApiClient\Factory;
|
11 |
+
|
12 |
+
use stdClass;
|
13 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\ExchangeRate;
|
14 |
+
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class ExchangeRateFactory
|
18 |
+
*/
|
19 |
+
class ExchangeRateFactory {
|
20 |
+
/**
|
21 |
+
* Returns an ExchangeRate object based off a PayPal Response.
|
22 |
+
*
|
23 |
+
* @param stdClass $data The JSON object.
|
24 |
+
*
|
25 |
+
* @return ExchangeRate|null
|
26 |
+
* @throws RuntimeException When JSON object is malformed.
|
27 |
+
*/
|
28 |
+
public function from_paypal_response( stdClass $data ): ?ExchangeRate {
|
29 |
+
// Looks like all fields in this object are optional, according to the docs,
|
30 |
+
// and sometimes we get an empty object.
|
31 |
+
$source_currency = $data->source_currency ?? '';
|
32 |
+
$target_currency = $data->target_currency ?? '';
|
33 |
+
$value = $data->value ?? '';
|
34 |
+
if ( ! $source_currency && ! $target_currency && ! $value ) {
|
35 |
+
// Do not return empty object.
|
36 |
+
return null;
|
37 |
+
}
|
38 |
+
|
39 |
+
return new ExchangeRate( $source_currency, $target_currency, $value );
|
40 |
+
}
|
41 |
+
}
|
modules/ppcp-api-client/src/Factory/MoneyFactory.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Money factory.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\ApiClient\Factory
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\ApiClient\Factory;
|
11 |
+
|
12 |
+
use stdClass;
|
13 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\Money;
|
14 |
+
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class MoneyFactory
|
18 |
+
*/
|
19 |
+
class MoneyFactory {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Returns a Money object based off a PayPal Response.
|
23 |
+
*
|
24 |
+
* @param stdClass $data The JSON object.
|
25 |
+
*
|
26 |
+
* @return Money
|
27 |
+
* @throws RuntimeException When JSON object is malformed.
|
28 |
+
*/
|
29 |
+
public function from_paypal_response( stdClass $data ): Money {
|
30 |
+
if ( ! isset( $data->value ) || ! is_numeric( $data->value ) ) {
|
31 |
+
throw new RuntimeException( 'No money value given' );
|
32 |
+
}
|
33 |
+
if ( ! isset( $data->currency_code ) ) {
|
34 |
+
throw new RuntimeException( 'No currency given' );
|
35 |
+
}
|
36 |
+
|
37 |
+
return new Money( (float) $data->value, $data->currency_code );
|
38 |
+
}
|
39 |
+
}
|
modules/ppcp-api-client/src/Factory/PayerFactory.php
CHANGED
@@ -9,6 +9,7 @@ declare(strict_types=1);
|
|
9 |
|
10 |
namespace WooCommerce\PayPalCommerce\ApiClient\Factory;
|
11 |
|
|
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Payer;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\PayerName;
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\PayerTaxInfo;
|
@@ -54,10 +55,12 @@ class PayerFactory {
|
|
54 |
$national_number = preg_replace( '/[^0-9]/', '', $national_number );
|
55 |
$national_number = substr( $national_number, 0, 14 );
|
56 |
|
57 |
-
$
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
61 |
}
|
62 |
return new Payer(
|
63 |
new PayerName(
|
@@ -90,10 +93,12 @@ class PayerFactory {
|
|
90 |
$national_number = preg_replace( '/[^0-9]/', '', $national_number );
|
91 |
$national_number = substr( $national_number, 0, 14 );
|
92 |
|
93 |
-
$
|
94 |
-
|
95 |
-
|
96 |
-
|
|
|
|
|
97 |
}
|
98 |
return new Payer(
|
99 |
new PayerName(
|
@@ -147,4 +152,57 @@ class PayerFactory {
|
|
147 |
$tax_info
|
148 |
);
|
149 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
9 |
|
10 |
namespace WooCommerce\PayPalCommerce\ApiClient\Factory;
|
11 |
|
12 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\Address;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Payer;
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\PayerName;
|
15 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\PayerTaxInfo;
|
55 |
$national_number = preg_replace( '/[^0-9]/', '', $national_number );
|
56 |
$national_number = substr( $national_number, 0, 14 );
|
57 |
|
58 |
+
if ( $national_number ) {
|
59 |
+
$phone = new PhoneWithType(
|
60 |
+
'HOME',
|
61 |
+
new Phone( $national_number )
|
62 |
+
);
|
63 |
+
}
|
64 |
}
|
65 |
return new Payer(
|
66 |
new PayerName(
|
93 |
$national_number = preg_replace( '/[^0-9]/', '', $national_number );
|
94 |
$national_number = substr( $national_number, 0, 14 );
|
95 |
|
96 |
+
if ( $national_number ) {
|
97 |
+
$phone = new PhoneWithType(
|
98 |
+
'HOME',
|
99 |
+
new Phone( $national_number )
|
100 |
+
);
|
101 |
+
}
|
102 |
}
|
103 |
return new Payer(
|
104 |
new PayerName(
|
152 |
$tax_info
|
153 |
);
|
154 |
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Returns a Payer object based off the given checkout form fields.
|
158 |
+
*
|
159 |
+
* @param array $form_fields The checkout form fields.
|
160 |
+
* @return Payer
|
161 |
+
*/
|
162 |
+
public function from_checkout_form( array $form_fields ): Payer {
|
163 |
+
|
164 |
+
$first_name = $form_fields['billing_first_name'] ?? '';
|
165 |
+
$last_name = $form_fields['billing_last_name'] ?? '';
|
166 |
+
$billing_email = $form_fields['billing_email'] ?? '';
|
167 |
+
$billing_country = $form_fields['billing_country'] ?? '';
|
168 |
+
$billing_address_1 = $form_fields['billing_address_1'] ?? '';
|
169 |
+
$billing_address_2 = $form_fields['billing_address_2'] ?? '';
|
170 |
+
$admin_area_1 = $form_fields['billing_state'] ?? '';
|
171 |
+
$admin_area_2 = $form_fields['billing_city'] ?? '';
|
172 |
+
$billing_postcode = $form_fields['billing_postcode'] ?? '';
|
173 |
+
|
174 |
+
$phone = null;
|
175 |
+
if ( isset( $form_fields['billing_phone'] ) && '' !== $form_fields['billing_phone'] ) {
|
176 |
+
// make sure the phone number contains only numbers and is max 14. chars long.
|
177 |
+
$national_number = $form_fields['billing_phone'];
|
178 |
+
$national_number = preg_replace( '/[^0-9]/', '', $national_number );
|
179 |
+
|
180 |
+
if ( null !== $national_number ) {
|
181 |
+
$national_number = substr( $national_number, 0, 14 );
|
182 |
+
|
183 |
+
if ( $national_number ) {
|
184 |
+
$phone = new PhoneWithType(
|
185 |
+
'HOME',
|
186 |
+
new Phone( $national_number )
|
187 |
+
);
|
188 |
+
}
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
return new Payer(
|
193 |
+
new PayerName( $first_name, $last_name ),
|
194 |
+
$billing_email,
|
195 |
+
'',
|
196 |
+
new Address(
|
197 |
+
$billing_country,
|
198 |
+
$billing_address_1,
|
199 |
+
$billing_address_2,
|
200 |
+
$admin_area_1,
|
201 |
+
$admin_area_2,
|
202 |
+
$billing_postcode
|
203 |
+
),
|
204 |
+
null,
|
205 |
+
$phone
|
206 |
+
);
|
207 |
+
}
|
208 |
}
|
modules/ppcp-api-client/src/Factory/PlatformFeeFactory.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The PlatformFee Factory.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\ApiClient\Factory
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\ApiClient\Factory;
|
11 |
+
|
12 |
+
use stdClass;
|
13 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\PlatformFee;
|
14 |
+
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class PayeeFactory
|
18 |
+
*/
|
19 |
+
class PlatformFeeFactory {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* The Money factory.
|
23 |
+
*
|
24 |
+
* @var MoneyFactory
|
25 |
+
*/
|
26 |
+
private $money_factory;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The Payee factory.
|
30 |
+
*
|
31 |
+
* @var PayeeFactory
|
32 |
+
*/
|
33 |
+
private $payee_factory;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* PlatformFeeFactory constructor.
|
37 |
+
*
|
38 |
+
* @param MoneyFactory $money_factory The Money factory.
|
39 |
+
* @param PayeeFactory $payee_factory The Payee factory.
|
40 |
+
*/
|
41 |
+
public function __construct( MoneyFactory $money_factory, PayeeFactory $payee_factory ) {
|
42 |
+
|
43 |
+
$this->money_factory = $money_factory;
|
44 |
+
$this->payee_factory = $payee_factory;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Returns a Payee object based off a PayPal Response.
|
49 |
+
*
|
50 |
+
* @param stdClass $data The JSON object.
|
51 |
+
*
|
52 |
+
* @return PlatformFee
|
53 |
+
* @throws RuntimeException When JSON object is malformed.
|
54 |
+
*/
|
55 |
+
public function from_paypal_response( stdClass $data ): PlatformFee {
|
56 |
+
if ( ! isset( $data->amount ) ) {
|
57 |
+
throw new RuntimeException( 'Platform fee amount not found' );
|
58 |
+
}
|
59 |
+
|
60 |
+
$amount = $this->money_factory->from_paypal_response( $data->amount );
|
61 |
+
$payee = ( isset( $data->payee ) ) ? $this->payee_factory->from_paypal_response( $data->payee ) : null;
|
62 |
+
return new PlatformFee( $amount, $payee );
|
63 |
+
}
|
64 |
+
}
|
modules/ppcp-api-client/src/Factory/PurchaseUnitFactory.php
CHANGED
@@ -112,7 +112,7 @@ class PurchaseUnitFactory {
|
|
112 |
if (
|
113 |
! $this->shipping_needed( ... array_values( $items ) ) ||
|
114 |
empty( $shipping->address()->country_code() ) ||
|
115 |
-
( $shipping->address()->
|
116 |
) {
|
117 |
$shipping = null;
|
118 |
}
|
@@ -121,7 +121,6 @@ class PurchaseUnitFactory {
|
|
121 |
$payee = $this->payee_repository->payee();
|
122 |
$custom_id = (string) $order->get_id();
|
123 |
$invoice_id = $this->prefix . $order->get_order_number();
|
124 |
-
$retry = $order->get_meta( 'ppcp-retry' ) ? '-' . $order->get_meta( 'ppcp-retry' ) : '';
|
125 |
$soft_descriptor = '';
|
126 |
|
127 |
$purchase_unit = new PurchaseUnit(
|
@@ -135,6 +134,9 @@ class PurchaseUnitFactory {
|
|
135 |
$invoice_id,
|
136 |
$soft_descriptor
|
137 |
);
|
|
|
|
|
|
|
138 |
return apply_filters(
|
139 |
'woocommerce_paypal_payments_purchase_unit_from_wc_order',
|
140 |
$purchase_unit,
|
@@ -158,9 +160,8 @@ class PurchaseUnitFactory {
|
|
158 |
if ( $this->shipping_needed( ... array_values( $items ) ) && is_a( $customer, \WC_Customer::class ) ) {
|
159 |
$shipping = $this->shipping_factory->from_wc_customer( \WC()->customer );
|
160 |
if (
|
161 |
-
2 !== strlen( $shipping->address()->country_code() )
|
162 |
-
|
163 |
-
|| $this->country_without_postal_code( $shipping->address()->country_code() )
|
164 |
) {
|
165 |
$shipping = null;
|
166 |
}
|
@@ -276,9 +277,6 @@ class PurchaseUnitFactory {
|
|
276 |
*/
|
277 |
private function country_without_postal_code( string $country_code ): bool {
|
278 |
$countries = array( 'AE', 'AF', 'AG', 'AI', 'AL', 'AN', 'AO', 'AW', 'BB', 'BF', 'BH', 'BI', 'BJ', 'BM', 'BO', 'BS', 'BT', 'BW', 'BZ', 'CD', 'CF', 'CG', 'CI', 'CK', 'CL', 'CM', 'CO', 'CR', 'CV', 'DJ', 'DM', 'DO', 'EC', 'EG', 'ER', 'ET', 'FJ', 'FK', 'GA', 'GD', 'GH', 'GI', 'GM', 'GN', 'GQ', 'GT', 'GW', 'GY', 'HK', 'HN', 'HT', 'IE', 'IQ', 'IR', 'JM', 'JO', 'KE', 'KH', 'KI', 'KM', 'KN', 'KP', 'KW', 'KY', 'LA', 'LB', 'LC', 'LK', 'LR', 'LS', 'LY', 'ML', 'MM', 'MO', 'MR', 'MS', 'MT', 'MU', 'MW', 'MZ', 'NA', 'NE', 'NG', 'NI', 'NP', 'NR', 'NU', 'OM', 'PA', 'PE', 'PF', 'PY', 'QA', 'RW', 'SA', 'SB', 'SC', 'SD', 'SL', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SY', 'TC', 'TD', 'TG', 'TL', 'TO', 'TT', 'TV', 'TZ', 'UG', 'UY', 'VC', 'VE', 'VG', 'VN', 'VU', 'WS', 'XA', 'XB', 'XC', 'XE', 'XL', 'XM', 'XN', 'XS', 'YE', 'ZM', 'ZW' );
|
279 |
-
|
280 |
-
return true;
|
281 |
-
}
|
282 |
-
return false;
|
283 |
}
|
284 |
}
|
112 |
if (
|
113 |
! $this->shipping_needed( ... array_values( $items ) ) ||
|
114 |
empty( $shipping->address()->country_code() ) ||
|
115 |
+
( ! $shipping->address()->postal_code() && ! $this->country_without_postal_code( $shipping->address()->country_code() ) )
|
116 |
) {
|
117 |
$shipping = null;
|
118 |
}
|
121 |
$payee = $this->payee_repository->payee();
|
122 |
$custom_id = (string) $order->get_id();
|
123 |
$invoice_id = $this->prefix . $order->get_order_number();
|
|
|
124 |
$soft_descriptor = '';
|
125 |
|
126 |
$purchase_unit = new PurchaseUnit(
|
134 |
$invoice_id,
|
135 |
$soft_descriptor
|
136 |
);
|
137 |
+
/**
|
138 |
+
* Returns PurchaseUnit for the WC order.
|
139 |
+
*/
|
140 |
return apply_filters(
|
141 |
'woocommerce_paypal_payments_purchase_unit_from_wc_order',
|
142 |
$purchase_unit,
|
160 |
if ( $this->shipping_needed( ... array_values( $items ) ) && is_a( $customer, \WC_Customer::class ) ) {
|
161 |
$shipping = $this->shipping_factory->from_wc_customer( \WC()->customer );
|
162 |
if (
|
163 |
+
2 !== strlen( $shipping->address()->country_code() ) ||
|
164 |
+
( ! $shipping->address()->postal_code() && ! $this->country_without_postal_code( $shipping->address()->country_code() ) )
|
|
|
165 |
) {
|
166 |
$shipping = null;
|
167 |
}
|
277 |
*/
|
278 |
private function country_without_postal_code( string $country_code ): bool {
|
279 |
$countries = array( 'AE', 'AF', 'AG', 'AI', 'AL', 'AN', 'AO', 'AW', 'BB', 'BF', 'BH', 'BI', 'BJ', 'BM', 'BO', 'BS', 'BT', 'BW', 'BZ', 'CD', 'CF', 'CG', 'CI', 'CK', 'CL', 'CM', 'CO', 'CR', 'CV', 'DJ', 'DM', 'DO', 'EC', 'EG', 'ER', 'ET', 'FJ', 'FK', 'GA', 'GD', 'GH', 'GI', 'GM', 'GN', 'GQ', 'GT', 'GW', 'GY', 'HK', 'HN', 'HT', 'IE', 'IQ', 'IR', 'JM', 'JO', 'KE', 'KH', 'KI', 'KM', 'KN', 'KP', 'KW', 'KY', 'LA', 'LB', 'LC', 'LK', 'LR', 'LS', 'LY', 'ML', 'MM', 'MO', 'MR', 'MS', 'MT', 'MU', 'MW', 'MZ', 'NA', 'NE', 'NG', 'NI', 'NP', 'NR', 'NU', 'OM', 'PA', 'PE', 'PF', 'PY', 'QA', 'RW', 'SA', 'SB', 'SC', 'SD', 'SL', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SY', 'TC', 'TD', 'TG', 'TL', 'TO', 'TT', 'TV', 'TZ', 'UG', 'UY', 'VC', 'VE', 'VG', 'VN', 'VU', 'WS', 'XA', 'XB', 'XC', 'XE', 'XL', 'XM', 'XN', 'XS', 'YE', 'ZM', 'ZW' );
|
280 |
+
return in_array( $country_code, $countries, true );
|
|
|
|
|
|
|
281 |
}
|
282 |
}
|
modules/ppcp-api-client/src/Factory/SellerReceivableBreakdownFactory.php
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The SellerReceivableBreakdown Factory.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\ApiClient\Factory
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\ApiClient\Factory;
|
11 |
+
|
12 |
+
use stdClass;
|
13 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\PlatformFee;
|
14 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\SellerReceivableBreakdown;
|
15 |
+
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Class SellerReceivableBreakdownFactory
|
19 |
+
*/
|
20 |
+
class SellerReceivableBreakdownFactory {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* The Money factory.
|
24 |
+
*
|
25 |
+
* @var MoneyFactory
|
26 |
+
*/
|
27 |
+
private $money_factory;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* The ExchangeRate factory.
|
31 |
+
*
|
32 |
+
* @var ExchangeRateFactory
|
33 |
+
*/
|
34 |
+
private $exchange_rate_factory;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* The PlatformFee factory.
|
38 |
+
*
|
39 |
+
* @var PlatformFeeFactory
|
40 |
+
*/
|
41 |
+
private $platform_fee_factory;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* SellerReceivableBreakdownFactory constructor.
|
45 |
+
*
|
46 |
+
* @param MoneyFactory $money_factory The Money factory.
|
47 |
+
* @param ExchangeRateFactory $exchange_rate_factory The ExchangeRate factory.
|
48 |
+
* @param PlatformFeeFactory $platform_fee_factory The PlatformFee factory.
|
49 |
+
*/
|
50 |
+
public function __construct(
|
51 |
+
MoneyFactory $money_factory,
|
52 |
+
ExchangeRateFactory $exchange_rate_factory,
|
53 |
+
PlatformFeeFactory $platform_fee_factory
|
54 |
+
) {
|
55 |
+
|
56 |
+
$this->money_factory = $money_factory;
|
57 |
+
$this->exchange_rate_factory = $exchange_rate_factory;
|
58 |
+
$this->platform_fee_factory = $platform_fee_factory;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Returns a SellerReceivableBreakdown object based off a PayPal Response.
|
63 |
+
*
|
64 |
+
* @param stdClass $data The JSON object.
|
65 |
+
*
|
66 |
+
* @return SellerReceivableBreakdown
|
67 |
+
* @throws RuntimeException When JSON object is malformed.
|
68 |
+
*/
|
69 |
+
public function from_paypal_response( stdClass $data ): SellerReceivableBreakdown {
|
70 |
+
if ( ! isset( $data->gross_amount ) ) {
|
71 |
+
throw new RuntimeException( 'Seller breakdown gross amount not found' );
|
72 |
+
}
|
73 |
+
|
74 |
+
$gross_amount = $this->money_factory->from_paypal_response( $data->gross_amount );
|
75 |
+
$paypal_fee = ( isset( $data->paypal_fee ) ) ? $this->money_factory->from_paypal_response( $data->paypal_fee ) : null;
|
76 |
+
$paypal_fee_in_receivable_currency = ( isset( $data->paypal_fee_in_receivable_currency ) ) ? $this->money_factory->from_paypal_response( $data->paypal_fee_in_receivable_currency ) : null;
|
77 |
+
$net_amount = ( isset( $data->net_amount ) ) ? $this->money_factory->from_paypal_response( $data->net_amount ) : null;
|
78 |
+
$receivable_amount = ( isset( $data->receivable_amount ) ) ? $this->money_factory->from_paypal_response( $data->receivable_amount ) : null;
|
79 |
+
$exchange_rate = ( isset( $data->exchange_rate ) ) ? $this->exchange_rate_factory->from_paypal_response( $data->exchange_rate ) : null;
|
80 |
+
$platform_fees = ( isset( $data->platform_fees ) ) ? array_map(
|
81 |
+
function ( stdClass $fee_data ): PlatformFee {
|
82 |
+
return $this->platform_fee_factory->from_paypal_response( $fee_data );
|
83 |
+
},
|
84 |
+
$data->platform_fees
|
85 |
+
) : array();
|
86 |
+
|
87 |
+
return new SellerReceivableBreakdown(
|
88 |
+
$gross_amount,
|
89 |
+
$paypal_fee,
|
90 |
+
$paypal_fee_in_receivable_currency,
|
91 |
+
$net_amount,
|
92 |
+
$receivable_amount,
|
93 |
+
$exchange_rate,
|
94 |
+
$platform_fees
|
95 |
+
);
|
96 |
+
}
|
97 |
+
}
|
modules/ppcp-api-client/src/Repository/ApplicationContextRepository.php
CHANGED
@@ -74,7 +74,10 @@ class ApplicationContextRepository {
|
|
74 |
|
75 |
$parts = explode( '-', $locale );
|
76 |
if ( count( $parts ) === 3 ) {
|
77 |
-
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
return 'en';
|
74 |
|
75 |
$parts = explode( '-', $locale );
|
76 |
if ( count( $parts ) === 3 ) {
|
77 |
+
$ret = substr( $locale, 0, strrpos( $locale, '-' ) );
|
78 |
+
if ( false !== $ret ) {
|
79 |
+
return $ret;
|
80 |
+
}
|
81 |
}
|
82 |
|
83 |
return 'en';
|
modules/ppcp-api-client/src/Repository/CustomerRepository.php
CHANGED
@@ -45,6 +45,8 @@ class CustomerRepository {
|
|
45 |
}
|
46 |
|
47 |
$unique_id = substr( $this->prefix . strrev( uniqid() ), 0, self::CLIENT_ID_MAX_LENGTH );
|
|
|
|
|
48 |
WC()->session->set( 'ppcp_guest_customer_id', $unique_id );
|
49 |
|
50 |
return $unique_id;
|
45 |
}
|
46 |
|
47 |
$unique_id = substr( $this->prefix . strrev( uniqid() ), 0, self::CLIENT_ID_MAX_LENGTH );
|
48 |
+
assert( is_string( $unique_id ) );
|
49 |
+
|
50 |
WC()->session->set( 'ppcp_guest_customer_id', $unique_id );
|
51 |
|
52 |
return $unique_id;
|
modules/ppcp-api-client/src/Repository/PartnerReferralsData.php
CHANGED
@@ -15,34 +15,46 @@ use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
|
15 |
* Class PartnerReferralsData
|
16 |
*/
|
17 |
class PartnerReferralsData {
|
18 |
-
|
19 |
/**
|
20 |
-
* The
|
21 |
*
|
22 |
-
* @var
|
23 |
*/
|
24 |
-
private $
|
25 |
|
26 |
/**
|
27 |
-
* The
|
28 |
*
|
29 |
-
* @var
|
30 |
*/
|
31 |
-
private $
|
32 |
|
33 |
/**
|
34 |
* PartnerReferralsData constructor.
|
35 |
*
|
36 |
-
* @param string $merchant_email The email of the merchant.
|
37 |
* @param DccApplies $dcc_applies The DCC Applies helper.
|
38 |
*/
|
39 |
public function __construct(
|
40 |
-
string $merchant_email,
|
41 |
DccApplies $dcc_applies
|
42 |
) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
-
|
45 |
-
$this->dcc_applies = $dcc_applies;
|
46 |
}
|
47 |
|
48 |
/**
|
@@ -60,33 +72,26 @@ class PartnerReferralsData {
|
|
60 |
* @return array
|
61 |
*/
|
62 |
public function data(): array {
|
63 |
-
$data = $this->default_data();
|
64 |
-
return $data;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Returns the default data.
|
69 |
-
*
|
70 |
-
* @return array
|
71 |
-
*/
|
72 |
-
private function default_data(): array {
|
73 |
-
|
74 |
return array(
|
75 |
'partner_config_override' => array(
|
76 |
'partner_logo_url' => 'https://connect.woocommerce.com/images/woocommerce_logo.png',
|
|
|
|
|
|
|
77 |
'return_url' => apply_filters(
|
78 |
'woocommerce_paypal_payments_partner_config_override_return_url',
|
79 |
admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' )
|
80 |
),
|
|
|
|
|
|
|
81 |
'return_url_description' => apply_filters(
|
82 |
'woocommerce_paypal_payments_partner_config_override_return_url_description',
|
83 |
__( 'Return to your shop.', 'woocommerce-paypal-payments' )
|
84 |
),
|
85 |
'show_add_credit_card' => true,
|
86 |
),
|
87 |
-
'products' =>
|
88 |
-
$this->dcc_applies->for_country_currency() ? 'PPCP' : 'EXPRESS_CHECKOUT',
|
89 |
-
),
|
90 |
'legal_consents' => array(
|
91 |
array(
|
92 |
'type' => 'SHARE_DATA_CONSENT',
|
15 |
* Class PartnerReferralsData
|
16 |
*/
|
17 |
class PartnerReferralsData {
|
|
|
18 |
/**
|
19 |
+
* The DCC Applies Helper object.
|
20 |
*
|
21 |
+
* @var DccApplies
|
22 |
*/
|
23 |
+
private $dcc_applies;
|
24 |
|
25 |
/**
|
26 |
+
* The list of products ('PPCP', 'EXPRESS_CHECKOUT').
|
27 |
*
|
28 |
+
* @var string[]
|
29 |
*/
|
30 |
+
private $products;
|
31 |
|
32 |
/**
|
33 |
* PartnerReferralsData constructor.
|
34 |
*
|
|
|
35 |
* @param DccApplies $dcc_applies The DCC Applies helper.
|
36 |
*/
|
37 |
public function __construct(
|
|
|
38 |
DccApplies $dcc_applies
|
39 |
) {
|
40 |
+
$this->dcc_applies = $dcc_applies;
|
41 |
+
$this->products = array(
|
42 |
+
$this->dcc_applies->for_country_currency() ? 'PPCP' : 'EXPRESS_CHECKOUT',
|
43 |
+
);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Returns a new copy of this object with the given value set.
|
48 |
+
*
|
49 |
+
* @param string[] $products The list of products ('PPCP', 'EXPRESS_CHECKOUT').
|
50 |
+
* @return static
|
51 |
+
*/
|
52 |
+
public function with_products( array $products ): self {
|
53 |
+
$obj = clone $this;
|
54 |
+
|
55 |
+
$obj->products = $products;
|
56 |
|
57 |
+
return $obj;
|
|
|
58 |
}
|
59 |
|
60 |
/**
|
72 |
* @return array
|
73 |
*/
|
74 |
public function data(): array {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
return array(
|
76 |
'partner_config_override' => array(
|
77 |
'partner_logo_url' => 'https://connect.woocommerce.com/images/woocommerce_logo.png',
|
78 |
+
/**
|
79 |
+
* Returns the URL which will be opened at the end of onboarding.
|
80 |
+
*/
|
81 |
'return_url' => apply_filters(
|
82 |
'woocommerce_paypal_payments_partner_config_override_return_url',
|
83 |
admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' )
|
84 |
),
|
85 |
+
/**
|
86 |
+
* Returns the description of the URL which will be opened at the end of onboarding.
|
87 |
+
*/
|
88 |
'return_url_description' => apply_filters(
|
89 |
'woocommerce_paypal_payments_partner_config_override_return_url_description',
|
90 |
__( 'Return to your shop.', 'woocommerce-paypal-payments' )
|
91 |
),
|
92 |
'show_add_credit_card' => true,
|
93 |
),
|
94 |
+
'products' => $this->products,
|
|
|
|
|
95 |
'legal_consents' => array(
|
96 |
array(
|
97 |
'type' => 'SHARE_DATA_CONSENT',
|
modules/ppcp-button/assets/js/button.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{"use strict";var __webpack_modules__={964:()=>{eval("\n;// CONCATENATED MODULE: ./resources/js/modules/ErrorHandler.js\nclass ErrorHandler {\n constructor(genericErrorText) {\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\n this.clear();\n this.message(this.genericErrorText);\n }\n\n appendPreparedErrorMessageElement(errorMessageElement) {\n if (this.messagesList === null) {\n this.prepareMessagesList();\n }\n\n this.messagesList.replaceWith(errorMessageElement);\n }\n\n message(text, persist = false) {\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 jQuery.scroll_to_notices(jQuery('.woocommerce-notices-wrapper'));\n }\n\n prepareMessagesList() {\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 const li = document.createElement('li');\n li.innerHTML = message;\n return li;\n }\n\n sanitize(text) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = text;\n return textarea.value.replace('Error: ', '');\n }\n\n clear() {\n if (this.messagesList === null) {\n return;\n }\n\n this.messagesList.innerHTML = '';\n }\n\n}\n\n/* harmony default export */ const modules_ErrorHandler = (ErrorHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/OnApproveHandler/onApproveForContinue.js\nconst 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 funding_source: window.ppcpFundingSource\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\n location.href = context.config.redirect;\n });\n };\n};\n\n/* harmony default export */ const onApproveForContinue = (onApprove);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/PayerData.js\nconst payerData = () => {\n const payer = PayPalCommerceGateway.payer;\n\n if (!payer) {\n return null;\n }\n\n const phone = document.querySelector('#billing_phone') || typeof payer.phone !== 'undefined' ? {\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\n return payerData;\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/CartActionHandler.js\n\n\n\nclass CartActionHandler {\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' ? 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\n return data.data.id;\n });\n };\n\n return {\n createOrder,\n onApprove: onApproveForContinue(this, this.errorHandler),\n onError: error => {\n this.errorHandler.genericError();\n }\n };\n }\n\n}\n\n/* harmony default export */ const ActionHandler_CartActionHandler = (CartActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/MiniCartBootstap.js\n\n\n\nclass MiniCartBootstap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.actionHandler = null;\n }\n\n init() {\n this.actionHandler = new ActionHandler_CartActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.render();\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) !== null || document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.renderer.render(this.gateway.button.mini_cart_wrapper, this.gateway.hosted_fields.mini_cart_wrapper, this.actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_MiniCartBootstap = (MiniCartBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/UpdateCart.js\n\n\nclass UpdateCart {\n constructor(endpoint, nonce) {\n this.endpoint = endpoint;\n this.nonce = nonce;\n }\n /**\n *\n * @param onResolve\n * @param {Product[]} products\n * @returns {Promise<unknown>}\n */\n\n\n update(onResolve, products) {\n return new Promise((resolve, reject) => {\n fetch(this.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.nonce,\n products\n })\n }).then(result => {\n return result.json();\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}\n\n/* harmony default export */ const Helper_UpdateCart = (UpdateCart);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/ButtonsToggleListener.js\n/**\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 */\nclass ButtonsToggleListener {\n constructor(element, showCallback, hideCallback) {\n this.element = element;\n this.showCallback = showCallback;\n this.hideCallback = hideCallback;\n this.observer = null;\n }\n\n init() {\n const config = {\n attributes: true\n };\n\n const callback = () => {\n if (this.element.classList.contains('disabled')) {\n this.hideCallback();\n return;\n }\n\n this.showCallback();\n };\n\n this.observer = new MutationObserver(callback);\n this.observer.observe(this.element, config);\n callback();\n }\n\n disconnect() {\n this.observer.disconnect();\n }\n\n}\n\n/* harmony default export */ const Helper_ButtonsToggleListener = (ButtonsToggleListener);\n;// CONCATENATED MODULE: ./resources/js/modules/Entity/Product.js\nclass Product {\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}\n\n/* harmony default export */ const Entity_Product = (Product);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/SingleProductActionHandler.js\n\n\n\n\n\nclass SingleProductActionHandler {\n constructor(config, updateCart, showButtonCallback, hideButtonCallback, formElement, errorHandler) {\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 if (this.hasVariations()) {\n const observer = new Helper_ButtonsToggleListener(this.formElement.querySelector('.single_add_to_cart_button'), this.showButtonCallback, this.hideButtonCallback);\n observer.init();\n }\n\n return {\n createOrder: this.createOrder(),\n onApprove: onApproveForContinue(this, this.errorHandler),\n onError: error => {\n this.errorHandler.genericError();\n }\n };\n }\n\n createOrder() {\n var getProducts = null;\n\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 Entity_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\n const elementName = element.getAttribute('name').match(/quantity\\[([\\d]*)\\]/);\n\n if (elementName.length !== 2) {\n return;\n }\n\n const id = parseInt(elementName[1]);\n const quantity = parseInt(element.value);\n products.push(new Entity_Product(id, quantity, null));\n });\n return products;\n };\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' ? 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\n return data.data.id;\n });\n };\n\n const promise = this.updateCart.update(onResolve, getProducts());\n return promise;\n };\n\n return createOrder;\n }\n\n variations() {\n if (!this.hasVariations()) {\n return null;\n }\n\n const attributes = [...this.formElement.querySelectorAll(\"[name^='attribute_']\")].map(element => {\n return {\n value: element.value,\n name: element.name\n };\n });\n return attributes;\n }\n\n hasVariations() {\n return this.formElement.classList.contains('variations_form');\n }\n\n isGroupedProduct() {\n return this.formElement.classList.contains('grouped_form');\n }\n\n}\n\n/* harmony default export */ const ActionHandler_SingleProductActionHandler = (SingleProductActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/SingleProductBootstap.js\n\n\n\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 ActionHandler_SingleProductActionHandler(this.gateway, new Helper_UpdateCart(this.gateway.ajax.change_cart.endpoint, this.gateway.ajax.change_cart.nonce), () => {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper);\n let priceText = \"0\";\n\n if (document.querySelector('form.cart ins .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart ins .woocommerce-Price-amount').innerText;\n } else if (document.querySelector('form.cart .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;\n }\n\n const amount = parseInt(priceText.replace(/([^\\d,\\.\\s]*)/g, ''));\n this.messages.renderWithAmount(amount);\n }, () => {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n }, document.querySelector('form.cart'), new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_SingleProductBootstap = (SingleProductBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/CartBootstap.js\n\n\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 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) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n const actionHandler = new ActionHandler_CartActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const CartBootstap = (CartBootstrap);\n;// CONCATENATED MODULE: ./resources/js/modules/OnApproveHandler/onApproveForPayNow.js\nconst onApproveForPayNow_onApprove = (context, errorHandler, spinner) => {\n return (data, actions) => {\n spinner.block();\n errorHandler.clear();\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 funding_source: window.ppcpFundingSource\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n spinner.unblock();\n\n if (!data.success) {\n if (data.data.code === 100) {\n errorHandler.message(data.data.message);\n } else {\n errorHandler.genericError();\n }\n\n if (typeof actions !== 'undefined' && typeof actions.restart !== 'undefined') {\n return actions.restart();\n }\n\n throw new Error(data.data.message);\n }\n\n document.querySelector('#place_order').click();\n });\n };\n};\n\n/* harmony default export */ const onApproveForPayNow = (onApproveForPayNow_onApprove);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/CheckoutActionHandler.js\n\n\n\nclass CheckoutActionHandler {\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\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ? this.config.bn_codes[this.config.context] : '';\n const errorHandler = this.errorHandler;\n const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review';\n const formValues = jQuery(formSelector).serialize();\n const createaccount = jQuery('#createaccount').is(\":checked\") ? true : false;\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(); //handle both messages sent from Woocommerce (data.messages) and this plugin (data.data.message)\n\n if (typeof data.messages !== 'undefined') {\n const domParser = new DOMParser();\n errorHandler.appendPreparedErrorMessageElement(domParser.parseFromString(data.messages, 'text/html').querySelector('ul'));\n } else {\n errorHandler.message(data.data.message, true);\n }\n\n return;\n }\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\n return {\n createOrder,\n onApprove: onApproveForPayNow(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}\n\n/* harmony default export */ const ActionHandler_CheckoutActionHandler = (CheckoutActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Hiding.js\nconst getElement = selectorOrElement => {\n if (typeof selectorOrElement === 'string') {\n return document.querySelector(selectorOrElement);\n }\n\n return selectorOrElement;\n};\n\nconst isVisible = element => {\n return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n};\nconst setVisible = (selectorOrElement, show, important = false) => {\n const element = getElement(selectorOrElement);\n\n if (!element) {\n return;\n }\n\n const currentValue = element.style.getPropertyValue('display');\n\n if (!show) {\n if (currentValue === 'none') {\n return;\n }\n\n element.style.setProperty('display', 'none', important ? 'important' : '');\n } else {\n if (currentValue === 'none') {\n element.style.removeProperty('display');\n } // still not visible (if something else added display: none in CSS)\n\n\n if (!isVisible(element)) {\n element.style.setProperty('display', 'block');\n }\n }\n};\nconst hide = (selectorOrElement, important = false) => {\n setVisible(selectorOrElement, false, important);\n};\nconst show = selectorOrElement => {\n setVisible(selectorOrElement, true);\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/CheckoutBootstap.js\n\n\n\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 this.standardOrderButtonSelector = '#place_order';\n this.buttonChangeObserver = new MutationObserver(el => {\n this.updateUi();\n });\n }\n\n init() {\n this.render(); // Unselect saved card.\n // WC saves form values, so with our current UI it would be a bit weird\n // if the user paid with saved, then after some time tries to pay again,\n // but wants to enter a new card, and to do that they have to choose “Select payment” in the list.\n\n jQuery('#saved-credit-card').val(jQuery('#saved-credit-card option:first').val());\n jQuery(document.body).on('updated_checkout', () => {\n this.render();\n });\n jQuery(document.body).on('updated_checkout payment_method_selected', () => {\n this.updateUi();\n });\n jQuery(document).on('hosted_fields_loaded', () => {\n jQuery('#saved-credit-card').on('change', () => {\n this.updateUi();\n });\n });\n this.updateUi();\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\n if (document.querySelector(this.gateway.hosted_fields.wrapper + '>div')) {\n document.querySelector(this.gateway.hosted_fields.wrapper + '>div').setAttribute('style', '');\n }\n\n const actionHandler = new ActionHandler_CheckoutActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic), this.spinner);\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n this.buttonChangeObserver.observe(document.querySelector(this.standardOrderButtonSelector), {\n attributes: true\n });\n }\n\n updateUi() {\n const currentPaymentMethod = this.currentPaymentMethod();\n const isPaypal = currentPaymentMethod === 'ppcp-gateway';\n const isCard = currentPaymentMethod === 'ppcp-credit-card-gateway';\n const isSavedCard = isCard && this.isSavedCardSelected();\n const isNotOurGateway = !isPaypal && !isCard;\n setVisible(this.standardOrderButtonSelector, isNotOurGateway || isSavedCard, true);\n setVisible(this.gateway.button.wrapper, isPaypal);\n setVisible(this.gateway.messages.wrapper, isPaypal);\n setVisible(this.gateway.hosted_fields.wrapper, isCard && !isSavedCard);\n\n if (isPaypal) {\n this.messages.render();\n }\n\n if (isCard) {\n if (isSavedCard) {\n this.disableCreditCardFields();\n } else {\n this.enableCreditCardFields();\n }\n }\n }\n\n disableCreditCardFields() {\n jQuery('label[for=\"ppcp-credit-card-gateway-card-number\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-number').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-expiry\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-expiry').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-cvc\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-cvc').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"vault\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').attr(\"disabled\", true);\n this.renderer.disableCreditCardFields();\n }\n\n enableCreditCardFields() {\n jQuery('label[for=\"ppcp-credit-card-gateway-card-number\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-number').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-expiry\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-expiry').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-cvc\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-cvc').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"vault\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').attr(\"disabled\", false);\n this.renderer.enableCreditCardFields();\n }\n\n currentPaymentMethod() {\n return jQuery('input[name=\"payment_method\"]:checked').val();\n }\n\n isSavedCardSelected() {\n const savedCardList = jQuery('#saved-credit-card');\n return savedCardList.length && savedCardList.val() !== '';\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_CheckoutBootstap = (CheckoutBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/PayNowBootstrap.js\n\n\nclass PayNowBootstrap extends ContextBootstrap_CheckoutBootstap {\n constructor(gateway, renderer, messages, spinner) {\n super(gateway, renderer, messages, spinner);\n }\n\n updateUi() {\n const urlParams = new URLSearchParams(window.location.search);\n\n if (urlParams.has('change_payment_method')) {\n return;\n }\n\n super.updateUi();\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_PayNowBootstrap = (PayNowBootstrap);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/Renderer.js\nclass Renderer {\n constructor(creditCardRenderer, defaultConfig, onSmartButtonClick) {\n this.defaultConfig = defaultConfig;\n this.creditCardRenderer = creditCardRenderer;\n this.onSmartButtonClick = onSmartButtonClick;\n }\n\n render(wrapper, hostedFieldsWrapper, contextConfig) {\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 onClick: this.onSmartButtonClick\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\n if (!domElement) {\n return false;\n }\n\n domElement.style.display = 'none';\n return true;\n }\n\n showButtons(element) {\n const domElement = document.querySelector(element);\n\n if (!domElement) {\n return false;\n }\n\n domElement.style.display = 'block';\n return true;\n }\n\n disableCreditCardFields() {\n this.creditCardRenderer.disableFields();\n }\n\n enableCreditCardFields() {\n this.creditCardRenderer.enableFields();\n }\n\n}\n\n/* harmony default export */ const Renderer_Renderer = (Renderer);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/DccInputFactory.js\nconst 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\n newElement.style.setProperty(prop, '' + styles[prop]);\n });\n return newElement;\n};\n\n/* harmony default export */ const DccInputFactory = (dccInputFactory);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/CreditCardRenderer.js\n\n\nclass CreditCardRenderer {\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 this.currentHostedFieldsInstance = null;\n this.formSubmissionSubscribed = false;\n }\n\n render(wrapper, contextConfig) {\n if (this.defaultConfig.context !== 'checkout' && this.defaultConfig.context !== 'pay-now' || wrapper === null || document.querySelector(wrapper) === null) {\n return;\n }\n\n if (typeof paypal.HostedFields === 'undefined' || !paypal.HostedFields.isEligible()) {\n const wrapperElement = document.querySelector(wrapper);\n wrapperElement.parentNode.removeChild(wrapperElement);\n return;\n }\n\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.teardown().catch(err => console.error(`Hosted fields teardown error: ${err}`));\n this.currentHostedFieldsInstance = null;\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 const hideDccGateway = document.querySelector('#ppcp-hide-dcc');\n\n if (hideDccGateway) {\n hideDccGateway.parentNode.removeChild(hideDccGateway);\n }\n\n const cardNumberField = document.querySelector('#ppcp-credit-card-gateway-card-number');\n const stylesRaw = window.getComputedStyle(cardNumberField);\n let styles = {};\n Object.values(stylesRaw).forEach(prop => {\n if (!stylesRaw[prop]) {\n return;\n }\n\n styles[prop] = '' + stylesRaw[prop];\n });\n const cardNumber = DccInputFactory(cardNumberField);\n cardNumberField.parentNode.replaceChild(cardNumber, cardNumberField);\n const cardExpiryField = document.querySelector('#ppcp-credit-card-gateway-card-expiry');\n const cardExpiry = DccInputFactory(cardExpiryField);\n cardExpiryField.parentNode.replaceChild(cardExpiry, cardExpiryField);\n const cardCodeField = document.querySelector('#ppcp-credit-card-gateway-card-cvc');\n const cardCode = DccInputFactory(cardCodeField);\n cardCodeField.parentNode.replaceChild(cardCode, cardCodeField);\n gateWayBox.style.display = oldDisplayStyle;\n const formWrapper = '.payment_box payment_method_ppcp-credit-card-gateway';\n\n if (this.defaultConfig.enforce_vault && document.querySelector(formWrapper + ' .ppcp-credit-card-vault')) {\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').checked = true;\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').setAttribute('disabled', true);\n }\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 document.dispatchEvent(new CustomEvent(\"hosted_fields_loaded\"));\n this.currentHostedFieldsInstance = hostedFields;\n hostedFields.on('inputSubmitRequest', () => {\n this._submit(contextConfig);\n });\n hostedFields.on('cardTypeChange', event => {\n if (!event.cards.length) {\n this.cardValid = false;\n return;\n }\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 if (!this.formSubmissionSubscribed) {\n document.querySelector(wrapper + ' button').addEventListener('click', event => {\n event.preventDefault();\n\n this._submit(contextConfig);\n });\n this.formSubmissionSubscribed = true;\n }\n });\n document.querySelector('#payment_method_ppcp-credit-card-gateway').addEventListener('click', () => {\n document.querySelector('label[for=ppcp-credit-card-gateway-card-number]').click();\n });\n }\n\n disableFields() {\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.setAttribute({\n field: 'number',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.setAttribute({\n field: 'cvv',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.setAttribute({\n field: 'expirationDate',\n attribute: 'disabled'\n });\n }\n }\n\n enableFields() {\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'number',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'cvv',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'expirationDate',\n attribute: 'disabled'\n });\n }\n }\n\n _submit(contextConfig) {\n this.spinner.block();\n this.errorHandler.clear();\n\n if (this.formValid && this.cardValid) {\n const save_card = this.defaultConfig.save_card ? true : false;\n let vault = document.getElementById('ppcp-credit-card-vault') ? document.getElementById('ppcp-credit-card-vault').checked : save_card;\n\n if (this.defaultConfig.enforce_vault) {\n vault = true;\n }\n\n const contingency = this.defaultConfig.hosted_fields.contingency;\n const hostedFieldsData = {\n vault: vault\n };\n\n if (contingency !== 'NO_3D_SECURE') {\n hostedFieldsData.contingencies = [contingency];\n }\n\n if (this.defaultConfig.payer) {\n hostedFieldsData.cardholderName = this.defaultConfig.payer.name.given_name + ' ' + this.defaultConfig.payer.name.surname;\n }\n\n if (!hostedFieldsData.cardholderName) {\n const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value : '';\n const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value : '';\n\n if (!firstName || !lastName) {\n this.spinner.unblock();\n this.errorHandler.message(this.defaultConfig.hosted_fields.labels.cardholder_name_required);\n return;\n }\n\n hostedFieldsData.cardholderName = firstName + ' ' + lastName;\n }\n\n this.currentHostedFieldsInstance.submit(hostedFieldsData).then(payload => {\n payload.orderID = payload.orderId;\n this.spinner.unblock();\n return contextConfig.onApprove(payload);\n }).catch(err => {\n console.error(err);\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\n}\n\n/* harmony default export */ const Renderer_CreditCardRenderer = (CreditCardRenderer);\n;// CONCATENATED MODULE: ./resources/js/modules/DataClientIdAttributeHandler.js\nconst storageKey = 'ppcp-data-client-id';\n\nconst validateToken = (token, user) => {\n if (!token) {\n return false;\n }\n\n if (token.user !== user) {\n return false;\n }\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\n if (validateToken(token, user)) {\n return token.token;\n }\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\n if (!isValid) {\n return;\n }\n\n storeToken(data);\n script.setAttribute('data-client-token', data.token);\n document.body.append(script);\n });\n};\n\n/* harmony default export */ const DataClientIdAttributeHandler = (dataClientIdAttributeHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/MessageRenderer.js\nclass MessageRenderer {\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 if (!this.shouldRender()) {\n return;\n }\n\n const newWrapper = document.createElement('div');\n newWrapper.setAttribute('id', this.config.wrapper.replace('#', ''));\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 if (typeof paypal.Messages === 'undefined' || typeof this.config.wrapper === 'undefined') {\n return false;\n }\n\n if (!document.querySelector(this.config.wrapper)) {\n return false;\n }\n\n return true;\n }\n\n}\n\n/* harmony default export */ const Renderer_MessageRenderer = (MessageRenderer);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Spinner.js\nclass Spinner {\n constructor() {\n this.target = 'form.woocommerce-checkout';\n }\n\n setTarget(target) {\n this.target = target;\n }\n\n block() {\n jQuery(this.target).block({\n message: null,\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n\n unblock() {\n jQuery(this.target).unblock();\n }\n\n}\n\n/* harmony default export */ const Helper_Spinner = (Spinner);\n;// CONCATENATED MODULE: ./resources/js/button.js\n\n\n\n\n\n\n\n\n\n\n\n\nconst bootstrap = () => {\n const errorHandler = new modules_ErrorHandler(PayPalCommerceGateway.labels.error.generic);\n const spinner = new Helper_Spinner();\n const creditCardRenderer = new Renderer_CreditCardRenderer(PayPalCommerceGateway, errorHandler, spinner);\n\n const onSmartButtonClick = data => {\n window.ppcpFundingSource = data.fundingSource;\n };\n\n const renderer = new Renderer_Renderer(creditCardRenderer, PayPalCommerceGateway, onSmartButtonClick);\n const messageRenderer = new Renderer_MessageRenderer(PayPalCommerceGateway.messages);\n const context = PayPalCommerceGateway.context;\n\n if (context === 'mini-cart' || context === 'product') {\n if (PayPalCommerceGateway.mini_cart_buttons_enabled === '1') {\n const miniCartBootstrap = new ContextBootstrap_MiniCartBootstap(PayPalCommerceGateway, renderer);\n miniCartBootstrap.init();\n }\n }\n\n if (context === 'product' && PayPalCommerceGateway.single_product_buttons_enabled === '1') {\n const singleProductBootstrap = new ContextBootstrap_SingleProductBootstap(PayPalCommerceGateway, renderer, messageRenderer);\n singleProductBootstrap.init();\n }\n\n if (context === 'cart') {\n const cartBootstrap = new CartBootstap(PayPalCommerceGateway, renderer);\n cartBootstrap.init();\n }\n\n if (context === 'checkout') {\n const checkoutBootstap = new ContextBootstrap_CheckoutBootstap(PayPalCommerceGateway, renderer, messageRenderer, spinner);\n checkoutBootstap.init();\n }\n\n if (context === 'pay-now') {\n const payNowBootstrap = new ContextBootstrap_PayNowBootstrap(PayPalCommerceGateway, renderer, messageRenderer, spinner);\n payNowBootstrap.init();\n }\n\n if (context !== 'checkout') {\n messageRenderer.render();\n }\n};\n\ndocument.addEventListener('DOMContentLoaded', () => {\n if (!typeof PayPalCommerceGateway) {\n console.error('PayPal button could not be configured.');\n return;\n }\n\n if (PayPalCommerceGateway.context !== 'checkout' && PayPalCommerceGateway.data_client_id.user === 0 && PayPalCommerceGateway.data_client_id.has_subscriptions) {\n return;\n }\n\n const script = document.createElement('script');\n script.addEventListener('load', event => {\n bootstrap();\n });\n script.setAttribute('src', PayPalCommerceGateway.button.url);\n Object.entries(PayPalCommerceGateway.script_attributes).forEach(keyValue => {\n script.setAttribute(keyValue[0], keyValue[1]);\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});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTY0LmpzIiwibWFwcGluZ3MiOiI7O0FBQUEsTUFBTUEsWUFBTixDQUFtQjtBQUVmQyxFQUFBQSxXQUFXLENBQUNDLGdCQUFELEVBQ1g7QUFDSSxTQUFLQSxnQkFBTCxHQUF3QkEsZ0JBQXhCO0FBQ0EsU0FBS0MsT0FBTCxHQUFlQyxRQUFRLENBQUNDLGFBQVQsQ0FBdUIsOEJBQXZCLENBQWY7QUFDQSxTQUFLQyxZQUFMLEdBQW9CRixRQUFRLENBQUNDLGFBQVQsQ0FBdUIsc0JBQXZCLENBQXBCO0FBQ0g7O0FBRURFLEVBQUFBLFlBQVksR0FBRztBQUNYLFFBQUksS0FBS0osT0FBTCxDQUFhSyxTQUFiLENBQXVCQyxRQUF2QixDQUFnQyxjQUFoQyxDQUFKLEVBQXFEO0FBQ2pEO0FBQ0g7O0FBQ0QsU0FBS0MsS0FBTDtBQUNBLFNBQUtDLE9BQUwsQ0FBYSxLQUFLVCxnQkFBbEI7QUFDSDs7QUFFRFUsRUFBQUEsaUNBQWlDLENBQUNDLG1CQUFELEVBQ2pDO0FBQ0ksUUFBRyxLQUFLUCxZQUFMLEtBQXNCLElBQXpCLEVBQStCO0FBQzNCLFdBQUtRLG1CQUFMO0FBQ0g7O0FBRUQsU0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MubWVzc2FnZXNMaXN0LmlubmVySFRNTCA9ICcnO1xuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgRXJyb3JIYW5kbGVyO1xuIiwiY29uc3Qgb25BcHByb3ZlID0gKGNvbnRleHQsIGVycm9ySGFuZGxlcikgPT4ge1xuICAgIHJldHVybiAoZGF0YSwgYWN0aW9ucykgPT4ge1xuICAgICAgICByZXR1cm4gZmV0Y2goY29udGV4dC5jb25maWcuYWpheC5hcHByb3ZlX29yZGVyLmVuZHBvaW50LCB7XG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICBub25jZTogY29udGV4dC5jb25maWcuYWpheC5hcHByb3ZlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgIG9yZGVyX2lkOmRhdGEub3JkZXJJRCxcbiAgICAgICAgICAgICAgICBmdW5kaW5nX3NvdXJjZTogd2luZG93LnBwY3BGdW5kaW5nU291cmNlLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgfSkudGhlbigocmVzKT0+e1xuICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgIH0pLnRoZW4oKGRhdGEpPT57XG4gICAgICAgICAgICBpZiAoIWRhdGEuc3VjY2Vzcykge1xuICAgICAgICAgICAgICAgIGVycm9ySGFuZGxlci5nZW5lcmljRXJyb3IoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYWN0aW9ucy5yZXN0YXJ0KCkuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLmdlbmVyaWNFcnJvcigpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IGNvbnRleHQuY29uZmlnLnJlZGlyZWN0O1xuICAgICAgICB9KTtcblxuICAgIH1cbn1cblxuZXhwb3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VzW3RoaXMuY29uZmlnLmNvbnRleHRdICE9PSAndW5kZWZpbmVkJyA/XG4gICAgICAgICAgICAgICAgdGhpcy5jb25maWcuYm5fY29kZXNbdGhpcy5jb25maWcuY29udGV4dF0gOiAnJztcbiAgICAgICAgICAgIHJldHVybiBmZXRjaCh0aGlzLmNvbmZpZy5hamF4LmNyZWF0ZV9vcmRlci5lbmRwb2ludCwge1xuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgbm9uY2U6IHRoaXMuY29uZmlnLmFqYXguY3JlYXRlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgICAgICBwdXJjaGFzZV91bml0czogW10sXG4gICAgICAgICAgICAgICAgICAgIGJuX2NvZGU6Ym5Db2RlLFxuICAgICAgICAgICAgICAgICAgICBwYXllcixcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dDp0aGlzLmNvbmZpZy5jb250ZXh0XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uKHJlcykge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpO1xuICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoZGF0YS5kYXRhLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZGF0YS5kYXRhLmlkO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNyZWF0ZU9yZGVyLFxuICAgICAgICAgICAgb25BcHBy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ICogQHJldHVybnMge1Byb21pc2U8dW5rbm93bj59XG4gICAgICovXG4gICAgdXBkYXRlKG9uUmVzb2x2ZSwgcHJvZHVjdHMpXG4gICAge1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgZmV0Y2goXG4gICAgICAgICAgICAgICAgdGhpcy5lbmRwb2ludCxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBub25jZTogdGhpcy5ub25jZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y3RzLFxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICkudGhlbihcbiAgICAgICAgICAgICAgICAocmVzdWx0KSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdC5qc29uKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKS50aGVuKChyZXN1bHQpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoISByZXN1bHQuc3VjY2Vzcykge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QocmVzdWx0LmRhdGEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc29sdmVkID0gb25SZXNvbHZlKHJlc3VsdC5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXNvbHZlZCk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgfSk7XG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBVcGRhdGVDYXJ0OyIsIi8qKlxuICogV2hlbiB5b3UgY2FuJ3QgYWRkIHNvbWV0aGluZy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AgICAgICAgICBvbkVycm9yOiAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmVycm9ySGFuZGxlci5nZW5lcmljRXJyb3IoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNyZWF0ZU9yZGVyKClcbiAgICB7XG4gICAgICAgIHZhciBnZXRQcm9kdWN0cyA9IG51bGw7XG4gICAgICAgIGlmICghIHRoaXMuaXNHcm91cGVkUHJvZHVjdCgpICkge1xuICAgICAgICAgICAgZ2V0UHJvZHVjdHMgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgaWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdbbmFtZT1cImFkZC10by1jYXJ0XCJdJykudmFsdWU7XG4gICAgICAgICAgICAgICAgY29uc3QgcXR5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignW25hbWU9XCJxdWFudGl0eVwiXScpLnZhbHVlO1xuICAgICAgICAgICAgICAgIGNvbnN0IHZhcmlhdGlvbnMgPSB0aGlzLnZhcmlhdGlvbnMoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW25ldyBQcm9kdWN0KGlkLCBxdHksIHZhcmlhdGlvbnMpXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGdldFByb2R1Y3RzID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHByb2R1Y3RzID0gW107XG4gICAgICAgICAgICAgICAgdGhpcy5mb3JtRWxlbWVudC5xdWVyeVNlbGVjdG9yQWxsKCdpbnB1dFt0eXBlPVwibnVtYmVyXCJdJykuZm9yRWFjaCgoZWxlbWVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoISBlbGVtZW50LnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudE5hbWUgPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgnbmFtZScpLm1hdGNoKC9xdWFudGl0eVxcWyhbXFxkXSopXFxdLyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50TmFtZS5sZW5ndGggIT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBpZCA9IHBhcnNlSW50KGVsZW1lbnROYW1lWzFdKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcXVhbnRpdHkgPSBwYXJzZUludChlbGVtZW50LnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgcHJvZHVjdHMucHVzaChuZXcgUHJvZHVjdChpZCwgcXVhbnRpdHksIG51bGwpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIHJldHVybiBwcm9kdWN0cztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjb25zdCBjcmVhdGVPcmRlciA9IChkYXRhLCBhY3Rpb25zKSA9PiB7XG4gICAgICAgICAgICB0aGlzLmVycm9ySGFuZGxlci5jbGVhcigpO1xuXG4gICAgICAgICAgICBjb25zdCBvblJlc29sdmUgPSAocHVyY2hhc2VfdW5pdHMpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXllciA9IHBheWVyRGF0YSgpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGJuQ29kZSA9IHR5cGVvZiB0aGlzLmNvbmZpZy5ibl9jb2Rlc1t0aGlzLmNvbmZpZy5jb250ZXh0XSAhPT0gJ3VuZGVmaW5lZCcgP1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZy5ibl9jb2Rlc1t0aGlzLmNvbmZpZy5jb250ZXh0XSA6ICcnO1xuICAgICAgICAgICAgICAgIHJldHVybiBmZXRjaCh0aGlzLmNvbmZpZy5hamF4LmNyZWF0ZV9vcmRlci5lbmRwb2ludCwge1xuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9uY2U6IHRoaXMuY29uZmlnLmFqYXguY3JlYXRlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcHVyY2hhc2VfdW5pdHMsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXllcixcbiAgICAgICAgICAgICAgICAgICAgICAgIGJuX2NvZGU6Ym5Db2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dDp0aGlzLmNvbmZpZy5jb250ZXh0XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpO1xuICAgICAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcihkYXRhLmRhdGEubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRhdGEuZGF0YS5pZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNvbnN0IHByb21pc2UgPSB0aGlzLnVwZGF0ZUNhcnQudXBkYXRlKG9uUmVzb2x2ZSwgZ2V0UHJvZHVjdHMoKSk7XG4gICAgICAgICAgICByZXR1cm4gcHJvbWlzZTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIGNyZWF0Z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ICAgICAgICksXG4gICAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zaG93QnV0dG9ucyh0aGlzLmdhdGV3YXkuYnV0dG9uLndyYXBwZXIpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2hvd0J1dHRvbnModGhpcy5nYXRld2F5Lmhvc3RlZF9maWVsZHMud3JhcHBlcik7XG4gICAgICAgICAgICAgICAgbGV0IHByaWNlVGV4dCA9IFwiMFwiO1xuICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdmb3JtLmNhcnQgaW5zIC53b29jb21tZXJjZS1QcmljZS1hbW91bnQnKSkge1xuICAgICAgICAgICAgICAgICAgICBwcmljZVRleHQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdmb3JtLmNhcnQgaW5zIC53b29jb21tZXJjZS1QcmljZS1hbW91bnQnKS5pbm5lclRleHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2Zvcm0uY2FydCAud29vY29tbWVyY2UtUHJpY2UtYW1vdW50JykpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpY2VUZXh0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignZm9ybS5jYXJ0IC53b29jb21tZXJjZS1QcmljZS1hbW91bnQnKS5pbm5lclRleHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IGFtb3VudCA9IHBhcnNlSW50KHByaWNlVGV4dC5yZXBsYWNlKC8oW15cXGQsXFwuXFxzXSopL2csICcnKSk7XG4gICAgICAgICAgICAgICAgdGhpcy5tZXNzYWdlcy5yZW5kZXJXaXRoQW1vdW50KGFtb3VudClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW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bm5lcikgPT4ge1xuICAgIHJldHVybiAoZGF0YSwgYWN0aW9ucykgPT4ge1xuICAgICAgICBzcGlubmVyLmJsb2NrKCk7XG4gICAgICAgIGVycm9ySGFuZGxlci5jbGVhcigpO1xuXG4gICAgICAgIHJldHVybiBmZXRjaChjb250ZXh0LmNvbmZpZy5hamF4LmFwcHJvdmVfb3JkZXIuZW5kcG9pbnQsIHtcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgIG5vbmNlOiBjb250ZXh0LmNvbmZpZy5hamF4LmFwcHJvdmVfb3JkZXIubm9uY2UsXG4gICAgICAgICAgICAgICAgb3JkZXJfaWQ6ZGF0YS5vcmRlcklELFxuICAgICAgICAgICAgICAgIGZ1bmRpbmdfc291cmNlOiB3aW5kb3cucHBjcEZ1bmRpbmdTb3VyY2UsXG4gICAgICAgICAgICB9KVxuICAgICAgICB9KS50aGVuKChyZXMpPT57XG4gICAgICAgICAgICByZXR1cm4gcmVzLmpzb24oKTtcbiAgICAgICAgfSkudGhlbigoZGF0YSk9PntcbiAgICAgICAgICAgIHNwaW5uZXIudW5ibG9jaygpO1xuICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5kYXRhLmNvZGUgPT09IDEwMCkge1xuICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIubWVzc2FnZShkYXRhLmRhdGEubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLmdlbmVyaWNFcnJvcigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGFjdGlvbnMgIT09ICd1bmRlZmluZWQnICYmIHR5cGVvZiBhY3Rpb25zLnJlc3RhcnQgIT09ICd1bmRlZm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6IGNyZWF0ZWFjY291bnRcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgc3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgICAgIC8vaGFuZGxlIGJvdGggbWVzc2FnZXMgc2VudCBmcm9tIFdvb2NvbW1lcmNlIChkYXRhLm1lc3NhZ2VzKSBhbmQgdGhpcyBwbHVnaW4gKGRhdGEuZGF0YS5tZXNzYWdlKVxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mKGRhdGEubWVzc2FnZXMpICE9PSAndW5kZWZpbmVkJyApXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRvbVBhcnNlciA9IG5ldyBET01QYXJzZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9ySGFuZGxlci5hcHBlbmRQcmVwYXJlZEVycm9yTWVzc2FnZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tUGFyc2VyLnBhcnNlRnJvbVN0cmluZyhkYXRhLm1lc3NhZ2VzLCAndGV4dC9odG1sJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnF1ZXJ5U2VsZWN0b3IoJ3VsJylcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIubWVzc2FnZShkYXRhLmRhdGEubWVzc2FnZSwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IGlucHV0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaW5wdXQnKTtcbiAgICAgICAgICAgICAgICBpbnB1dC5zZXRBdHRyaWJ1dGUoJ3R5cGUnLCAnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgaW5wdXQuc2V0QXR0cmlidXRlKCduYW1lJywgJ3BwY3AtcmVzdW1lLW9yZGVyJyk7XG4gICAgICAgICAgICAgICAgaW5wdXQuc2V0QXR0cmlidXRlKCd2YWx1ZScsIGRhdGEuZGF0YS5wdXJjaGFzZV91bml0c1swXS5jdXN0b21faWQpO1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoZm9ybVNlbGVjdG9yKS5hcHBlbmQoaW5wdXQpO1xuICAgICAgICAgICAgICAgIHJldHVybiBkYXRhLmRhdGEuaWQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY3JlYXRlT3JkZXIsXG4gICAgICAgICAgICBvbkFwcHJvdmU6b25BcHByb3ZlKHRoaXMsIHRoaXMuZXJyb3JIYW5kbGVyLCB0aGlzLnNwaW5uZXIpLFxuICAgICAgICAgICAgb25DYW5jZWw6ICgpID0+IHtcbiAgICAgICAgICAgICAgICBzcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvbkVycm9yOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5lcnJvckhhbmRsZXIuZ2VuZXJpY0Vycm9yKCk7XG4gICAgICAgICAgICAgICAgc3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IENoZWNrb3V0QWN0aW9uSGFuZGxlcjtcbiIsImNvbnN0IGdldEV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A9IHRydWU7XG4gICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGZvcm1XcmFwcGVyICsgJyAucHBjcC1jcmVkaXQtY2FyZC12YXVsdCcpLnNldEF0dHJpYnV0ZSgnZGlzYWJsZWQnLCB0cnVlKTtcbiAgICAgICAgfVxuICAgICAgICBwYXlwYWwuSG9zdGVkRmllbGRzLnJlbmRlcih7XG4gICAgICAgICAgICBjcmVhdGVPcmRlcjogY29udGV4dENvbmZpZy5jcmVhdGVPcmRlcixcbiAgICAgICAgICAgIHN0eWxlczoge1xuICAgICAgICAgICAgICAgICdpbnB1dCc6IHN0eWxlc1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZpZWxkczoge1xuICAgICAgICAgICAgICAgIG51bWJlcjoge1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJyNwcGNwLWNyZWRpdC1jYXJkLWdhdGV3YXktY2FyZC1udW1iZXInLFxuICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogdGhpcy5kZWZhdWx0Q29uZmlnLmhvc3RlZF9maWVsZHMubGFiZWxzLmNyZWRpdF9jYXJkX251bWJlcixcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGN2djoge1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJyNwcGNwLWNyZWRpdC1jYXJkLWdhdGV3YXktY2FyZC1jdmMnLFxuICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogdGhpcy5kZWZhdWx0Q29uZmlnLmhvc3RlZF9maWVsZHMubGFiZWxzLmN2dixcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGV4cGlyYXRpb25EYXRlOiB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnI3BwY3AtY3JlZGl0LWNhcmQtZ2F0ZXdheS1jYXJkLWV4cGlyeScsXG4gICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiB0aGlzLmRlZmF1bHRDb25maWcuaG9zdGVkX2ZpZWxkcy5sYWJlbHMubW1feXksXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KS50aGVuKGhvc3RlZEZpZWxkcyA9PiB7XG4gICAgICAgICAgICBkb2N1bWVudC5kaXNwYXRjaEV2ZW50KG5ldyBDdXN0b21FdmVudChcImhvc3RlZF9maWVsZHNfbG9hZGVkXCIpKTtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudEhvc3RlZEZpZWxkc0luc3RhbmNlID0gaG9zdGVkRmllbGRzO1xuXG4gICAgICAgICAgICBob3N0ZWRGaWVsZHMub24oJ2lucHV0U3VibWl0UmVxdWVzdCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLl9zdWJtaXQoY29udGV4dENvbmZpZyk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGhvc3RlZEZpZWxkcy5vbignY2FyZFR5cGVDaGFuZ2UnLCAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoICEgZXZlbnQuY2FyZHMubGVuZ3RoICkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhcmRWYWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbGlkQ2FyZHMgPSB0aGlzLmRlZmF1bHRDb25maWcuaG9zdGVkX2ZpZWxkcy52YWxpZF9jYXJkcztcbiAgICAgICAgICAgICAgICB0aGlzLmNhcmRWYWxpZCA9IHZhbGlkQ2FyZHMuaW5kZXhPZihldmVudC5jYXJkc1swXS50eXBlKSAhPT0gLTE7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgaG9zdGVkRmllbGRzLm9uKCd2YWxpZGl0eUNoYW5nZScsIChldmVudCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGZvcm1WYWxpZCA9IE9iamVjdC5rZXlzKGV2ZW50LmZpZWxkcykuZXZlcnkoZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZlbnQuZmllbGRzW2tleV0uaXNWYWxpZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgIHRoaXMuZm9ybVZhbGlkID0gZm9ybVZhbGlkO1xuXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKCF0aGlzLmZvcm1TdWJtaXNzaW9uU3Vic2NyaWJlZCkge1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Iod3JhcHBlciArICcgYnV0dG9uJykuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgICAgICAgICAgICAgJ2NsaWNrJyxcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3N1Ym1pdChjb250ZXh0Q29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgdGhpcy5mb3JtU3VibWlzc2lvblN1YnNjcmliZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGF5bWVudF9tZXRob2RfcHBjcC1jcmVkaXQtY2FyZC1nYXRld2F5JykuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgICAgICdjbGljaycsXG4gICAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignbGFiZWxbZm9yPXBwY3AtY3JlZGl0LWNhcmQtZ2F0ZXdheS1jYXJkLW51bWJlcl0nKS5jbGljaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICApXG4gICA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pbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyLm1lc3NhZ2UodGhpcy5kZWZhdWx0Q29uZmlnLmhvc3RlZF9maWVsZHMubGFiZWxzLmNhcmRob2xkZXJfbmFtZV9yZXF1aXJlZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBob3N0ZWRGaWVsZHNEYXRhLmNhcmRob2xkZXJOYW1lID0gZmlyc3ROYW1lICsgJyAnICsgbGFzdE5hbWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuY3VycmVudEhvc3RlZEZpZWxkc0luc3RhbmNlLnN1Ym1pdChob3N0ZWRGaWVsZHNEYXRhKS50aGVuKChwYXlsb2FkKSA9PiB7XG4gICAgICAgICAgICAgICAgcGF5bG9hZC5vcmRlcklEID0gcGF5bG9hZC5vcmRlcklkO1xuICAgICAgICAgICAgICAgIHRoaXMuc3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRleHRDb25maWcub25BcHByb3ZlKHBheWxvYWQpO1xuICAgICAgICAgICAgfSkuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycik7XG4gICAgICAgICAgICAgICAgdGhpcy5zcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5zcGlubmVyLnVuYmxvY2soKTtcbiAgICAgICAgICAgIGNvbnN0IG1lc3NhZ2UgPSAhIHRoaXMuY2FyZFZhbGlkID8gdGhpcy5kZWZhdWx0Q29uZmlnLmhvc3RlZF9maWVsZHMubGFiZWxzLmNhcmRfbm90X3N1cHBvcnRlZCA6IHRoaXMuZGVmYXVsdENvbmZpZy5ob3N0ZWRfZmllbGRzLmxhYmVscy5maWV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7XG4gICAgZmV0Y2goY29uZmlnLmVuZHBvaW50LCB7XG4gICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICBub25jZTogY29uZmlnLm5vbmNlXG4gICAgICAgIH0pXG4gICAgfSkudGhlbigocmVzKT0+e1xuICAgICAgICByZXR1cm4gcmVzLmpzb24oKTtcbiAgICB9KS50aGVuKChkYXRhKT0+e1xuICAgICAgICBjb25zdCBpc1ZhbGlkID0gdmFsaWRhdGVUb2tlbihkYXRhLCBjb25maWcudXNlcik7XG4gICAgICAgIGlmICghaXNWYWxpZCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHN0b3JlVG9rZW4oZGF0YSk7XG4gICAgICAgIHNjcmlwdC5zZXRBdHRyaWJ1dGUoJ2RhdGEtY2xpZW50LXRva2VuJywgZGF0YS50b2tlbik7XG4gICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kKHNjcmlwdCk7XG4gICAgfSk7XG59XG5cbmV4cG9ydCBkZWZhdWx0IGRhdGFDbGllbnRJZEF0dHJpYnV0ZUhhbmRsZXI7XG4iLCJjbGFzcyBNZXNzYWdlUmVuZGVyZXIge1xuXG4gICAgY29uc3RydWN0b3IoY29uZmlnKSB7XG4gICAgICAgIHRoaXMuY29uZmlnID0gY29uZmlnO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgaWYgKCEgdGhpcy5zaG91bGRSZW5kZXIoKSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgcGF5cGFsLk1lc3NhZ2VzKHtcbiAgICAgICAgICAgIGFtb3VudDogdGhpcy5jb25maWcuYW1vdW50LFxuICAgICAgICAgICAgcGxhY2VtZW50OiB0aGlzLmNvbmZpZy5wbGFjZW1lbnQsXG4gICAgICAgICAgICBzdHlsZTogdGhpcy5jb25maWcuc3R5bGVcbi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ZXNzYWdlcyIsInBsYWNlbWVudCIsIm5ld1dyYXBwZXIiLCJzaWJsaW5nIiwibmV4dFNpYmxpbmciLCJwYXJlbnRFbGVtZW50IiwiaW5zZXJ0QmVmb3JlIiwiU3Bpbm5lciIsInRhcmdldCIsInNldFRhcmdldCIsIm92ZXJsYXlDU1MiLCJiYWNrZ3JvdW5kIiwib3BhY2l0eSIsImJvb3RzdHJhcCIsImZ1bmRpbmdTb3VyY2UiLCJtZXNzYWdlUmVuZGVyZXIiLCJtaW5pX2NhcnRfYnV0dG9uc19lbmFibGVkIiwibWluaUNhcnRCb290c3RyYXAiLCJzaW5nbGVfcHJvZHVjdF9idXR0b25zX2VuYWJsZWQiLCJzaW5nbGVQcm9kdWN0Qm9vdHN0cmFwIiwiY2FydEJvb3RzdHJhcCIsImNoZWNrb3V0Qm9vdHN0YXAiLCJwYXlOb3dCb290c3RyYXAiLCJkYXRhX2NsaWVudF9pZCIsImhhc19zdWJzY3JpcHRpb25zIiwidXJsIiwiZW50cmllcyIsInNjcmlwdF9hdHRyaWJ1dGVzIiwia2V5VmFsdWUiLCJzZXRfYXR0cmlidXRlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///964\n")}},__webpack_exports__={};__webpack_modules__[964]()})();
|
1 |
+
(()=>{"use strict";var __webpack_modules__={964:()=>{eval("\n;// CONCATENATED MODULE: ./resources/js/modules/ErrorHandler.js\nclass ErrorHandler {\n constructor(genericErrorText) {\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\n this.clear();\n this.message(this.genericErrorText);\n }\n\n appendPreparedErrorMessageElement(errorMessageElement) {\n if (this.messagesList === null) {\n this.prepareMessagesList();\n }\n\n this.messagesList.replaceWith(errorMessageElement);\n }\n\n message(text, persist = false) {\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 jQuery.scroll_to_notices(jQuery('.woocommerce-notices-wrapper'));\n }\n\n prepareMessagesList() {\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 const li = document.createElement('li');\n li.innerHTML = message;\n return li;\n }\n\n sanitize(text) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = text;\n return textarea.value.replace('Error: ', '');\n }\n\n clear() {\n if (this.messagesList === null) {\n return;\n }\n\n this.messagesList.innerHTML = '';\n }\n\n}\n\n/* harmony default export */ const modules_ErrorHandler = (ErrorHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/OnApproveHandler/onApproveForContinue.js\nconst 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 funding_source: window.ppcpFundingSource\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\n location.href = context.config.redirect;\n });\n };\n};\n\n/* harmony default export */ const onApproveForContinue = (onApprove);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/PayerData.js\nconst payerData = () => {\n const payer = PayPalCommerceGateway.payer;\n\n if (!payer) {\n return null;\n }\n\n const phone = document.querySelector('#billing_phone') || typeof payer.phone !== 'undefined' ? {\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\n return payerData;\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/CartActionHandler.js\n\n\n\nclass CartActionHandler {\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' ? 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\n return data.data.id;\n });\n };\n\n return {\n createOrder,\n onApprove: onApproveForContinue(this, this.errorHandler),\n onError: error => {\n this.errorHandler.genericError();\n }\n };\n }\n\n}\n\n/* harmony default export */ const ActionHandler_CartActionHandler = (CartActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/MiniCartBootstap.js\n\n\n\nclass MiniCartBootstap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.actionHandler = null;\n }\n\n init() {\n this.actionHandler = new ActionHandler_CartActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.render();\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) !== null || document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.renderer.render(this.gateway.button.mini_cart_wrapper, this.gateway.hosted_fields.mini_cart_wrapper, this.actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_MiniCartBootstap = (MiniCartBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/UpdateCart.js\n\n\nclass UpdateCart {\n constructor(endpoint, nonce) {\n this.endpoint = endpoint;\n this.nonce = nonce;\n }\n /**\n *\n * @param onResolve\n * @param {Product[]} products\n * @returns {Promise<unknown>}\n */\n\n\n update(onResolve, products) {\n return new Promise((resolve, reject) => {\n fetch(this.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.nonce,\n products\n })\n }).then(result => {\n return result.json();\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}\n\n/* harmony default export */ const Helper_UpdateCart = (UpdateCart);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/ButtonsToggleListener.js\n/**\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 */\nclass ButtonsToggleListener {\n constructor(element, showCallback, hideCallback) {\n this.element = element;\n this.showCallback = showCallback;\n this.hideCallback = hideCallback;\n this.observer = null;\n }\n\n init() {\n const config = {\n attributes: true\n };\n\n const callback = () => {\n if (this.element.classList.contains('disabled')) {\n this.hideCallback();\n return;\n }\n\n this.showCallback();\n };\n\n this.observer = new MutationObserver(callback);\n this.observer.observe(this.element, config);\n callback();\n }\n\n disconnect() {\n this.observer.disconnect();\n }\n\n}\n\n/* harmony default export */ const Helper_ButtonsToggleListener = (ButtonsToggleListener);\n;// CONCATENATED MODULE: ./resources/js/modules/Entity/Product.js\nclass Product {\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}\n\n/* harmony default export */ const Entity_Product = (Product);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/SingleProductActionHandler.js\n\n\n\n\n\nclass SingleProductActionHandler {\n constructor(config, updateCart, showButtonCallback, hideButtonCallback, formElement, errorHandler) {\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 if (this.hasVariations()) {\n const observer = new Helper_ButtonsToggleListener(this.formElement.querySelector('.single_add_to_cart_button'), this.showButtonCallback, this.hideButtonCallback);\n observer.init();\n }\n\n return {\n createOrder: this.createOrder(),\n onApprove: onApproveForContinue(this, this.errorHandler),\n onError: error => {\n this.errorHandler.genericError();\n }\n };\n }\n\n createOrder() {\n var getProducts = null;\n\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 Entity_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\n const elementName = element.getAttribute('name').match(/quantity\\[([\\d]*)\\]/);\n\n if (elementName.length !== 2) {\n return;\n }\n\n const id = parseInt(elementName[1]);\n const quantity = parseInt(element.value);\n products.push(new Entity_Product(id, quantity, null));\n });\n return products;\n };\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' ? 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\n return data.data.id;\n });\n };\n\n const promise = this.updateCart.update(onResolve, getProducts());\n return promise;\n };\n\n return createOrder;\n }\n\n variations() {\n if (!this.hasVariations()) {\n return null;\n }\n\n const attributes = [...this.formElement.querySelectorAll(\"[name^='attribute_']\")].map(element => {\n return {\n value: element.value,\n name: element.name\n };\n });\n return attributes;\n }\n\n hasVariations() {\n return this.formElement.classList.contains('variations_form');\n }\n\n isGroupedProduct() {\n return this.formElement.classList.contains('grouped_form');\n }\n\n}\n\n/* harmony default export */ const ActionHandler_SingleProductActionHandler = (SingleProductActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/SingleProductBootstap.js\n\n\n\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 ActionHandler_SingleProductActionHandler(this.gateway, new Helper_UpdateCart(this.gateway.ajax.change_cart.endpoint, this.gateway.ajax.change_cart.nonce), () => {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper);\n let priceText = \"0\";\n\n if (document.querySelector('form.cart ins .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart ins .woocommerce-Price-amount').innerText;\n } else if (document.querySelector('form.cart .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;\n }\n\n const amount = parseInt(priceText.replace(/([^\\d,\\.\\s]*)/g, ''));\n this.messages.renderWithAmount(amount);\n }, () => {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n }, document.querySelector('form.cart'), new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_SingleProductBootstap = (SingleProductBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/CartBootstap.js\n\n\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 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) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n const actionHandler = new ActionHandler_CartActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic));\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n }\n\n}\n\n/* harmony default export */ const CartBootstap = (CartBootstrap);\n;// CONCATENATED MODULE: ./resources/js/modules/OnApproveHandler/onApproveForPayNow.js\nconst onApproveForPayNow_onApprove = (context, errorHandler, spinner) => {\n return (data, actions) => {\n spinner.block();\n errorHandler.clear();\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 funding_source: window.ppcpFundingSource\n })\n }).then(res => {\n return res.json();\n }).then(data => {\n spinner.unblock();\n\n if (!data.success) {\n if (data.data.code === 100) {\n errorHandler.message(data.data.message);\n } else {\n errorHandler.genericError();\n }\n\n if (typeof actions !== 'undefined' && typeof actions.restart !== 'undefined') {\n return actions.restart();\n }\n\n throw new Error(data.data.message);\n }\n\n document.querySelector('#place_order').click();\n });\n };\n};\n\n/* harmony default export */ const onApproveForPayNow = (onApproveForPayNow_onApprove);\n;// CONCATENATED MODULE: ./resources/js/modules/ActionHandler/CheckoutActionHandler.js\n\n\n\nclass CheckoutActionHandler {\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\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ? this.config.bn_codes[this.config.context] : '';\n const errorHandler = this.errorHandler;\n const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review';\n const formValues = jQuery(formSelector).serialize();\n const createaccount = jQuery('#createaccount').is(\":checked\") ? true : false;\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(); //handle both messages sent from Woocommerce (data.messages) and this plugin (data.data.message)\n\n if (typeof data.messages !== 'undefined') {\n const domParser = new DOMParser();\n errorHandler.appendPreparedErrorMessageElement(domParser.parseFromString(data.messages, 'text/html').querySelector('ul'));\n } else {\n errorHandler.clear();\n\n if (data.data.details.length > 0) {\n errorHandler.message(data.data.details.map(d => `${d.issue} ${d.description}`).join('<br/>'), true);\n } else {\n errorHandler.message(data.data.message, true);\n }\n }\n\n return;\n }\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\n return {\n createOrder,\n onApprove: onApproveForPayNow(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}\n\n/* harmony default export */ const ActionHandler_CheckoutActionHandler = (CheckoutActionHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Hiding.js\nconst getElement = selectorOrElement => {\n if (typeof selectorOrElement === 'string') {\n return document.querySelector(selectorOrElement);\n }\n\n return selectorOrElement;\n};\n\nconst isVisible = element => {\n return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n};\nconst setVisible = (selectorOrElement, show, important = false) => {\n const element = getElement(selectorOrElement);\n\n if (!element) {\n return;\n }\n\n const currentValue = element.style.getPropertyValue('display');\n\n if (!show) {\n if (currentValue === 'none') {\n return;\n }\n\n element.style.setProperty('display', 'none', important ? 'important' : '');\n } else {\n if (currentValue === 'none') {\n element.style.removeProperty('display');\n } // still not visible (if something else added display: none in CSS)\n\n\n if (!isVisible(element)) {\n element.style.setProperty('display', 'block');\n }\n }\n};\nconst hide = (selectorOrElement, important = false) => {\n setVisible(selectorOrElement, false, important);\n};\nconst show = selectorOrElement => {\n setVisible(selectorOrElement, true);\n};\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/CheckoutBootstap.js\n\n\n\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 this.standardOrderButtonSelector = '#place_order';\n this.buttonChangeObserver = new MutationObserver(el => {\n this.updateUi();\n });\n }\n\n init() {\n this.render(); // Unselect saved card.\n // WC saves form values, so with our current UI it would be a bit weird\n // if the user paid with saved, then after some time tries to pay again,\n // but wants to enter a new card, and to do that they have to choose “Select payment” in the list.\n\n jQuery('#saved-credit-card').val(jQuery('#saved-credit-card option:first').val());\n jQuery(document.body).on('updated_checkout', () => {\n this.render();\n });\n jQuery(document.body).on('updated_checkout payment_method_selected', () => {\n this.updateUi();\n });\n jQuery(document).on('hosted_fields_loaded', () => {\n jQuery('#saved-credit-card').on('change', () => {\n this.updateUi();\n });\n });\n this.updateUi();\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\n if (document.querySelector(this.gateway.hosted_fields.wrapper + '>div')) {\n document.querySelector(this.gateway.hosted_fields.wrapper + '>div').setAttribute('style', '');\n }\n\n const actionHandler = new ActionHandler_CheckoutActionHandler(PayPalCommerceGateway, new modules_ErrorHandler(this.gateway.labels.error.generic), this.spinner);\n this.renderer.render(this.gateway.button.wrapper, this.gateway.hosted_fields.wrapper, actionHandler.configuration());\n this.buttonChangeObserver.observe(document.querySelector(this.standardOrderButtonSelector), {\n attributes: true\n });\n }\n\n updateUi() {\n const currentPaymentMethod = this.currentPaymentMethod();\n const isPaypal = currentPaymentMethod === 'ppcp-gateway';\n const isCard = currentPaymentMethod === 'ppcp-credit-card-gateway';\n const isSavedCard = isCard && this.isSavedCardSelected();\n const isNotOurGateway = !isPaypal && !isCard;\n setVisible(this.standardOrderButtonSelector, isNotOurGateway || isSavedCard, true);\n setVisible(this.gateway.button.wrapper, isPaypal);\n setVisible(this.gateway.messages.wrapper, isPaypal);\n setVisible(this.gateway.hosted_fields.wrapper, isCard && !isSavedCard);\n\n if (isPaypal) {\n this.messages.render();\n }\n\n if (isCard) {\n if (isSavedCard) {\n this.disableCreditCardFields();\n } else {\n this.enableCreditCardFields();\n }\n }\n }\n\n disableCreditCardFields() {\n jQuery('label[for=\"ppcp-credit-card-gateway-card-number\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-number').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-expiry\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-expiry').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-cvc\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-cvc').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"vault\"]').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').addClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').attr(\"disabled\", true);\n this.renderer.disableCreditCardFields();\n }\n\n enableCreditCardFields() {\n jQuery('label[for=\"ppcp-credit-card-gateway-card-number\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-number').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-expiry\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-expiry').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"ppcp-credit-card-gateway-card-cvc\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-gateway-card-cvc').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('label[for=\"vault\"]').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').removeClass('ppcp-credit-card-gateway-form-field-disabled');\n jQuery('#ppcp-credit-card-vault').attr(\"disabled\", false);\n this.renderer.enableCreditCardFields();\n }\n\n currentPaymentMethod() {\n return jQuery('input[name=\"payment_method\"]:checked').val();\n }\n\n isSavedCardSelected() {\n const savedCardList = jQuery('#saved-credit-card');\n return savedCardList.length && savedCardList.val() !== '';\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_CheckoutBootstap = (CheckoutBootstap);\n;// CONCATENATED MODULE: ./resources/js/modules/ContextBootstrap/PayNowBootstrap.js\n\n\nclass PayNowBootstrap extends ContextBootstrap_CheckoutBootstap {\n constructor(gateway, renderer, messages, spinner) {\n super(gateway, renderer, messages, spinner);\n }\n\n updateUi() {\n const urlParams = new URLSearchParams(window.location.search);\n\n if (urlParams.has('change_payment_method')) {\n return;\n }\n\n super.updateUi();\n }\n\n}\n\n/* harmony default export */ const ContextBootstrap_PayNowBootstrap = (PayNowBootstrap);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/Renderer.js\nclass Renderer {\n constructor(creditCardRenderer, defaultConfig, onSmartButtonClick) {\n this.defaultConfig = defaultConfig;\n this.creditCardRenderer = creditCardRenderer;\n this.onSmartButtonClick = onSmartButtonClick;\n }\n\n render(wrapper, hostedFieldsWrapper, contextConfig) {\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 onClick: this.onSmartButtonClick\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\n if (!domElement) {\n return false;\n }\n\n domElement.style.display = 'none';\n return true;\n }\n\n showButtons(element) {\n const domElement = document.querySelector(element);\n\n if (!domElement) {\n return false;\n }\n\n domElement.style.display = 'block';\n return true;\n }\n\n disableCreditCardFields() {\n this.creditCardRenderer.disableFields();\n }\n\n enableCreditCardFields() {\n this.creditCardRenderer.enableFields();\n }\n\n}\n\n/* harmony default export */ const Renderer_Renderer = (Renderer);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/DccInputFactory.js\nconst 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\n newElement.style.setProperty(prop, '' + styles[prop]);\n });\n return newElement;\n};\n\n/* harmony default export */ const DccInputFactory = (dccInputFactory);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/CreditCardRenderer.js\n\n\nclass CreditCardRenderer {\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 this.currentHostedFieldsInstance = null;\n }\n\n render(wrapper, contextConfig) {\n if (this.defaultConfig.context !== 'checkout' && this.defaultConfig.context !== 'pay-now' || wrapper === null || document.querySelector(wrapper) === null) {\n return;\n }\n\n if (typeof paypal.HostedFields === 'undefined' || !paypal.HostedFields.isEligible()) {\n const wrapperElement = document.querySelector(wrapper);\n wrapperElement.parentNode.removeChild(wrapperElement);\n return;\n }\n\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.teardown().catch(err => console.error(`Hosted fields teardown error: ${err}`));\n this.currentHostedFieldsInstance = null;\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 const hideDccGateway = document.querySelector('#ppcp-hide-dcc');\n\n if (hideDccGateway) {\n hideDccGateway.parentNode.removeChild(hideDccGateway);\n }\n\n const cardNumberField = document.querySelector('#ppcp-credit-card-gateway-card-number');\n const stylesRaw = window.getComputedStyle(cardNumberField);\n let styles = {};\n Object.values(stylesRaw).forEach(prop => {\n if (!stylesRaw[prop]) {\n return;\n }\n\n styles[prop] = '' + stylesRaw[prop];\n });\n const cardNumber = DccInputFactory(cardNumberField);\n cardNumberField.parentNode.replaceChild(cardNumber, cardNumberField);\n const cardExpiryField = document.querySelector('#ppcp-credit-card-gateway-card-expiry');\n const cardExpiry = DccInputFactory(cardExpiryField);\n cardExpiryField.parentNode.replaceChild(cardExpiry, cardExpiryField);\n const cardCodeField = document.querySelector('#ppcp-credit-card-gateway-card-cvc');\n const cardCode = DccInputFactory(cardCodeField);\n cardCodeField.parentNode.replaceChild(cardCode, cardCodeField);\n gateWayBox.style.display = oldDisplayStyle;\n const formWrapper = '.payment_box payment_method_ppcp-credit-card-gateway';\n\n if (this.defaultConfig.enforce_vault && document.querySelector(formWrapper + ' .ppcp-credit-card-vault')) {\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').checked = true;\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').setAttribute('disabled', true);\n }\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 document.dispatchEvent(new CustomEvent(\"hosted_fields_loaded\"));\n this.currentHostedFieldsInstance = hostedFields;\n hostedFields.on('inputSubmitRequest', () => {\n this._submit(contextConfig);\n });\n hostedFields.on('cardTypeChange', event => {\n if (!event.cards.length) {\n this.cardValid = false;\n return;\n }\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 if (document.querySelector(wrapper).getAttribute('data-ppcp-subscribed') !== true) {\n document.querySelector(wrapper + ' button').addEventListener('click', event => {\n event.preventDefault();\n\n this._submit(contextConfig);\n });\n document.querySelector(wrapper).setAttribute('data-ppcp-subscribed', true);\n }\n });\n document.querySelector('#payment_method_ppcp-credit-card-gateway').addEventListener('click', () => {\n document.querySelector('label[for=ppcp-credit-card-gateway-card-number]').click();\n });\n }\n\n disableFields() {\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.setAttribute({\n field: 'number',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.setAttribute({\n field: 'cvv',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.setAttribute({\n field: 'expirationDate',\n attribute: 'disabled'\n });\n }\n }\n\n enableFields() {\n if (this.currentHostedFieldsInstance) {\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'number',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'cvv',\n attribute: 'disabled'\n });\n this.currentHostedFieldsInstance.removeAttribute({\n field: 'expirationDate',\n attribute: 'disabled'\n });\n }\n }\n\n _submit(contextConfig) {\n this.spinner.block();\n this.errorHandler.clear();\n\n if (this.formValid && this.cardValid) {\n const save_card = this.defaultConfig.save_card ? true : false;\n let vault = document.getElementById('ppcp-credit-card-vault') ? document.getElementById('ppcp-credit-card-vault').checked : save_card;\n\n if (this.defaultConfig.enforce_vault) {\n vault = true;\n }\n\n const contingency = this.defaultConfig.hosted_fields.contingency;\n const hostedFieldsData = {\n vault: vault\n };\n\n if (contingency !== 'NO_3D_SECURE') {\n hostedFieldsData.contingencies = [contingency];\n }\n\n if (this.defaultConfig.payer) {\n hostedFieldsData.cardholderName = this.defaultConfig.payer.name.given_name + ' ' + this.defaultConfig.payer.name.surname;\n }\n\n if (!hostedFieldsData.cardholderName) {\n const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value : '';\n const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value : '';\n\n if (!firstName || !lastName) {\n this.spinner.unblock();\n this.errorHandler.message(this.defaultConfig.hosted_fields.labels.cardholder_name_required);\n return;\n }\n\n hostedFieldsData.cardholderName = firstName + ' ' + lastName;\n }\n\n this.currentHostedFieldsInstance.submit(hostedFieldsData).then(payload => {\n payload.orderID = payload.orderId;\n this.spinner.unblock();\n return contextConfig.onApprove(payload);\n }).catch(err => {\n console.error(err);\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\n}\n\n/* harmony default export */ const Renderer_CreditCardRenderer = (CreditCardRenderer);\n;// CONCATENATED MODULE: ./resources/js/modules/DataClientIdAttributeHandler.js\nconst storageKey = 'ppcp-data-client-id';\n\nconst validateToken = (token, user) => {\n if (!token) {\n return false;\n }\n\n if (token.user !== user) {\n return false;\n }\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\n if (validateToken(token, user)) {\n return token.token;\n }\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\n if (!isValid) {\n return;\n }\n\n storeToken(data);\n script.setAttribute('data-client-token', data.token);\n document.body.append(script);\n });\n};\n\n/* harmony default export */ const DataClientIdAttributeHandler = (dataClientIdAttributeHandler);\n;// CONCATENATED MODULE: ./resources/js/modules/Renderer/MessageRenderer.js\nclass MessageRenderer {\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 if (!this.shouldRender()) {\n return;\n }\n\n const newWrapper = document.createElement('div');\n newWrapper.setAttribute('id', this.config.wrapper.replace('#', ''));\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 if (typeof paypal.Messages === 'undefined' || typeof this.config.wrapper === 'undefined') {\n return false;\n }\n\n if (!document.querySelector(this.config.wrapper)) {\n return false;\n }\n\n return true;\n }\n\n}\n\n/* harmony default export */ const Renderer_MessageRenderer = (MessageRenderer);\n;// CONCATENATED MODULE: ./resources/js/modules/Helper/Spinner.js\nclass Spinner {\n constructor() {\n this.target = 'form.woocommerce-checkout';\n }\n\n setTarget(target) {\n this.target = target;\n }\n\n block() {\n jQuery(this.target).block({\n message: null,\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n\n unblock() {\n jQuery(this.target).unblock();\n }\n\n}\n\n/* harmony default export */ const Helper_Spinner = (Spinner);\n;// CONCATENATED MODULE: ./resources/js/button.js\n\n\n\n\n\n\n\n\n\n\n\n\nconst bootstrap = () => {\n const errorHandler = new modules_ErrorHandler(PayPalCommerceGateway.labels.error.generic);\n const spinner = new Helper_Spinner();\n const creditCardRenderer = new Renderer_CreditCardRenderer(PayPalCommerceGateway, errorHandler, spinner);\n\n const onSmartButtonClick = data => {\n window.ppcpFundingSource = data.fundingSource;\n };\n\n const renderer = new Renderer_Renderer(creditCardRenderer, PayPalCommerceGateway, onSmartButtonClick);\n const messageRenderer = new Renderer_MessageRenderer(PayPalCommerceGateway.messages);\n const context = PayPalCommerceGateway.context;\n\n if (context === 'mini-cart' || context === 'product') {\n if (PayPalCommerceGateway.mini_cart_buttons_enabled === '1') {\n const miniCartBootstrap = new ContextBootstrap_MiniCartBootstap(PayPalCommerceGateway, renderer);\n miniCartBootstrap.init();\n }\n }\n\n if (context === 'product' && PayPalCommerceGateway.single_product_buttons_enabled === '1') {\n const singleProductBootstrap = new ContextBootstrap_SingleProductBootstap(PayPalCommerceGateway, renderer, messageRenderer);\n singleProductBootstrap.init();\n }\n\n if (context === 'cart') {\n const cartBootstrap = new CartBootstap(PayPalCommerceGateway, renderer);\n cartBootstrap.init();\n }\n\n if (context === 'checkout') {\n const checkoutBootstap = new ContextBootstrap_CheckoutBootstap(PayPalCommerceGateway, renderer, messageRenderer, spinner);\n checkoutBootstap.init();\n }\n\n if (context === 'pay-now') {\n const payNowBootstrap = new ContextBootstrap_PayNowBootstrap(PayPalCommerceGateway, renderer, messageRenderer, spinner);\n payNowBootstrap.init();\n }\n\n if (context !== 'checkout') {\n messageRenderer.render();\n }\n};\n\ndocument.addEventListener('DOMContentLoaded', () => {\n if (!typeof PayPalCommerceGateway) {\n console.error('PayPal button could not be configured.');\n return;\n }\n\n if (PayPalCommerceGateway.context !== 'checkout' && PayPalCommerceGateway.data_client_id.user === 0 && PayPalCommerceGateway.data_client_id.has_subscriptions) {\n return;\n }\n\n const script = document.createElement('script');\n script.addEventListener('load', event => {\n bootstrap();\n });\n script.setAttribute('src', PayPalCommerceGateway.button.url);\n Object.entries(PayPalCommerceGateway.script_attributes).forEach(keyValue => {\n script.setAttribute(keyValue[0], keyValue[1]);\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});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTY0LmpzIiwibWFwcGluZ3MiOiI7O0FBQUE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csICcnKTtcbiAgICB9XG5cbiAgICBjbGVhcigpXG4gICAge1xuICAgICAgICBpZiAodGhpcy5tZXNzYWdlc0xpc3QgPT09IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMubWVzc2FnZXNMaXN0LmlubmVySFRNTCA9ICcnO1xuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgRXJyb3JIYW5kbGVyO1xuIiwiY29uc3Qgb25BcHByb3ZlID0gKGNvbnRleHQsIGVycm9ySGFuZGxlcikgPT4ge1xuICAgIHJldHVybiAoZGF0YSwgYWN0aW9ucykgPT4ge1xuICAgICAgICByZXR1cm4gZmV0Y2goY29udGV4dC5jb25maWcuYWpheC5hcHByb3ZlX29yZGVyLmVuZHBvaW50LCB7XG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICBub25jZTogY29udGV4dC5jb25maWcuYWpheC5hcHByb3ZlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgIG9yZGVyX2lkOmRhdGEub3JkZXJJRCxcbiAgICAgICAgICAgICAgICBmdW5kaW5nX3NvdXJjZTogd2luZG93LnBwY3BGdW5kaW5nU291cmNlLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgfSkudGhlbigocmVzKT0+e1xuICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgIH0pLnRoZW4oKGRhdGEpPT57XG4gICAgICAgICAgICBpZiAoIWRhdGEuc3VjY2Vzcykge1xuICAgICAgICAgICAgICAgIGVycm9ySGFuZGxlci5nZW5lcmljRXJyb3IoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYWN0aW9ucy5yZXN0YXJ0KCkuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLmdlbmVyaWNFcnJvcigpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IGNvbnRleHQuY29uZmlnLnJlZGlyZWN0O1xuICAgICAgICB9KTtcblxuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgb25BcHByb3ZlO1xuIiwiZXhwb3J0IGNvbnN0IHBheWVyRGF0YSA9ICgpID0+IHtcbiAgICBjb25zdCBwYXllciA9IFBheVBhbENvbW1lcmNlR2F0ZXdheS5wYXllcjtcbiAgICBpZiAoISBwYXllcikge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICBjb25zdCBwaG9uZSA9IChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsbGluZ19waG9uZScpIHx8IHR5cGVvZiBwYXllci5waG9uZSAhPT0gJ3VuZGVmaW5lZCcpID9cbiAgICB7XG4gICAgICAgIHBob25lX3R5cGU6XCJIT01FXCIsXG4gICAgICAgICAgICBwaG9uZV9udW1iZXI6e1xuICAgICAgICAgICAgbmF0aW9uYWxfbnVtYmVyIDogKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxsaW5nX3Bob25lJykpID8gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JpbGxpbmdfcGhvbmUnKS52YWx1ZSA6IHBheWVyLnBob25lLnBob25lX251bWJlci5uYXRpb25hbF9udW1iZXJcbiAgICAgICAgfVxuICAgIH0gOiBudWxsO1xuICAgIGNvbnN0IHBheWVyRGF0YSA9IHtcbiAgICAgICAgZW1haWxfYWRkcmVzczooZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JpbGxpbmdfZW1haWwnKSkgPyBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsbGluZ19lbWFpbCcpLnZhbHVlIDogcGF5ZXIuZW1haWxfYWRkcmVzcyxcbiAgICAgICAgbmFtZSA6IHtcbiAgICAgICAgICAgIHN1cm5hbWU6IChk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VPcmRlciA9IChkYXRhLCBhY3Rpb25zKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBwYXllciA9IHBheWVyRGF0YSgpO1xuICAgICAgICAgICAgY29uc3QgYm5Db2RlID0gdHlwZW9mIHRoaXMuY29uZmlnLmJuX2NvZGVzW3RoaXMuY29uZmlnLmNvbnRleHRdICE9PSAndW5kZWZpbmVkJyA/XG4gICAgICAgICAgICAgICAgdGhpcy5jb25maWcuYm5fY29kZXNbdGhpcy5jb25maWcuY29udGV4dF0gOiAnJztcbiAgICAgICAgICAgIHJldHVybiBmZXRjaCh0aGlzLmNvbmZpZy5hamF4LmNyZWF0ZV9vcmRlci5lbmRwb2ludCwge1xuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgbm9uY2U6IHRoaXMuY29uZmlnLmFqYXguY3JlYXRlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgICAgICBwdXJjaGFzZV91bml0czogW10sXG4gICAgICAgICAgICAgICAgICAgIGJuX2NvZGU6Ym5Db2RlLFxuICAgICAgICAgICAgICAgICAgICBwYXllcixcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dDp0aGlzLmNvbmZpZy5jb250ZXh0XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uKHJlcykge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpO1xuICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoZGF0YS5kYXRhLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICA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1xuICAgICAgICB0aGlzLm5vbmNlID0gbm9uY2U7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICpcbiAgICAgKiBAcGFyYW0gb25SZXNvbHZlXG4gICAgICogQHBhcmFtIHtQcm9kdWN0W119IHByb2R1Y3RzXG4gICAgICogQHJldHVybnMge1Byb21pc2U8dW5rbm93bj59XG4gICAgICovXG4gICAgdXBkYXRlKG9uUmVzb2x2ZSwgcHJvZHVjdHMpXG4gICAge1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgZmV0Y2goXG4gICAgICAgICAgICAgICAgdGhpcy5lbmRwb2ludCxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBub25jZTogdGhpcy5ub25jZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y3RzLFxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICkudGhlbihcbiAgICAgICAgICAgICAgICAocmVzdWx0KSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdC5qc29uKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKS50aGVuKChyZXN1bHQpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoISByZXN1bHQuc3VjY2Vzcykge1xuICAgICAgICAgICAgICAgICAgICByZWplY3QocmVzdWx0LmRhdGEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc29sdmVkID0gb25SZXNvbHZlKHJlc3VsdC5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXNv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mV0dXJuIHtcbiAgICAgICAgICAgIGNyZWF0ZU9yZGVyOiB0aGlzLmNyZWF0ZU9yZGVyKCksXG4gICAgICAgICAgICBvbkFwcHJvdmU6IG9uQXBwcm92ZSh0aGlzLCB0aGlzLmVycm9ySGFuZGxlciksXG4gICAgICAgICAgICBvbkVycm9yOiAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmVycm9ySGFuZGxlci5nZW5lcmljRXJyb3IoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNyZWF0ZU9yZGVyKClcbiAgICB7XG4gICAgICAgIHZhciBnZXRQcm9kdWN0cyA9IG51bGw7XG4gICAgICAgIGlmICghIHRoaXMuaXNHcm91cGVkUHJvZHVjdCgpICkge1xuICAgICAgICAgICAgZ2V0UHJvZHVjdHMgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgaWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdbbmFtZT1cImFkZC10by1jYXJ0XCJdJykudmFsdWU7XG4gICAgICAgICAgICAgICAgY29uc3QgcXR5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignW25hbWU9XCJxdWFudGl0eVwiXScpLnZhbHVlO1xuICAgICAgICAgICAgICAgIGNvbnN0IHZhcmlhdGlvbnMgPSB0aGlzLnZhcmlhdGlvbnMoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW25ldyBQcm9kdWN0KGlkLCBxdHksIHZhcmlhdGlvbnMpXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGdldFByb2R1Y3RzID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHByb2R1Y3RzID0gW107XG4gICAgICAgICAgICAgICAgdGhpcy5mb3JtRWxlbWVudC5xdWVyeVNlbGVjdG9yQWxsKCdpbnB1dFt0eXBlPVwibnVtYmVyXCJdJykuZm9yRWFjaCgoZWxlbWVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoISBlbGVtZW50LnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudE5hbWUgPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgnbmFtZScpLm1hdGNoKC9xdWFudGl0eVxcWyhbXFxkXSopXFxdLyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50TmFtZS5sZW5ndGggIT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBpZCA9IHBhcnNlSW50KGVsZW1lbnROYW1lWzFdKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcXVhbnRpdHkgPSBwYXJzZUludChlbGVtZW50LnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgcHJvZHVjdHMucHVzaChuZXcgUHJvZHVjdChpZCwgcXVhbnRpdHksIG51bGwpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIHJldHVybiBwcm9kdWN0cztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjb25zdCBjcmVhdGVPcmRlciA9IChkYXRhLCBhY3Rpb25zKSA9PiB7XG4gICAgICAgICAgICB0aGlzLmVycm9ySGFuZGxlci5jbGVhcigpO1xuXG4gICAgICAgICAgICBjb25zdCBvblJlc29sdmUgPSAocHVyY2hhc2VfdW5pdHMpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXllciA9IHBheWVyRGF0YSgpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGJuQ29kZSA9IHR5cGVvZiB0aGlzLmNvbmZpZy5ibl9jb2Rlc1t0aGlzLmNvbmZpZy5jb250ZXh0XSAhPT0gJ3VuZGVmaW5lZCcgP1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZy5ibl9jb2Rlc1t0aGlzLmNvbmZpZy5jb250ZXh0XSA6ICcnO1xuICAgICAgICAgICAgICAgIHJldHVybiBmZXRjaCh0aGlzLmNvbmZpZy5hamF4LmNyZWF0ZV9vcmRlci5lbmRwb2ludCwge1xuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9uY2U6IHRoaXMuY29uZmlnLmFqYXguY3JlYXRlX29yZGVyLm5vbmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcHVyY2hhc2VfdW5pdHMsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXllcixcbiAgICAgICAgICAgICAgICAgICAgICAgIGJuX2NvZGU6Ym5Db2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dDp0aGlzLmNvbmZpZy5jb250ZXh0XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpO1xuICAgICAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBFcnJvcihkYXRhLmRhdGEubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRhdGEuZGF0YS5pZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNvbnN0IHByb21pc2Ug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2FydChcbiAgICAgICAgICAgICAgICB0aGlzLmdhdGV3YXkuYWpheC5jaGFuZ2VfY2FydC5lbmRwb2ludCxcbiAgICAgICAgICAgICAgICB0aGlzLmdhdGV3YXkuYWpheC5jaGFuZ2VfY2FydC5ub25jZSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zaG93QnV0dG9ucyh0aGlzLmdhdGV3YXkuYnV0dG9uLndyYXBwZXIpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2hvd0J1dHRvbnModGhpcy5nYXRld2F5Lmhvc3RlZF9maWVsZHMud3JhcHBlcik7XG4gICAgICAgICAgICAgICAgbGV0IHByaWNlVGV4dCA9IFwiMFwiO1xuICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdmb3JtLmNhcnQgaW5zIC53b29jb21tZXJjZS1QcmljZS1hbW91bnQnKSkge1xuICAgICAgICAgICAgICAgICAgICBwcmljZVRleHQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdmb3JtLmNhcnQgaW5zIC53b29jb21tZXJjZS1QcmljZS1hbW91bnQnKS5pbm5lclRleHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2Zvcm0uY2FydCAud29vY29tbWVyY2UtUHJpY2UtYW1vdW50JykpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJpY2VUZXh0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignZm9ybS5jYXJ0IC53b29jb21tZXJjZS1QcmljZS1hbW91bnQnKS5pbm5lclRleHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IGFtb3VudCA9IHBhcnNlSW50KHByaWNlVGV4dC5yZXBsYWNlKC8oW15cXGQsXFwuXFxzXSopL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maWd1cmF0aW9uKCksXG4gICAgICAgICk7XG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBDYXJ0Qm9vdHN0cmFwO1xuIiwiY29uc3Qgb25BcHByb3ZlID0gKGNvbnRleHQsIGVycm9ySGFuZGxlciwgc3Bpbm5lcikgPT4ge1xuICAgIHJldHVybiAoZGF0YSwgYWN0aW9ucykgPT4ge1xuICAgICAgICBzcGlubmVyLmJsb2NrKCk7XG4gICAgICAgIGVycm9ySGFuZGxlci5jbGVhcigpO1xuXG4gICAgICAgIHJldHVybiBmZXRjaChjb250ZXh0LmNvbmZpZy5hamF4LmFwcHJvdmVfb3JkZXIuZW5kcG9pbnQsIHtcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgIG5vbmNlOiBjb250ZXh0LmNvbmZpZy5hamF4LmFwcHJvdmVfb3JkZXIubm9uY2UsXG4gICAgICAgICAgICAgICAgb3JkZXJfaWQ6ZGF0YS5vcmRlcklELFxuICAgICAgICAgICAgICAgIGZ1bmRpbmdfc291cmNlOiB3aW5kb3cucHBjcEZ1bmRpbmdTb3VyY2UsXG4gICAgICAgICAgICB9KVxuICAgICAgICB9KS50aGVuKChyZXMpPT57XG4gICAgICAgICAgICByZXR1cm4gcmVzLmpzb24oKTtcbiAgICAgICAgfSkudGhlbigoZGF0YSk9PntcbiAgICAgICAgICAgIHNwaW5uZXIudW5ibG9jaygpO1xuICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5kYXRhLmNvZGUgPT09IDEwMCkge1xuICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIubWVzc2FnZShkYXRhLmRhdGEubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLmd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XG4gICAgICAgICAgICAgICAgICAgIG9yZGVyX2lkOnRoaXMuY29uZmlnLm9yZGVyX2lkLFxuICAgICAgICAgICAgICAgICAgICBmb3JtOmZvcm1WYWx1ZXMsXG4gICAgICAgICAgICAgICAgICAgIGNyZWF0ZWFjY291bnQ6IGNyZWF0ZWFjY291bnRcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlcy5qc29uKCk7XG4gICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFkYXRhLnN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgc3Bpbm5lci51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgICAgIC8vaGFuZGxlIGJvdGggbWVzc2FnZXMgc2VudCBmcm9tIFdvb2NvbW1lcmNlIChkYXRhLm1lc3NhZ2VzKSBhbmQgdGhpcyBwbHVnaW4gKGRhdGEuZGF0YS5tZXNzYWdlKVxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mKGRhdGEubWVzc2FnZXMpICE9PSAndW5kZWZpbmVkJyApXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRvbVBhcnNlciA9IG5ldyBET01QYXJzZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9ySGFuZGxlci5hcHBlbmRQcmVwYXJlZEVycm9yTWVzc2FnZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tUGFyc2VyLnBhcnNlRnJvbVN0cmluZyhkYXRhLm1lc3NhZ2VzLCAndGV4dC9odG1sJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnF1ZXJ5U2VsZWN0b3IoJ3VsJylcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIuY2xlYXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmRhdGEuZGV0YWlscy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyLm1lc3NhZ2UoZGF0YS5kYXRhLmRldGFpbHMubWFwKGQgPT4gYCR7ZC5pc3N1ZX0gJHtkLmRlc2NyaXB0aW9ufWApLmpvaW4oJzxici8+JyksIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvckhhbmRsZXIubWVzc2FnZShkYXRhLmRhdGEubWVzc2FnZSwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IGlucHV0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaW5wdXQnKTtcbiAgICAgICAgICAgICAgICBpbnB1dC5zZXRBdHRyaWJ1dGUoJ3R5cGUnLCAnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgaW5wdXQuc2V0QXR0cmlidXRlKCduYW1lJywgJ3BwY3AtcmVzdW1lLW9yZGVyJyk7XG4gICAgICAgICAgICAgICAgaW5wdXQuc2V0QXR0cmlidXRlKCd2YWx1ZScsIGRhdGEuZGF0YS5wdXJjaGFzZV91bml0c1swXS5jdXN0b21faWQpO1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoZm9ybVNlbGVjdG9yKS5hcHBlbmQoaW5wdXQpO1xuICAgICAgICAgICAgICAgIHJldHVybiBkYXRhLmRhdGEuaWQ7XG4gICAgICAgICAgICB9KTt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mRsZXIgPSBlcnJvckhhbmRsZXI7XG4gICAgICAgIHRoaXMuc3Bpbm5lciA9IHNwaW5uZXI7XG4gICAgICAgIHRoaXMuY2FyZFZhbGlkID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZm9ybVZhbGlkID0gZmFsc2U7XG4gICAgICAgIHRoaXMuY3VycmVudEhvc3RlZEZpZWxkc0luc3RhbmNlID0gbnVsbDtcbiAgICB9XG5cbiAgICByZW5kZXIod3JhcHBlciwgY29udGV4dENvbmZpZykge1xuXG4gICAgICAgIGlmIChcbiAgICAgICAgICAgIChcbiAgICAgICAgICAgICAgICB0aGlzLmRlZmF1bHRDb25maWcuY29udGV4dCAhPT0gJ2NoZWNrb3V0J1xuICAgICAgICAgICAgICAgICYmIHRoaXMuZGVmYXVsdENvbmZpZy5jb250ZXh0ICE9PSAncGF5LW5vdydcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHx8IHdyYXBwZXIgPT09IG51bGxcbiAgICAgICAgICAgIHx8IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Iod3JhcHBlcikgPT09IG51bGxcbiAgICAgICAgKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKFxuICAgICAgICAgICAgdHlwZW9mIHBheXBhbC5Ib3N0ZWRGaWVsZHMgPT09ICd1bmRlZmluZWQnXG4gICAgICAgICAgICB8fCAhIHBheXBhbC5Ib3N0ZWRGaWVsZHMuaXNFbGlnaWJsZSgpXG4gICAgICAgICkge1xuICAgICAgICAgICAgY29uc3Qgd3JhcHBlckVsZW1lbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKHdyYXBwZXIpO1xuICAgICAgICAgICAgd3JhcHBlckVsZW1lbnQucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh3cmFwcGVyRWxlbWVudCk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5jdXJyZW50SG9zdGVk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zdHlsZS5kaXNwbGF5ID0gb2xkRGlzcGxheVN0eWxlO1xuXG4gICAgICAgIGNvbnN0IGZvcm1XcmFwcGVyID0gJy5wYXltZW50X2JveCBwYXltZW50X21ldGhvZF9wcGNwLWNyZWRpdC1jYXJkLWdhdGV3YXknO1xuICAgICAgICBpZiAoXG4gICAgICAgICAgICB0aGlzLmRlZmF1bHRDb25maWcuZW5mb3JjZV92YXVsdFxuICAgICAgICAgICAgJiYgZG9jdW1lbnQucXVlcnlTZWxlY3Rvcihmb3JtV3JhcHBlciArICcgLnBwY3AtY3JlZGl0LWNhcmQtdmF1bHQnKVxuICAgICAgICApIHtcbiAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoZm9ybVdyYXBwZXIgKyAnIC5wcGNwLWNyZWRpdC1jYXJkLXZhdWx0JykuY2hlY2tlZCA9IHRydWU7XG4gICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGZvcm1XcmFwcGVyICsgJyAucHBjcC1jcmVkaXQtY2FyZC12YXVsdCcpLnNldEF0dHJpYnV0ZSgnZGlzYWJsZWQnLCB0cnVlKTtcbiAgICAgICAgfVxuICAgICAgICBwYXlwYWwuSG9zdGVkRmllbGRzLnJlbmRlcih7XG4gICAgICAgICAgICBjcmVhdGVPcmRlcjogY29udGV4dENvbmZpZy5jcmVhdGVPcmRlcixcbiAgICAgICAgICAgIHN0eWxlczoge1xuICAgICAgICAgICAgICAgICdpbnB1dCc6IHN0eWxlc1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZpZWxkczoge1xuICAgICAgICAgICAgICAgIG51bWJlcjoge1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJyNwcGNwLWNyZWRpdC1jYXJkLWdhdGV3YXktY2FyZC1udW1iZXInLFxuICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogdGhpcy5kZWZhdWx0Q29uZmlnLmhvc3RlZF9maWVsZHMubGFiZWxzLmNyZWRpdF9jYXJkX251bWJlcixcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGN2djoge1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3RvcjogJyNwcGNwLWNyZWRpdC1jYXJkLWdhdGV3YXktY2FyZC1jdmMnLFxuICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogdGhpcy5kZWZhdWx0Q29uZmlnLmhvc3RlZF9maWVsZHMubGFiZWxzLmN2dixcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGV4cGlyYXRpb25EYXRlOiB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yOiAnI3BwY3AtY3JlZGl0LWNhcmQtZ2F0ZXdheS1jYXJkLWV4cGlyeScsXG4gICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiB0aGlzLmRlZmF1bHRDb25maWcuaG9zdGVkX2ZpZWxkcy5sYWJlbHMubW1feXksXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KS50aGVuKGhvc3RlZEZpZWxkcyA9PiB7XG4gICAgICAgICAgICBkb2N1bWVudC5kaXNwYXRjaEV2ZW50KG5ldyBDdXN0b21FdmVudChcImhvc3RlZF9maWVsZHNfbG9hZGVkXCIpKTtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudEhvc3RlZEZpZWxkc0luc3RhbmNlID0gaG9zdGVkRmllbGRzO1xuXG4gICAgICAgICAgICBob3N0ZWRGaWVsZHMub24oJ2lucHV0U3VibWl0UmVxdWVzdCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLl9zdWJtaXQoY29udGV4dENvbmZpZyk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGhvc3RlZEZpZWxkcy5vbignY2FyZFR5cGVDaGFuZ2UnLCAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoICEgZXZlbnQuY2FyZHMubGVuZ3RoICkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhcmRWYWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbGlkQ2FyZHMgPSB0aGlzLmRlZmF1bHRDb25maWcuaG9zdGVkX2ZpZWxkcy52YWxpZF9jYXJkcztcbiAgICAgICAgICAgICAgICB0aGlzLmNhcmRWYWxpZCA9IHZhbGlkQ2FyZHMuaW5kZXhPZihldmVudC5jYXJkc1swXS50eXBlKSAhPT0gLTE7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgaG9zdGVkRmllbGRzLm9uKCd2YWxpZGl0eUNoYW5nZScsIChldmVudCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGZvcm1WYWxpZCA9IE9iamVjdC5rZXlzKGV2ZW50LmZpZWxkcykuZXZlcnkoZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZlbnQuZmllbGRzW2tleV0uaXNWYWxpZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgIHRoaXMuZm9ybVZhbGlkID0gZm9ybVZhbGlkO1xuXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Iod3JhcHBlcikuZ2V0QXR0cmlidXRlKCdkYXRhLXBwY3Atc3Vic2NyaWJlZCcpICE9PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3Rvcih3cmFwcGVyICsgJyBidXR0b24nKS5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAgICAgICAgICAgICAnY2xpY2snLFxuICAgICAgICAgICAgICAgICAgICBldmVudCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3VibWl0KGNvbnRleHRDb25maWcpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Iod3JhcHBlcikuc2V0QXR0cmlidXRlKCdkYXRhLXBwY3Atc3Vic2NyaWJlZCcsIHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGF5bWVudF9tZXRob2RfcHBjcC1jcmVkaXQtY2FyZC1nYXRld2F5JykuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgICAgICdjbGljaycsXG4gICAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignbGFiZWxbZm9yPXBwY3AtY3JlZGl0LWNhcmQtZ2F0ZXdheS1jYXJkLW51bWJlcl0nKS5jbGljaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZGlzYWJsZUZpZWxkcygpIHtcbiAgICAgICAgaWYgKHRoaXMuY3VycmVudEhvc3RlZEZpZWxkc0luc3RhbmNlKSB7XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRIb3N0ZWRGaWVsZHNJbnN0YW5jZS5zZXRBdHRyaWJ1dGUoe1xuICAgICAgICAgICAgICAgIGZpZWxkOiAnbnVtYmVyJyxcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGU6ICdkaXNhYmxlZCdcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRIb3N0ZWRGaWVsZHNJbnN0YW5jZS5zZXRBdHRyaWJ1dGUoe1xuICAgICAgICAgICAgICAgIGZpZWxkOiAnY3Z2JyxcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGU6ICdkaXNhYmxlZCdcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAg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ZiAodGhpcy5mb3JtVmFsaWQgJiYgdGhpcy5jYXJkVmFsaWQpIHtcbiAgICAgICAgICAgIGNvbnN0IHNhdmVfY2FyZCA9IHRoaXMuZGVmYXVsdENvbmZpZy5zYXZlX2NhcmQgPyB0cnVlIDogZmFsc2U7XG4gICAgICAgICAgICBsZXQgdmF1bHQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgncHBjcC1jcmVkaXQtY2FyZC12YXVsdCcpID9cbiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgncHBjcC1jcmVkaXQtY2FyZC12YXVsdCcpLmNoZWNrZWQgOiBzYXZlX2NhcmQ7XG4gICAgICAgICAgICBpZiAodGhpcy5kZWZhdWx0Q29uZmlnLmVuZm9yY2VfdmF1bHQpIHtcbiAgICAgICAgICAgICAgICB2YXVsdCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBjb250aW5nZW5jeSA9IHRoaXMuZGVmYXVsdENvbmZpZy5ob3N0ZWRfZmllbGRzLmNvbnRpbmdlbmN5O1xuICAgICAgICAgICAgY29uc3QgaG9zdGVkRmllbGRzRGF0YSA9IHtcbiAgICAgICAgICAgICAgICB2YXVsdDogdmF1bHRcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpZiAoY29udGluZ2VuY3kgIT09ICdOT18zRF9TRUNVUkUnKSB7XG4gICAgICAgICAgICAgICAgaG9zdGVkRmllbGRzRGF0YS5jb250aW5nZW5jaWVzID0gW2NvbnRpbmdlbmN5XTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuZGVmYXVsdENvbmZpZy5wYXllcikge1xuICAgICAgICAgICAgICAgIGhvc3RlZEZpZWxkc0RhdGEuY2FyZGhvbGRlck5hbWUgPSB0aGlzLmRlZmF1bHRDb25maWcucGF5ZXIubmFtZS5naXZlbl9uYW1lICsgJyAnICsgdGhpcy5kZWZhdWx0Q29uZmlnLnBheWVy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bGllbnRfaWQiLCJoYXNfc3Vic2NyaXB0aW9ucyIsInVybCIsImVudHJpZXMiLCJzY3JpcHRfYXR0cmlidXRlcyIsImtleVZhbHVlIiwic2V0X2F0dHJpYnV0ZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///964\n")}},__webpack_exports__={};__webpack_modules__[964]()})();
|
modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js
CHANGED
@@ -48,7 +48,12 @@ class CheckoutActionHandler {
|
|
48 |
.querySelector('ul')
|
49 |
);
|
50 |
} else {
|
51 |
-
errorHandler.
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
return;
|
48 |
.querySelector('ul')
|
49 |
);
|
50 |
} else {
|
51 |
+
errorHandler.clear();
|
52 |
+
if (data.data.details.length > 0) {
|
53 |
+
errorHandler.message(data.data.details.map(d => `${d.issue} ${d.description}`).join('<br/>'), true);
|
54 |
+
} else {
|
55 |
+
errorHandler.message(data.data.message, true);
|
56 |
+
}
|
57 |
}
|
58 |
|
59 |
return;
|
modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js
CHANGED
@@ -9,7 +9,6 @@ class CreditCardRenderer {
|
|
9 |
this.cardValid = false;
|
10 |
this.formValid = false;
|
11 |
this.currentHostedFieldsInstance = null;
|
12 |
-
this.formSubmissionSubscribed = false;
|
13 |
}
|
14 |
|
15 |
render(wrapper, contextConfig) {
|
@@ -122,7 +121,7 @@ class CreditCardRenderer {
|
|
122 |
|
123 |
});
|
124 |
|
125 |
-
if (
|
126 |
document.querySelector(wrapper + ' button').addEventListener(
|
127 |
'click',
|
128 |
event => {
|
@@ -130,7 +129,8 @@ class CreditCardRenderer {
|
|
130 |
this._submit(contextConfig);
|
131 |
}
|
132 |
);
|
133 |
-
|
|
|
134 |
}
|
135 |
});
|
136 |
|
@@ -143,7 +143,7 @@ class CreditCardRenderer {
|
|
143 |
}
|
144 |
|
145 |
disableFields() {
|
146 |
-
if(
|
147 |
this.currentHostedFieldsInstance.setAttribute({
|
148 |
field: 'number',
|
149 |
attribute: 'disabled'
|
@@ -160,7 +160,7 @@ class CreditCardRenderer {
|
|
160 |
}
|
161 |
|
162 |
enableFields() {
|
163 |
-
if(
|
164 |
this.currentHostedFieldsInstance.removeAttribute({
|
165 |
field: 'number',
|
166 |
attribute: 'disabled'
|
9 |
this.cardValid = false;
|
10 |
this.formValid = false;
|
11 |
this.currentHostedFieldsInstance = null;
|
|
|
12 |
}
|
13 |
|
14 |
render(wrapper, contextConfig) {
|
121 |
|
122 |
});
|
123 |
|
124 |
+
if (document.querySelector(wrapper).getAttribute('data-ppcp-subscribed') !== true) {
|
125 |
document.querySelector(wrapper + ' button').addEventListener(
|
126 |
'click',
|
127 |
event => {
|
129 |
this._submit(contextConfig);
|
130 |
}
|
131 |
);
|
132 |
+
|
133 |
+
document.querySelector(wrapper).setAttribute('data-ppcp-subscribed', true);
|
134 |
}
|
135 |
});
|
136 |
|
143 |
}
|
144 |
|
145 |
disableFields() {
|
146 |
+
if (this.currentHostedFieldsInstance) {
|
147 |
this.currentHostedFieldsInstance.setAttribute({
|
148 |
field: 'number',
|
149 |
attribute: 'disabled'
|
160 |
}
|
161 |
|
162 |
enableFields() {
|
163 |
+
if (this.currentHostedFieldsInstance) {
|
164 |
this.currentHostedFieldsInstance.removeAttribute({
|
165 |
field: 'number',
|
166 |
attribute: 'disabled'
|
modules/ppcp-button/services.php
CHANGED
@@ -52,7 +52,7 @@ return array(
|
|
52 |
*
|
53 |
* @var State $state
|
54 |
*/
|
55 |
-
if ( $state->current_state()
|
56 |
return new DisabledSmartButton();
|
57 |
}
|
58 |
$settings = $container->get( 'wcgateway.settings' );
|
@@ -73,6 +73,7 @@ return array(
|
|
73 |
$currency = $container->get( 'api.shop.currency' );
|
74 |
return new SmartButton(
|
75 |
$container->get( 'button.url' ),
|
|
|
76 |
$container->get( 'session.handler' ),
|
77 |
$settings,
|
78 |
$payer_factory,
|
52 |
*
|
53 |
* @var State $state
|
54 |
*/
|
55 |
+
if ( $state->current_state() !== State::STATE_ONBOARDED ) {
|
56 |
return new DisabledSmartButton();
|
57 |
}
|
58 |
$settings = $container->get( 'wcgateway.settings' );
|
73 |
$currency = $container->get( 'api.shop.currency' );
|
74 |
return new SmartButton(
|
75 |
$container->get( 'button.url' ),
|
76 |
+
$container->get( 'ppcp.asset-version' ),
|
77 |
$container->get( 'session.handler' ),
|
78 |
$settings,
|
79 |
$payer_factory,
|
modules/ppcp-button/src/Assets/SmartButton.php
CHANGED
@@ -44,6 +44,13 @@ class SmartButton implements SmartButtonInterface {
|
|
44 |
*/
|
45 |
private $module_url;
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
/**
|
48 |
* The Session Handler.
|
49 |
*
|
@@ -125,6 +132,7 @@ class SmartButton implements SmartButtonInterface {
|
|
125 |
* SmartButton constructor.
|
126 |
*
|
127 |
* @param string $module_url The URL to the module.
|
|
|
128 |
* @param SessionHandler $session_handler The Session Handler.
|
129 |
* @param Settings $settings The Settings.
|
130 |
* @param PayerFactory $payer_factory The Payer factory.
|
@@ -140,6 +148,7 @@ class SmartButton implements SmartButtonInterface {
|
|
140 |
*/
|
141 |
public function __construct(
|
142 |
string $module_url,
|
|
|
143 |
SessionHandler $session_handler,
|
144 |
Settings $settings,
|
145 |
PayerFactory $payer_factory,
|
@@ -155,6 +164,7 @@ class SmartButton implements SmartButtonInterface {
|
|
155 |
) {
|
156 |
|
157 |
$this->module_url = $module_url;
|
|
|
158 |
$this->session_handler = $session_handler;
|
159 |
$this->settings = $settings;
|
160 |
$this->payer_factory = $payer_factory;
|
@@ -406,7 +416,7 @@ class SmartButton implements SmartButtonInterface {
|
|
406 |
'ppcp-hosted-fields',
|
407 |
untrailingslashit( $this->module_url ) . '/assets/css/hosted-fields.css',
|
408 |
array(),
|
409 |
-
|
410 |
);
|
411 |
}
|
412 |
if ( $load_script ) {
|
@@ -414,7 +424,7 @@ class SmartButton implements SmartButtonInterface {
|
|
414 |
'ppcp-smart-button',
|
415 |
untrailingslashit( $this->module_url ) . '/assets/js/button.js',
|
416 |
array( 'jquery' ),
|
417 |
-
|
418 |
true
|
419 |
);
|
420 |
|
@@ -442,6 +452,12 @@ class SmartButton implements SmartButtonInterface {
|
|
442 |
return;
|
443 |
}
|
444 |
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
echo '<div id="ppc-button"></div>';
|
446 |
}
|
447 |
|
@@ -1012,38 +1028,50 @@ class SmartButton implements SmartButtonInterface {
|
|
1012 |
}
|
1013 |
|
1014 |
/**
|
1015 |
-
*
|
1016 |
*
|
1017 |
* @return string Action name.
|
1018 |
*/
|
1019 |
private function checkout_button_renderer_hook(): string {
|
|
|
|
|
|
|
1020 |
return (string) apply_filters( 'woocommerce_paypal_payments_checkout_button_renderer_hook', 'woocommerce_review_order_after_payment' );
|
1021 |
}
|
1022 |
|
1023 |
/**
|
1024 |
-
*
|
1025 |
*
|
1026 |
* @return string
|
1027 |
*/
|
1028 |
private function checkout_dcc_button_renderer_hook(): string {
|
|
|
|
|
|
|
1029 |
return (string) apply_filters( 'woocommerce_paypal_payments_checkout_dcc_renderer_hook', 'woocommerce_review_order_after_submit' );
|
1030 |
}
|
1031 |
|
1032 |
/**
|
1033 |
-
*
|
1034 |
*
|
1035 |
* @return string
|
1036 |
*/
|
1037 |
private function pay_order_renderer_hook(): string {
|
|
|
|
|
|
|
1038 |
return (string) apply_filters( 'woocommerce_paypal_payments_pay_order_dcc_renderer_hook', 'woocommerce_pay_order_after_submit' );
|
1039 |
}
|
1040 |
|
1041 |
/**
|
1042 |
-
*
|
1043 |
*
|
1044 |
* @return string
|
1045 |
*/
|
1046 |
private function proceed_to_checkout_button_renderer_hook(): string {
|
|
|
|
|
|
|
1047 |
return (string) apply_filters(
|
1048 |
'woocommerce_paypal_payments_proceed_to_checkout_button_renderer_hook',
|
1049 |
'woocommerce_proceed_to_checkout'
|
@@ -1051,11 +1079,14 @@ class SmartButton implements SmartButtonInterface {
|
|
1051 |
}
|
1052 |
|
1053 |
/**
|
1054 |
-
*
|
1055 |
*
|
1056 |
* @return string
|
1057 |
*/
|
1058 |
private function mini_cart_button_renderer_hook(): string {
|
|
|
|
|
|
|
1059 |
return (string) apply_filters(
|
1060 |
'woocommerce_paypal_payments_mini_cart_button_renderer_hook',
|
1061 |
'woocommerce_widget_shopping_cart_after_buttons'
|
@@ -1063,11 +1094,14 @@ class SmartButton implements SmartButtonInterface {
|
|
1063 |
}
|
1064 |
|
1065 |
/**
|
1066 |
-
*
|
1067 |
*
|
1068 |
* @return string
|
1069 |
*/
|
1070 |
private function single_product_renderer_hook(): string {
|
|
|
|
|
|
|
1071 |
return (string) apply_filters( 'woocommerce_paypal_payments_single_product_renderer_hook', 'woocommerce_single_product_summary' );
|
1072 |
}
|
1073 |
}
|
44 |
*/
|
45 |
private $module_url;
|
46 |
|
47 |
+
/**
|
48 |
+
* The assets version.
|
49 |
+
*
|
50 |
+
* @var string
|
51 |
+
*/
|
52 |
+
private $version;
|
53 |
+
|
54 |
/**
|
55 |
* The Session Handler.
|
56 |
*
|
132 |
* SmartButton constructor.
|
133 |
*
|
134 |
* @param string $module_url The URL to the module.
|
135 |
+
* @param string $version The assets version.
|
136 |
* @param SessionHandler $session_handler The Session Handler.
|
137 |
* @param Settings $settings The Settings.
|
138 |
* @param PayerFactory $payer_factory The Payer factory.
|
148 |
*/
|
149 |
public function __construct(
|
150 |
string $module_url,
|
151 |
+
string $version,
|
152 |
SessionHandler $session_handler,
|
153 |
Settings $settings,
|
154 |
PayerFactory $payer_factory,
|
164 |
) {
|
165 |
|
166 |
$this->module_url = $module_url;
|
167 |
+
$this->version = $version;
|
168 |
$this->session_handler = $session_handler;
|
169 |
$this->settings = $settings;
|
170 |
$this->payer_factory = $payer_factory;
|
416 |
'ppcp-hosted-fields',
|
417 |
untrailingslashit( $this->module_url ) . '/assets/css/hosted-fields.css',
|
418 |
array(),
|
419 |
+
$this->version
|
420 |
);
|
421 |
}
|
422 |
if ( $load_script ) {
|
424 |
'ppcp-smart-button',
|
425 |
untrailingslashit( $this->module_url ) . '/assets/js/button.js',
|
426 |
array( 'jquery' ),
|
427 |
+
$this->version,
|
428 |
true
|
429 |
);
|
430 |
|
452 |
return;
|
453 |
}
|
454 |
|
455 |
+
$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
|
456 |
+
|
457 |
+
if ( ! isset( $available_gateways['ppcp-gateway'] ) ) {
|
458 |
+
return;
|
459 |
+
}
|
460 |
+
|
461 |
echo '<div id="ppc-button"></div>';
|
462 |
}
|
463 |
|
1028 |
}
|
1029 |
|
1030 |
/**
|
1031 |
+
* Returns the action name that PayPal button will use for rendering on the checkout page.
|
1032 |
*
|
1033 |
* @return string Action name.
|
1034 |
*/
|
1035 |
private function checkout_button_renderer_hook(): string {
|
1036 |
+
/**
|
1037 |
+
* The filter returning the action name that PayPal button will use for rendering on the checkout page.
|
1038 |
+
*/
|
1039 |
return (string) apply_filters( 'woocommerce_paypal_payments_checkout_button_renderer_hook', 'woocommerce_review_order_after_payment' );
|
1040 |
}
|
1041 |
|
1042 |
/**
|
1043 |
+
* Returns the action name that PayPal DCC button will use for rendering on the checkout page.
|
1044 |
*
|
1045 |
* @return string
|
1046 |
*/
|
1047 |
private function checkout_dcc_button_renderer_hook(): string {
|
1048 |
+
/**
|
1049 |
+
* The filter returning the action name that PayPal DCC button will use for rendering on the checkout page.
|
1050 |
+
*/
|
1051 |
return (string) apply_filters( 'woocommerce_paypal_payments_checkout_dcc_renderer_hook', 'woocommerce_review_order_after_submit' );
|
1052 |
}
|
1053 |
|
1054 |
/**
|
1055 |
+
* Returns the action name that PayPal button and Pay Later message will use for rendering on the pay-order page.
|
1056 |
*
|
1057 |
* @return string
|
1058 |
*/
|
1059 |
private function pay_order_renderer_hook(): string {
|
1060 |
+
/**
|
1061 |
+
* The filter returning the action name that PayPal button and Pay Later message will use for rendering on the pay-order page.
|
1062 |
+
*/
|
1063 |
return (string) apply_filters( 'woocommerce_paypal_payments_pay_order_dcc_renderer_hook', 'woocommerce_pay_order_after_submit' );
|
1064 |
}
|
1065 |
|
1066 |
/**
|
1067 |
+
* Returns action name that PayPal button will use for rendering next to Proceed to checkout button (normally displayed in cart).
|
1068 |
*
|
1069 |
* @return string
|
1070 |
*/
|
1071 |
private function proceed_to_checkout_button_renderer_hook(): string {
|
1072 |
+
/**
|
1073 |
+
* The filter returning the action name that PayPal button will use for rendering next to Proceed to checkout button (normally displayed in cart).
|
1074 |
+
*/
|
1075 |
return (string) apply_filters(
|
1076 |
'woocommerce_paypal_payments_proceed_to_checkout_button_renderer_hook',
|
1077 |
'woocommerce_proceed_to_checkout'
|
1079 |
}
|
1080 |
|
1081 |
/**
|
1082 |
+
* Returns the action name that PayPal button will use for rendering in the WC mini cart.
|
1083 |
*
|
1084 |
* @return string
|
1085 |
*/
|
1086 |
private function mini_cart_button_renderer_hook(): string {
|
1087 |
+
/**
|
1088 |
+
* The filter returning the action name that PayPal button will use for rendering in the WC mini cart.
|
1089 |
+
*/
|
1090 |
return (string) apply_filters(
|
1091 |
'woocommerce_paypal_payments_mini_cart_button_renderer_hook',
|
1092 |
'woocommerce_widget_shopping_cart_after_buttons'
|
1094 |
}
|
1095 |
|
1096 |
/**
|
1097 |
+
* Returns the action name that PayPal button and Pay Later message will use for rendering on the single product page.
|
1098 |
*
|
1099 |
* @return string
|
1100 |
*/
|
1101 |
private function single_product_renderer_hook(): string {
|
1102 |
+
/**
|
1103 |
+
* The filter returning the action name that PayPal button and Pay Later message will use for rendering on the single product page.
|
1104 |
+
*/
|
1105 |
return (string) apply_filters( 'woocommerce_paypal_payments_single_product_renderer_hook', 'woocommerce_single_product_summary' );
|
1106 |
}
|
1107 |
}
|
modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php
CHANGED
@@ -12,8 +12,10 @@ namespace WooCommerce\PayPalCommerce\Button\Endpoint;
|
|
12 |
use Exception;
|
13 |
use Psr\Log\LoggerInterface;
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
|
|
|
15 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Order;
|
16 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Payer;
|
|
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentMethod;
|
18 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit;
|
19 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
@@ -337,6 +339,15 @@ class CreateOrderEndpoint implements EndpointInterface {
|
|
337 |
|
338 |
$payer = $this->payer_factory->from_paypal_response( json_decode( wp_json_encode( $data['payer'] ) ) );
|
339 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
return $payer;
|
341 |
}
|
342 |
|
12 |
use Exception;
|
13 |
use Psr\Log\LoggerInterface;
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
|
15 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\Address;
|
16 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Order;
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Payer;
|
18 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\PayerName;
|
19 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentMethod;
|
20 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit;
|
21 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
339 |
|
340 |
$payer = $this->payer_factory->from_paypal_response( json_decode( wp_json_encode( $data['payer'] ) ) );
|
341 |
}
|
342 |
+
|
343 |
+
if ( ! $payer && isset( $data['form'] ) ) {
|
344 |
+
parse_str( $data['form'], $form_fields );
|
345 |
+
|
346 |
+
if ( isset( $form_fields['billing_email'] ) && '' !== $form_fields['billing_email'] ) {
|
347 |
+
return $this->payer_factory->from_checkout_form( $form_fields );
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
return $payer;
|
352 |
}
|
353 |
|
modules/ppcp-compat/src/PPEC/PPECHelper.php
CHANGED
@@ -89,6 +89,9 @@ class PPECHelper {
|
|
89 |
* @return bool
|
90 |
*/
|
91 |
public static function use_ppec_compat_layer_for_subscriptions() {
|
|
|
|
|
|
|
92 |
return ( ! self::is_gateway_available() ) && self::site_has_ppec_subscriptions() && apply_filters( 'woocommerce_paypal_payments_process_legacy_subscriptions', true );
|
93 |
}
|
94 |
|
89 |
* @return bool
|
90 |
*/
|
91 |
public static function use_ppec_compat_layer_for_subscriptions() {
|
92 |
+
/**
|
93 |
+
* The filter returning whether the compatibility layer for PPEC Subscriptions should be initialized.
|
94 |
+
*/
|
95 |
return ( ! self::is_gateway_available() ) && self::site_has_ppec_subscriptions() && apply_filters( 'woocommerce_paypal_payments_process_legacy_subscriptions', true );
|
96 |
}
|
97 |
|
modules/ppcp-onboarding/assets/css/onboarding.css
CHANGED
@@ -2,41 +2,28 @@
|
|
2 |
display: none;
|
3 |
}
|
4 |
|
5 |
-
|
6 |
-
#field-ppcp_disconnect_sandbox,
|
7 |
-
#field-ppcp_disconnect_production,
|
8 |
-
#field-merchant_id_production,
|
9 |
-
#field-client_id_production,
|
10 |
-
#field-client_secret_production,
|
11 |
-
#field-merchant_email_sandbox,
|
12 |
-
#field-merchant_id_sandbox,
|
13 |
-
#field-client_id_sandbox,
|
14 |
-
#field-client_secret_sandbox{
|
15 |
display: none;
|
16 |
}
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
#field-merchant_id_production.show,
|
21 |
-
#field-client_id_production.show,
|
22 |
-
#field-client_secret_production.show,
|
23 |
-
#field-merchant_email_sandbox.show,
|
24 |
-
#field-merchant_id_sandbox.show,
|
25 |
-
#field-client_id_sandbox.show,
|
26 |
-
#field-client_secret_sandbox.show {
|
27 |
-
display: table-row;
|
28 |
}
|
29 |
|
30 |
-
|
31 |
-
#field-toggle_manual_input.show span.show{
|
32 |
display: none;
|
33 |
}
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
-
#field-
|
39 |
-
#field-sandbox_toggle_manual_input button {
|
40 |
color: #0073aa;
|
41 |
transition-property: border, background, color;
|
42 |
transition-duration: .05s;
|
@@ -49,39 +36,8 @@
|
|
49 |
padding: 0;
|
50 |
}
|
51 |
|
52 |
-
#field-sandbox_toggle_manual_input.onboarded,
|
53 |
-
#field-production_toggle_manual_input.onboarded {
|
54 |
-
display: none;
|
55 |
-
}
|
56 |
-
|
57 |
-
|
58 |
-
#field-ppcp_disconnect_sandbox.onboarded,
|
59 |
-
#field-ppcp_disconnect_production.onboarded,
|
60 |
-
#field-merchant_email_sandbox.onboarded,
|
61 |
-
#field-merchant_id_sandbox.onboarded,
|
62 |
-
#field-client_id_sandbox.onboarded,
|
63 |
-
#field-client_secret_sandbox.onboarded,
|
64 |
-
#field-merchant_email_production.onboarded,
|
65 |
-
#field-merchant_id_production.onboarded,
|
66 |
-
#field-client_id_production.onboarded,
|
67 |
-
#field-client_secret_production.onboarded {
|
68 |
-
display:table-row;
|
69 |
-
}
|
70 |
-
#field-ppcp_disconnect_sandbox.onboarded.hide,
|
71 |
-
#field-ppcp_disconnect_production.onboarded.hide,
|
72 |
-
#field-merchant_email_sandbox.onboarded.hide,
|
73 |
-
#field-merchant_id_sandbox.onboarded.hide,
|
74 |
-
#field-client_id_sandbox.onboarded.hide,
|
75 |
-
#field-client_secret_sandbox.onboarded.hide,
|
76 |
-
#field-merchant_email_production.onboarded.hide,
|
77 |
-
#field-merchant_id_production.onboarded.hide,
|
78 |
-
#field-client_id_production.onboarded.hide,
|
79 |
-
#field-client_secret_production.onboarded.hide {
|
80 |
-
display:none;
|
81 |
-
}
|
82 |
-
|
83 |
/* Probably not the best location for this but will do until there's a general purpose settings CSS file. */
|
84 |
-
.ppcp-settings-field-heading td, .ppcp-settings-field-heading th {
|
85 |
padding-left: 0;
|
86 |
}
|
87 |
|
@@ -92,3 +48,123 @@
|
|
92 |
.input-text[pattern]:invalid {
|
93 |
border: red solid 2px;
|
94 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
display: none;
|
3 |
}
|
4 |
|
5 |
+
.ppcp-onboarded .ppcp-onboarding-element:not(.ppcp-always-shown-element) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
display: none;
|
7 |
}
|
8 |
+
|
9 |
+
.ppcp-onboarding .ppcp-settings-field:not(.ppcp-onboarding-element):not(.ppcp-always-shown-element) {
|
10 |
+
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
}
|
12 |
|
13 |
+
.ppcp-settings-field.hide {
|
|
|
14 |
display: none;
|
15 |
}
|
16 |
+
|
17 |
+
.ppcp-settings-field.show {
|
18 |
+
display: table-row;
|
19 |
+
}
|
20 |
+
|
21 |
+
label.error {
|
22 |
+
color: red;
|
23 |
+
font-weight: bold;
|
24 |
}
|
25 |
|
26 |
+
#field-toggle_manual_input button {
|
|
|
27 |
color: #0073aa;
|
28 |
transition-property: border, background, color;
|
29 |
transition-duration: .05s;
|
36 |
padding: 0;
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
/* Probably not the best location for this but will do until there's a general purpose settings CSS file. */
|
40 |
+
.ppcp-settings-field-heading td, .ppcp-settings-field-heading th, .ppcp-settings-no-title-col td {
|
41 |
padding-left: 0;
|
42 |
}
|
43 |
|
48 |
.input-text[pattern]:invalid {
|
49 |
border: red solid 2px;
|
50 |
}
|
51 |
+
|
52 |
+
ul.ppcp-onboarding-options, ul.ppcp-onboarding-options-sublist {
|
53 |
+
list-style: none;
|
54 |
+
}
|
55 |
+
|
56 |
+
ul.ppcp-onboarding-options-sublist {
|
57 |
+
margin-left: 15px;
|
58 |
+
}
|
59 |
+
|
60 |
+
.ppcp-muted-text {
|
61 |
+
opacity: 0.6;
|
62 |
+
font-size: 85%;
|
63 |
+
}
|
64 |
+
|
65 |
+
#field-ppcp_onboarading_header > td, #field-ppcp_onboarading_options > td {
|
66 |
+
padding: 0;
|
67 |
+
}
|
68 |
+
|
69 |
+
.ppcp-onboarding-header, .ppcp-onboarding-cards-options {
|
70 |
+
display: flex;
|
71 |
+
width: 1200px;
|
72 |
+
}
|
73 |
+
|
74 |
+
.ppcp-onboarding-header-left, .ppcp-onboarding-header-right {
|
75 |
+
flex: 50%;
|
76 |
+
}
|
77 |
+
|
78 |
+
.ppcp-onboarding-header-right {
|
79 |
+
text-align: right;
|
80 |
+
}
|
81 |
+
|
82 |
+
.ppcp-onboarding-header h2 {
|
83 |
+
margin-top: 0;
|
84 |
+
}
|
85 |
+
|
86 |
+
.ppcp-onboarding-header-left img {
|
87 |
+
height: 60px;
|
88 |
+
}
|
89 |
+
|
90 |
+
.ppcp-onboarding-header-cards img, .ppcp-onboarding-header-paypal-logos img {
|
91 |
+
margin: 5px;
|
92 |
+
}
|
93 |
+
|
94 |
+
.ppcp-onboarding-header-cards img {
|
95 |
+
height: 37px;
|
96 |
+
}
|
97 |
+
|
98 |
+
.ppcp-onboarding-header-paypal-logos img {
|
99 |
+
height: 32px;
|
100 |
+
}
|
101 |
+
|
102 |
+
.ppcp-onboarding-cards-options table {
|
103 |
+
margin-left: 35px;
|
104 |
+
margin-right: 15px;
|
105 |
+
}
|
106 |
+
|
107 |
+
.ppcp-onboarding-cards-options table th, .ppcp-onboarding-cards-options table td {
|
108 |
+
padding-top: 2px;
|
109 |
+
}
|
110 |
+
|
111 |
+
.ppcp-onboarding-cards-options table th {
|
112 |
+
width: 350px;
|
113 |
+
vertical-align: middle !important;
|
114 |
+
}
|
115 |
+
|
116 |
+
.ppcp-onboarding-cards-options table tr th, .ppcp-onboarding-cards-options table tr td {
|
117 |
+
padding-bottom: 0;
|
118 |
+
}
|
119 |
+
|
120 |
+
.ppcp-onboarding-cards-options table {
|
121 |
+
padding-bottom: 15px;
|
122 |
+
}
|
123 |
+
|
124 |
+
.ppcp-onboarding-cards-options table tr {
|
125 |
+
height: 40px;
|
126 |
+
}
|
127 |
+
|
128 |
+
.ppcp-onboarding-cards-screen {
|
129 |
+
flex: 1;
|
130 |
+
align-self: center;
|
131 |
+
}
|
132 |
+
|
133 |
+
.ppcp-onboarding-cards-screen img {
|
134 |
+
width: 100%;
|
135 |
+
}
|
136 |
+
|
137 |
+
.woocommerce-help-tip.ppcp-table-row-tooltip {
|
138 |
+
margin-left: -20px !important;
|
139 |
+
}
|
140 |
+
|
141 |
+
@media (max-width: 1200px) {
|
142 |
+
.ppcp-onboarding-header, .ppcp-onboarding-cards-options {
|
143 |
+
width: unset;
|
144 |
+
display: block;
|
145 |
+
}
|
146 |
+
|
147 |
+
.ppcp-onboarding-header-right {
|
148 |
+
text-align: left;
|
149 |
+
}
|
150 |
+
|
151 |
+
.ppcp-onboarding-cards-screen {
|
152 |
+
display: none;
|
153 |
+
}
|
154 |
+
|
155 |
+
.ppcp-onboarding-header-left img {
|
156 |
+
height: 30px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.ppcp-onboarding-header-cards img, .ppcp-onboarding-header-paypal-logos img {
|
160 |
+
margin: 2px;
|
161 |
+
}
|
162 |
+
|
163 |
+
.ppcp-onboarding-header-cards img {
|
164 |
+
height: 27px;
|
165 |
+
}
|
166 |
+
|
167 |
+
.ppcp-onboarding-header-paypal-logos img {
|
168 |
+
height: 23px;
|
169 |
+
}
|
170 |
+
}
|
modules/ppcp-onboarding/assets/images/cards-screen-acdc.png
ADDED
Binary file
|
modules/ppcp-onboarding/assets/images/cards-screen-basic.png
ADDED
Binary file
|
modules/ppcp-onboarding/assets/js/onboarding.js
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
-
// Onboarding.
|
2 |
const ppcp_onboarding = {
|
3 |
BUTTON_SELECTOR: '[data-paypal-onboard-button]',
|
4 |
PAYPAL_JS_ID: 'ppcp-onboarding-paypal-js',
|
5 |
_timeout: false,
|
6 |
|
|
|
|
|
|
|
7 |
init: function() {
|
8 |
document.addEventListener('DOMContentLoaded', this.reload);
|
9 |
},
|
@@ -15,7 +17,7 @@ const ppcp_onboarding = {
|
|
15 |
return;
|
16 |
}
|
17 |
|
18 |
-
// Add event listeners to buttons.
|
19 |
buttons.forEach(
|
20 |
(element) => {
|
21 |
if (element.hasAttribute('data-ppcp-button-initialized')) {
|
@@ -83,14 +85,13 @@ const ppcp_onboarding = {
|
|
83 |
authCode: authCode,
|
84 |
sharedId: sharedId,
|
85 |
nonce: PayPalCommerceGatewayOnboarding.nonce,
|
86 |
-
env: env
|
|
|
87 |
}
|
88 |
)
|
89 |
}
|
90 |
);
|
91 |
},
|
92 |
-
|
93 |
-
|
94 |
};
|
95 |
|
96 |
function ppcp_onboarding_sandboxCallback(...args) {
|
@@ -101,150 +102,151 @@ function ppcp_onboarding_productionCallback(...args) {
|
|
101 |
return ppcp_onboarding.loginSeller('production', ...args);
|
102 |
}
|
103 |
|
104 |
-
/**
|
105 |
-
* Since the PayPal modal will redirect the user a dirty form
|
106 |
-
* provokes an alert if the user wants to leave the page. Since the user
|
107 |
-
* needs to toggle the sandbox switch, we disable this dirty state with the
|
108 |
-
* following workaround for checkboxes.
|
109 |
-
*
|
110 |
-
* @param event
|
111 |
-
*/
|
112 |
-
const checkBoxOnClick = (event) => {
|
113 |
-
const value = event.target.checked;
|
114 |
-
if (event.target.getAttribute('id') === 'ppcp-sandbox_on') {
|
115 |
-
toggleSandboxProduction(! value);
|
116 |
-
}
|
117 |
-
event.preventDefault();
|
118 |
-
event.stopPropagation();
|
119 |
-
setTimeout( () => {
|
120 |
-
event.target.checked = value;
|
121 |
-
},1
|
122 |
-
);
|
123 |
-
};
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Toggles the credential input fields.
|
127 |
-
*
|
128 |
-
* @param forProduction
|
129 |
-
*/
|
130 |
-
const credentialToggle = (forProduction) => {
|
131 |
-
|
132 |
-
const sandboxClassSelectors = [
|
133 |
-
'#field-ppcp_disconnect_sandbox',
|
134 |
-
'#field-merchant_email_sandbox',
|
135 |
-
'#field-merchant_id_sandbox',
|
136 |
-
'#field-client_id_sandbox',
|
137 |
-
'#field-client_secret_sandbox',
|
138 |
-
];
|
139 |
-
const productionClassSelectors = [
|
140 |
-
'#field-ppcp_disconnect_production',
|
141 |
-
'#field-merchant_email_production',
|
142 |
-
'#field-merchant_id_production',
|
143 |
-
'#field-client_id_production',
|
144 |
-
'#field-client_secret_production',
|
145 |
-
];
|
146 |
-
|
147 |
-
const selectors = forProduction ? productionClassSelectors : sandboxClassSelectors;
|
148 |
-
document.querySelectorAll(selectors.join()).forEach(
|
149 |
-
(element) => {element.classList.toggle('show')}
|
150 |
-
)
|
151 |
-
};
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Toggles the visibility of the sandbox/production input fields.
|
155 |
-
*
|
156 |
-
* @param showProduction
|
157 |
-
*/
|
158 |
-
const toggleSandboxProduction = (showProduction) => {
|
159 |
-
const productionDisplaySelectors = [
|
160 |
-
'#field-credentials_production_heading',
|
161 |
-
'#field-production_toggle_manual_input',
|
162 |
-
'#field-ppcp_onboarding_production',
|
163 |
-
];
|
164 |
-
const productionClassSelectors = [
|
165 |
-
|
166 |
-
'#field-ppcp_disconnect_production',
|
167 |
-
'#field-merchant_email_production',
|
168 |
-
'#field-merchant_id_production',
|
169 |
-
'#field-client_id_production',
|
170 |
-
'#field-client_secret_production',
|
171 |
-
];
|
172 |
-
const sandboxDisplaySelectors = [
|
173 |
-
'#field-credentials_sandbox_heading',
|
174 |
-
'#field-sandbox_toggle_manual_input',
|
175 |
-
'#field-ppcp_onboarding_sandbox',
|
176 |
-
];
|
177 |
-
const sandboxClassSelectors = [
|
178 |
-
'#field-ppcp_disconnect_sandbox',
|
179 |
-
'#field-merchant_email_sandbox',
|
180 |
-
'#field-merchant_id_sandbox',
|
181 |
-
'#field-client_id_sandbox',
|
182 |
-
'#field-client_secret_sandbox',
|
183 |
-
];
|
184 |
-
|
185 |
-
if (showProduction) {
|
186 |
-
document.querySelectorAll(productionDisplaySelectors.join()).forEach(
|
187 |
-
(element) => {element.style.display = ''}
|
188 |
-
);
|
189 |
-
document.querySelectorAll(sandboxDisplaySelectors.join()).forEach(
|
190 |
-
(element) => {element.style.display = 'none'}
|
191 |
-
);
|
192 |
-
document.querySelectorAll(productionClassSelectors.join()).forEach(
|
193 |
-
(element) => {element.classList.remove('hide')}
|
194 |
-
);
|
195 |
-
document.querySelectorAll(sandboxClassSelectors.join()).forEach(
|
196 |
-
(element) => {
|
197 |
-
element.classList.remove('show');
|
198 |
-
element.classList.add('hide');
|
199 |
-
}
|
200 |
-
);
|
201 |
-
return;
|
202 |
-
}
|
203 |
-
document.querySelectorAll(productionDisplaySelectors.join()).forEach(
|
204 |
-
(element) => {element.style.display = 'none'}
|
205 |
-
);
|
206 |
-
document.querySelectorAll(sandboxDisplaySelectors.join()).forEach(
|
207 |
-
(element) => {element.style.display = ''}
|
208 |
-
);
|
209 |
-
|
210 |
-
document.querySelectorAll(sandboxClassSelectors.join()).forEach(
|
211 |
-
(element) => {element.classList.remove('hide')}
|
212 |
-
);
|
213 |
-
document.querySelectorAll(productionClassSelectors.join()).forEach(
|
214 |
-
(element) => {
|
215 |
-
element.classList.remove('show');
|
216 |
-
element.classList.add('hide');
|
217 |
-
}
|
218 |
-
)
|
219 |
-
};
|
220 |
-
|
221 |
-
const disconnect = (event) => {
|
222 |
-
event.preventDefault();
|
223 |
-
const fields = event.target.classList.contains('production') ? [
|
224 |
-
'#field-merchant_email_production input',
|
225 |
-
'#field-merchant_id_production input',
|
226 |
-
'#field-client_id_production input',
|
227 |
-
'#field-client_secret_production input',
|
228 |
-
] : [
|
229 |
-
'#field-merchant_email_sandbox input',
|
230 |
-
'#field-merchant_id_sandbox input',
|
231 |
-
'#field-client_id_sandbox input',
|
232 |
-
'#field-client_secret_sandbox input',
|
233 |
-
];
|
234 |
-
|
235 |
-
document.querySelectorAll(fields.join()).forEach(
|
236 |
-
(element) => {
|
237 |
-
element.value = '';
|
238 |
-
}
|
239 |
-
);
|
240 |
-
document.querySelector('.woocommerce-save-button').click();
|
241 |
-
};
|
242 |
-
|
243 |
(() => {
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
document.querySelectorAll('.ppcp-disconnect').forEach(
|
250 |
(button) => {
|
@@ -255,43 +257,89 @@ const disconnect = (event) => {
|
|
255 |
}
|
256 |
);
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
(event) => {
|
263 |
-
const value = event.target.checked;
|
264 |
|
265 |
-
|
|
|
|
|
|
|
266 |
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
}, 1
|
272 |
-
);
|
273 |
-
}
|
274 |
-
);
|
275 |
-
}
|
276 |
|
277 |
-
|
278 |
-
// (checkbox) => {
|
279 |
-
// checkbox.addEventListener('click', checkBoxOnClick);
|
280 |
-
// }
|
281 |
-
// );
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
|
296 |
// Onboarding buttons.
|
297 |
ppcp_onboarding.init();
|
|
|
1 |
const ppcp_onboarding = {
|
2 |
BUTTON_SELECTOR: '[data-paypal-onboard-button]',
|
3 |
PAYPAL_JS_ID: 'ppcp-onboarding-paypal-js',
|
4 |
_timeout: false,
|
5 |
|
6 |
+
STATE_START: 'start',
|
7 |
+
STATE_ONBOARDED: 'onboarded',
|
8 |
+
|
9 |
init: function() {
|
10 |
document.addEventListener('DOMContentLoaded', this.reload);
|
11 |
},
|
17 |
return;
|
18 |
}
|
19 |
|
20 |
+
// Add event listeners to buttons preventing link clicking if PayPal init failed.
|
21 |
buttons.forEach(
|
22 |
(element) => {
|
23 |
if (element.hasAttribute('data-ppcp-button-initialized')) {
|
85 |
authCode: authCode,
|
86 |
sharedId: sharedId,
|
87 |
nonce: PayPalCommerceGatewayOnboarding.nonce,
|
88 |
+
env: env,
|
89 |
+
acceptCards: document.querySelector('#ppcp-onboarding-accept-cards').checked,
|
90 |
}
|
91 |
)
|
92 |
}
|
93 |
);
|
94 |
},
|
|
|
|
|
95 |
};
|
96 |
|
97 |
function ppcp_onboarding_sandboxCallback(...args) {
|
102 |
return ppcp_onboarding.loginSeller('production', ...args);
|
103 |
}
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
(() => {
|
106 |
+
const productionCredentialElementsSelectors = [
|
107 |
+
'#field-merchant_email_production',
|
108 |
+
'#field-merchant_id_production',
|
109 |
+
'#field-client_id_production',
|
110 |
+
'#field-client_secret_production',
|
111 |
+
];
|
112 |
+
const sandboxCredentialElementsSelectors = [
|
113 |
+
'#field-merchant_email_sandbox',
|
114 |
+
'#field-merchant_id_sandbox',
|
115 |
+
'#field-client_id_sandbox',
|
116 |
+
'#field-client_secret_sandbox',
|
117 |
+
];
|
118 |
+
|
119 |
+
const updateOptionsState = () => {
|
120 |
+
const cardsChk = document.querySelector('#ppcp-onboarding-accept-cards');
|
121 |
+
if (!cardsChk) {
|
122 |
+
return;
|
123 |
+
}
|
124 |
+
|
125 |
+
document.querySelectorAll('#ppcp-onboarding-dcc-options input').forEach(input => {
|
126 |
+
input.disabled = !cardsChk.checked;
|
127 |
+
});
|
128 |
+
|
129 |
+
const basicRb = document.querySelector('#ppcp-onboarding-dcc-basic');
|
130 |
+
|
131 |
+
const isExpress = !cardsChk.checked || basicRb.checked;
|
132 |
+
|
133 |
+
const expressButtonSelectors = [
|
134 |
+
'#field-ppcp_onboarding_production_express',
|
135 |
+
'#field-ppcp_onboarding_sandbox_express',
|
136 |
+
];
|
137 |
+
const ppcpButtonSelectors = [
|
138 |
+
'#field-ppcp_onboarding_production_ppcp',
|
139 |
+
'#field-ppcp_onboarding_sandbox_ppcp',
|
140 |
+
];
|
141 |
+
|
142 |
+
document.querySelectorAll(expressButtonSelectors.join()).forEach(
|
143 |
+
element => element.style.display = isExpress ? '' : 'none'
|
144 |
+
);
|
145 |
+
document.querySelectorAll(ppcpButtonSelectors.join()).forEach(
|
146 |
+
element => element.style.display = !isExpress ? '' : 'none'
|
147 |
+
);
|
148 |
+
|
149 |
+
const screemImg = document.querySelector('#ppcp-onboarding-cards-screen-img');
|
150 |
+
if (screemImg) {
|
151 |
+
const currentRb = Array.from(document.querySelectorAll('#ppcp-onboarding-dcc-options input[type="radio"]'))
|
152 |
+
.filter(rb => rb.checked)[0] ?? null;
|
153 |
+
|
154 |
+
const imgUrl = currentRb.getAttribute('data-screen-url');
|
155 |
+
screemImg.src = imgUrl;
|
156 |
+
}
|
157 |
+
};
|
158 |
+
|
159 |
+
const updateManualInputControls = (shown, isSandbox, isAnyEnvOnboarded) => {
|
160 |
+
const productionElementsSelectors = productionCredentialElementsSelectors;
|
161 |
+
const sandboxElementsSelectors = sandboxCredentialElementsSelectors;
|
162 |
+
const otherElementsSelectors = [
|
163 |
+
'.woocommerce-save-button',
|
164 |
+
];
|
165 |
+
if (!isAnyEnvOnboarded) {
|
166 |
+
otherElementsSelectors.push('#field-sandbox_on');
|
167 |
+
}
|
168 |
+
|
169 |
+
document.querySelectorAll(productionElementsSelectors.join()).forEach(
|
170 |
+
element => {
|
171 |
+
element.classList.remove('hide', 'show');
|
172 |
+
element.classList.add((shown && !isSandbox) ? 'show' : 'hide');
|
173 |
+
}
|
174 |
+
);
|
175 |
+
document.querySelectorAll(sandboxElementsSelectors.join()).forEach(
|
176 |
+
element => {
|
177 |
+
element.classList.remove('hide', 'show');
|
178 |
+
element.classList.add((shown && isSandbox) ? 'show' : 'hide');
|
179 |
+
}
|
180 |
+
);
|
181 |
+
document.querySelectorAll(otherElementsSelectors.join()).forEach(
|
182 |
+
element => element.style.display = shown ? '' : 'none'
|
183 |
+
);
|
184 |
+
};
|
185 |
+
|
186 |
+
const updateEnvironmentControls = (isSandbox) => {
|
187 |
+
const productionElementsSelectors = [
|
188 |
+
'#field-ppcp_disconnect_production',
|
189 |
+
'#field-credentials_production_heading',
|
190 |
+
];
|
191 |
+
const sandboxElementsSelectors = [
|
192 |
+
'#field-ppcp_disconnect_sandbox',
|
193 |
+
'#field-credentials_sandbox_heading',
|
194 |
+
];
|
195 |
+
|
196 |
+
document.querySelectorAll(productionElementsSelectors.join()).forEach(
|
197 |
+
element => element.style.display = !isSandbox ? '' : 'none'
|
198 |
+
);
|
199 |
+
document.querySelectorAll(sandboxElementsSelectors.join()).forEach(
|
200 |
+
element => element.style.display = isSandbox ? '' : 'none'
|
201 |
+
);
|
202 |
+
};
|
203 |
+
|
204 |
+
let isDisconnecting = false;
|
205 |
+
|
206 |
+
const disconnect = (event) => {
|
207 |
+
event.preventDefault();
|
208 |
+
const fields = event.target.classList.contains('production') ? productionCredentialElementsSelectors : sandboxCredentialElementsSelectors;
|
209 |
+
|
210 |
+
document.querySelectorAll(fields.map(f => f + ' input').join()).forEach(
|
211 |
+
(element) => {
|
212 |
+
element.value = '';
|
213 |
+
}
|
214 |
+
);
|
215 |
+
|
216 |
+
isDisconnecting = true;
|
217 |
+
|
218 |
+
document.querySelector('.woocommerce-save-button').click();
|
219 |
+
};
|
220 |
+
|
221 |
+
// Prevent the message about unsaved checkbox/radiobutton when reloading the page.
|
222 |
+
// (WC listens for changes on all inputs and sets dirty flag until form submission)
|
223 |
+
const preventDirtyCheckboxPropagation = event => {
|
224 |
+
event.preventDefault();
|
225 |
+
event.stopPropagation();
|
226 |
+
|
227 |
+
const value = event.target.checked;
|
228 |
+
setTimeout( () => {
|
229 |
+
event.target.checked = value;
|
230 |
+
}, 1
|
231 |
+
);
|
232 |
+
};
|
233 |
+
|
234 |
+
const sandboxSwitchElement = document.querySelector('#ppcp-sandbox_on');
|
235 |
+
|
236 |
+
const validate = () => {
|
237 |
+
const selectors = sandboxSwitchElement.checked ? sandboxCredentialElementsSelectors : productionCredentialElementsSelectors;
|
238 |
+
const values = selectors.map(s => document.querySelector(s + ' input')).map(el => el.value);
|
239 |
+
|
240 |
+
const errors = [];
|
241 |
+
if (values.some(v => !v)) {
|
242 |
+
errors.push(PayPalCommerceGatewayOnboarding.error_messages.no_credentials);
|
243 |
+
}
|
244 |
+
|
245 |
+
return errors;
|
246 |
+
};
|
247 |
+
|
248 |
+
const isAnyEnvOnboarded = PayPalCommerceGatewayOnboarding.sandbox_state === ppcp_onboarding.STATE_ONBOARDED ||
|
249 |
+
PayPalCommerceGatewayOnboarding.production_state === ppcp_onboarding.STATE_ONBOARDED;
|
250 |
|
251 |
document.querySelectorAll('.ppcp-disconnect').forEach(
|
252 |
(button) => {
|
257 |
}
|
258 |
);
|
259 |
|
260 |
+
document.querySelectorAll('.ppcp-onboarding-options input').forEach(
|
261 |
+
(element) => {
|
262 |
+
element.addEventListener('click', event => {
|
263 |
+
updateOptionsState();
|
|
|
|
|
264 |
|
265 |
+
preventDirtyCheckboxPropagation(event);
|
266 |
+
});
|
267 |
+
}
|
268 |
+
);
|
269 |
|
270 |
+
const isSandboxInBackend = PayPalCommerceGatewayOnboarding.current_env === 'sandbox';
|
271 |
+
if (sandboxSwitchElement.checked !== isSandboxInBackend) {
|
272 |
+
sandboxSwitchElement.checked = isSandboxInBackend;
|
273 |
+
}
|
|
|
|
|
|
|
|
|
|
|
274 |
|
275 |
+
updateOptionsState();
|
|
|
|
|
|
|
|
|
276 |
|
277 |
+
const settingsContainer = document.querySelector('#mainform .form-table');
|
278 |
+
|
279 |
+
const markCurrentOnboardingState = (isOnboarded) => {
|
280 |
+
settingsContainer.classList.remove('ppcp-onboarded', 'ppcp-onboarding');
|
281 |
+
settingsContainer.classList.add(isOnboarded ? 'ppcp-onboarded' : 'ppcp-onboarding');
|
282 |
+
}
|
283 |
+
|
284 |
+
markCurrentOnboardingState(PayPalCommerceGatewayOnboarding.current_state === ppcp_onboarding.STATE_ONBOARDED);
|
285 |
+
|
286 |
+
const manualInputToggleButton = document.querySelector('#field-toggle_manual_input button');
|
287 |
+
let isManualInputShown = PayPalCommerceGatewayOnboarding.current_state === ppcp_onboarding.STATE_ONBOARDED;
|
288 |
+
|
289 |
+
manualInputToggleButton.addEventListener(
|
290 |
+
'click',
|
291 |
+
(event) => {
|
292 |
+
event.preventDefault();
|
293 |
+
|
294 |
+
isManualInputShown = !isManualInputShown;
|
295 |
+
|
296 |
+
updateManualInputControls(isManualInputShown, sandboxSwitchElement.checked, isAnyEnvOnboarded);
|
297 |
+
}
|
298 |
+
);
|
299 |
+
|
300 |
+
sandboxSwitchElement.addEventListener(
|
301 |
+
'click',
|
302 |
+
(event) => {
|
303 |
+
const isSandbox = sandboxSwitchElement.checked;
|
304 |
+
|
305 |
+
if (isAnyEnvOnboarded) {
|
306 |
+
const onboardingState = isSandbox ? PayPalCommerceGatewayOnboarding.sandbox_state : PayPalCommerceGatewayOnboarding.production_state;
|
307 |
+
const isOnboarded = onboardingState === ppcp_onboarding.STATE_ONBOARDED;
|
308 |
+
|
309 |
+
markCurrentOnboardingState(isOnboarded);
|
310 |
+
isManualInputShown = isOnboarded;
|
311 |
+
}
|
312 |
+
|
313 |
+
updateManualInputControls(isManualInputShown, isSandbox, isAnyEnvOnboarded);
|
314 |
+
|
315 |
+
updateEnvironmentControls(isSandbox);
|
316 |
+
|
317 |
+
preventDirtyCheckboxPropagation(event);
|
318 |
+
}
|
319 |
+
);
|
320 |
+
|
321 |
+
updateManualInputControls(isManualInputShown, sandboxSwitchElement.checked, isAnyEnvOnboarded);
|
322 |
+
|
323 |
+
updateEnvironmentControls(sandboxSwitchElement.checked);
|
324 |
+
|
325 |
+
document.querySelector('#mainform').addEventListener('submit', e => {
|
326 |
+
if (isDisconnecting) {
|
327 |
+
return;
|
328 |
+
}
|
329 |
+
|
330 |
+
const errors = validate();
|
331 |
+
if (errors.length) {
|
332 |
+
e.preventDefault();
|
333 |
+
|
334 |
+
const errorLabel = document.querySelector('#ppcp-form-errors-label');
|
335 |
+
errorLabel.parentElement.parentElement.classList.remove('hide');
|
336 |
+
|
337 |
+
errorLabel.innerHTML = errors.join('<br/>');
|
338 |
+
|
339 |
+
errorLabel.scrollIntoView();
|
340 |
+
window.scrollBy(0, -120); // WP + WC floating header
|
341 |
+
}
|
342 |
+
});
|
343 |
|
344 |
// Onboarding buttons.
|
345 |
ppcp_onboarding.init();
|
modules/ppcp-onboarding/assets/js/settings.js
CHANGED
@@ -23,7 +23,7 @@ document.addEventListener(
|
|
23 |
}
|
24 |
|
25 |
group.forEach( (elementToShow) => {
|
26 |
-
document.querySelector(elementToShow).style.display = '
|
27 |
})
|
28 |
|
29 |
if('ppcp-message_enabled' === event.target.getAttribute('id')){
|
@@ -56,7 +56,7 @@ document.addEventListener(
|
|
56 |
return;
|
57 |
}
|
58 |
if (value === elementToToggle.value && domElement.style.display !== 'none') {
|
59 |
-
domElement.style.display = '
|
60 |
return;
|
61 |
}
|
62 |
domElement.style.display = 'none';
|
@@ -69,7 +69,7 @@ document.addEventListener(
|
|
69 |
const value = event.target.value;
|
70 |
group.forEach( (elementToToggle) => {
|
71 |
if (value === elementToToggle.value) {
|
72 |
-
document.querySelector(elementToToggle.selector).style.display = '
|
73 |
return;
|
74 |
}
|
75 |
document.querySelector(elementToToggle.selector).style.display = 'none';
|
23 |
}
|
24 |
|
25 |
group.forEach( (elementToShow) => {
|
26 |
+
document.querySelector(elementToShow).style.display = '';
|
27 |
})
|
28 |
|
29 |
if('ppcp-message_enabled' === event.target.getAttribute('id')){
|
56 |
return;
|
57 |
}
|
58 |
if (value === elementToToggle.value && domElement.style.display !== 'none') {
|
59 |
+
domElement.style.display = '';
|
60 |
return;
|
61 |
}
|
62 |
domElement.style.display = 'none';
|
69 |
const value = event.target.value;
|
70 |
group.forEach( (elementToToggle) => {
|
71 |
if (value === elementToToggle.value) {
|
72 |
+
document.querySelector(elementToToggle.selector).style.display = '';
|
73 |
return;
|
74 |
}
|
75 |
document.querySelector(elementToToggle.selector).style.display = 'none';
|
modules/ppcp-onboarding/services.php
CHANGED
@@ -18,6 +18,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PartnerReferrals;
|
|
18 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
|
19 |
use WooCommerce\PayPalCommerce\Onboarding\Assets\OnboardingAssets;
|
20 |
use WooCommerce\PayPalCommerce\Onboarding\Endpoint\LoginSellerEndpoint;
|
|
|
21 |
use WooCommerce\PayPalCommerce\Onboarding\Render\OnboardingRenderer;
|
22 |
use WooCommerce\PayPalCommerce\Onboarding\OnboardingRESTController;
|
23 |
|
@@ -117,9 +118,8 @@ return array(
|
|
117 |
);
|
118 |
},
|
119 |
'onboarding.state' => function( ContainerInterface $container ) : State {
|
120 |
-
$environment = $container->get( 'onboarding.environment' );
|
121 |
$settings = $container->get( 'wcgateway.settings' );
|
122 |
-
return new State( $
|
123 |
},
|
124 |
'onboarding.environment' => function( ContainerInterface $container ) : Environment {
|
125 |
$settings = $container->get( 'wcgateway.settings' );
|
@@ -131,8 +131,11 @@ return array(
|
|
131 |
$login_seller_endpoint = $container->get( 'onboarding.endpoint.login-seller' );
|
132 |
return new OnboardingAssets(
|
133 |
$container->get( 'onboarding.url' ),
|
|
|
134 |
$state,
|
135 |
-
$
|
|
|
|
|
136 |
);
|
137 |
},
|
138 |
|
@@ -188,7 +191,6 @@ return array(
|
|
188 |
return new PartnerReferrals(
|
189 |
CONNECT_WOO_SANDBOX_URL,
|
190 |
new ConnectBearer(),
|
191 |
-
$container->get( 'api.repository.partner-referrals-data' ),
|
192 |
$container->get( 'woocommerce.logger.woocommerce' )
|
193 |
);
|
194 |
},
|
@@ -197,7 +199,6 @@ return array(
|
|
197 |
return new PartnerReferrals(
|
198 |
CONNECT_WOO_URL,
|
199 |
new ConnectBearer(),
|
200 |
-
$container->get( 'api.repository.partner-referrals-data' ),
|
201 |
$container->get( 'woocommerce.logger.woocommerce' )
|
202 |
);
|
203 |
},
|
@@ -205,11 +206,19 @@ return array(
|
|
205 |
|
206 |
$partner_referrals = $container->get( 'api.endpoint.partner-referrals-production' );
|
207 |
$partner_referrals_sandbox = $container->get( 'api.endpoint.partner-referrals-sandbox' );
|
|
|
208 |
$settings = $container->get( 'wcgateway.settings' );
|
209 |
return new OnboardingRenderer(
|
210 |
$settings,
|
211 |
$partner_referrals,
|
212 |
-
$partner_referrals_sandbox
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
);
|
214 |
},
|
215 |
'onboarding.rest' => static function( $container ) : OnboardingRESTController {
|
18 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
|
19 |
use WooCommerce\PayPalCommerce\Onboarding\Assets\OnboardingAssets;
|
20 |
use WooCommerce\PayPalCommerce\Onboarding\Endpoint\LoginSellerEndpoint;
|
21 |
+
use WooCommerce\PayPalCommerce\Onboarding\Render\OnboardingOptionsRenderer;
|
22 |
use WooCommerce\PayPalCommerce\Onboarding\Render\OnboardingRenderer;
|
23 |
use WooCommerce\PayPalCommerce\Onboarding\OnboardingRESTController;
|
24 |
|
118 |
);
|
119 |
},
|
120 |
'onboarding.state' => function( ContainerInterface $container ) : State {
|
|
|
121 |
$settings = $container->get( 'wcgateway.settings' );
|
122 |
+
return new State( $settings );
|
123 |
},
|
124 |
'onboarding.environment' => function( ContainerInterface $container ) : Environment {
|
125 |
$settings = $container->get( 'wcgateway.settings' );
|
131 |
$login_seller_endpoint = $container->get( 'onboarding.endpoint.login-seller' );
|
132 |
return new OnboardingAssets(
|
133 |
$container->get( 'onboarding.url' ),
|
134 |
+
$container->get( 'ppcp.asset-version' ),
|
135 |
$state,
|
136 |
+
$container->get( 'onboarding.environment' ),
|
137 |
+
$login_seller_endpoint,
|
138 |
+
$container->get( 'wcgateway.current-ppcp-settings-page-id' )
|
139 |
);
|
140 |
},
|
141 |
|
191 |
return new PartnerReferrals(
|
192 |
CONNECT_WOO_SANDBOX_URL,
|
193 |
new ConnectBearer(),
|
|
|
194 |
$container->get( 'woocommerce.logger.woocommerce' )
|
195 |
);
|
196 |
},
|
199 |
return new PartnerReferrals(
|
200 |
CONNECT_WOO_URL,
|
201 |
new ConnectBearer(),
|
|
|
202 |
$container->get( 'woocommerce.logger.woocommerce' )
|
203 |
);
|
204 |
},
|
206 |
|
207 |
$partner_referrals = $container->get( 'api.endpoint.partner-referrals-production' );
|
208 |
$partner_referrals_sandbox = $container->get( 'api.endpoint.partner-referrals-sandbox' );
|
209 |
+
$partner_referrals_data = $container->get( 'api.repository.partner-referrals-data' );
|
210 |
$settings = $container->get( 'wcgateway.settings' );
|
211 |
return new OnboardingRenderer(
|
212 |
$settings,
|
213 |
$partner_referrals,
|
214 |
+
$partner_referrals_sandbox,
|
215 |
+
$partner_referrals_data
|
216 |
+
);
|
217 |
+
},
|
218 |
+
'onboarding.render-options' => static function ( ContainerInterface $container ) : OnboardingOptionsRenderer {
|
219 |
+
return new OnboardingOptionsRenderer(
|
220 |
+
$container->get( 'onboarding.url' ),
|
221 |
+
$container->get( 'api.shop.country' )
|
222 |
);
|
223 |
},
|
224 |
'onboarding.rest' => static function( $container ) : OnboardingRESTController {
|
modules/ppcp-onboarding/src/Assets/OnboardingAssets.php
CHANGED
@@ -10,7 +10,9 @@ declare(strict_types=1);
|
|
10 |
namespace WooCommerce\PayPalCommerce\Onboarding\Assets;
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\Onboarding\Endpoint\LoginSellerEndpoint;
|
|
|
13 |
use WooCommerce\PayPalCommerce\Onboarding\State;
|
|
|
14 |
|
15 |
/**
|
16 |
* Class OnboardingAssets
|
@@ -24,6 +26,13 @@ class OnboardingAssets {
|
|
24 |
*/
|
25 |
private $module_url;
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
* The State.
|
29 |
*
|
@@ -31,6 +40,13 @@ class OnboardingAssets {
|
|
31 |
*/
|
32 |
private $state;
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* The LoginSeller Endpoint.
|
36 |
*
|
@@ -38,22 +54,38 @@ class OnboardingAssets {
|
|
38 |
*/
|
39 |
private $login_seller_endpoint;
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
/**
|
42 |
* OnboardingAssets constructor.
|
43 |
*
|
44 |
* @param string $module_url The URL to the module.
|
|
|
45 |
* @param State $state The State object.
|
|
|
46 |
* @param LoginSellerEndpoint $login_seller_endpoint The LoginSeller endpoint.
|
|
|
47 |
*/
|
48 |
public function __construct(
|
49 |
string $module_url,
|
|
|
50 |
State $state,
|
51 |
-
|
|
|
|
|
52 |
) {
|
53 |
|
54 |
$this->module_url = untrailingslashit( $module_url );
|
|
|
55 |
$this->state = $state;
|
|
|
56 |
$this->login_seller_endpoint = $login_seller_endpoint;
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
@@ -68,14 +100,14 @@ class OnboardingAssets {
|
|
68 |
'ppcp-onboarding',
|
69 |
$url,
|
70 |
array(),
|
71 |
-
|
72 |
);
|
73 |
$url = untrailingslashit( $this->module_url ) . '/assets/js/settings.js';
|
74 |
wp_register_script(
|
75 |
'ppcp-settings',
|
76 |
$url,
|
77 |
array(),
|
78 |
-
|
79 |
true
|
80 |
);
|
81 |
|
@@ -84,7 +116,7 @@ class OnboardingAssets {
|
|
84 |
'ppcp-onboarding',
|
85 |
$url,
|
86 |
array( 'jquery' ),
|
87 |
-
|
88 |
true
|
89 |
);
|
90 |
wp_localize_script(
|
@@ -103,9 +135,16 @@ class OnboardingAssets {
|
|
103 |
*/
|
104 |
public function get_script_data() {
|
105 |
return array(
|
106 |
-
'endpoint'
|
107 |
-
'nonce'
|
108 |
-
'paypal_js_url'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
);
|
110 |
}
|
111 |
|
@@ -131,7 +170,6 @@ class OnboardingAssets {
|
|
131 |
* @return bool
|
132 |
*/
|
133 |
private function should_render_onboarding_script(): bool {
|
134 |
-
|
135 |
-
return 'ppcp-gateway' === $current_section;
|
136 |
}
|
137 |
}
|
10 |
namespace WooCommerce\PayPalCommerce\Onboarding\Assets;
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\Onboarding\Endpoint\LoginSellerEndpoint;
|
13 |
+
use WooCommerce\PayPalCommerce\Onboarding\Environment;
|
14 |
use WooCommerce\PayPalCommerce\Onboarding\State;
|
15 |
+
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
16 |
|
17 |
/**
|
18 |
* Class OnboardingAssets
|
26 |
*/
|
27 |
private $module_url;
|
28 |
|
29 |
+
/**
|
30 |
+
* The assets version.
|
31 |
+
*
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
private $version;
|
35 |
+
|
36 |
/**
|
37 |
* The State.
|
38 |
*
|
40 |
*/
|
41 |
private $state;
|
42 |
|
43 |
+
/**
|
44 |
+
* The Environment.
|
45 |
+
*
|
46 |
+
* @var Environment
|
47 |
+
*/
|
48 |
+
private $environment;
|
49 |
+
|
50 |
/**
|
51 |
* The LoginSeller Endpoint.
|
52 |
*
|
54 |
*/
|
55 |
private $login_seller_endpoint;
|
56 |
|
57 |
+
/**
|
58 |
+
* ID of the current PPCP gateway settings page, or empty if it is not such page.
|
59 |
+
*
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
protected $page_id;
|
63 |
+
|
64 |
/**
|
65 |
* OnboardingAssets constructor.
|
66 |
*
|
67 |
* @param string $module_url The URL to the module.
|
68 |
+
* @param string $version The assets version.
|
69 |
* @param State $state The State object.
|
70 |
+
* @param Environment $environment The Environment.
|
71 |
* @param LoginSellerEndpoint $login_seller_endpoint The LoginSeller endpoint.
|
72 |
+
* @param string $page_id ID of the current PPCP gateway settings page, or empty if it is not such page.
|
73 |
*/
|
74 |
public function __construct(
|
75 |
string $module_url,
|
76 |
+
string $version,
|
77 |
State $state,
|
78 |
+
Environment $environment,
|
79 |
+
LoginSellerEndpoint $login_seller_endpoint,
|
80 |
+
string $page_id
|
81 |
) {
|
82 |
|
83 |
$this->module_url = untrailingslashit( $module_url );
|
84 |
+
$this->version = $version;
|
85 |
$this->state = $state;
|
86 |
+
$this->environment = $environment;
|
87 |
$this->login_seller_endpoint = $login_seller_endpoint;
|
88 |
+
$this->page_id = $page_id;
|
89 |
}
|
90 |
|
91 |
/**
|
100 |
'ppcp-onboarding',
|
101 |
$url,
|
102 |
array(),
|
103 |
+
$this->version
|
104 |
);
|
105 |
$url = untrailingslashit( $this->module_url ) . '/assets/js/settings.js';
|
106 |
wp_register_script(
|
107 |
'ppcp-settings',
|
108 |
$url,
|
109 |
array(),
|
110 |
+
$this->version,
|
111 |
true
|
112 |
);
|
113 |
|
116 |
'ppcp-onboarding',
|
117 |
$url,
|
118 |
array( 'jquery' ),
|
119 |
+
$this->version,
|
120 |
true
|
121 |
);
|
122 |
wp_localize_script(
|
135 |
*/
|
136 |
public function get_script_data() {
|
137 |
return array(
|
138 |
+
'endpoint' => home_url( \WC_AJAX::get_endpoint( LoginSellerEndpoint::ENDPOINT ) ),
|
139 |
+
'nonce' => wp_create_nonce( $this->login_seller_endpoint::nonce() ),
|
140 |
+
'paypal_js_url' => 'https://www.paypal.com/webapps/merchantboarding/js/lib/lightbox/partner.js',
|
141 |
+
'sandbox_state' => State::get_state_name( $this->state->sandbox_state() ),
|
142 |
+
'production_state' => State::get_state_name( $this->state->production_state() ),
|
143 |
+
'current_state' => State::get_state_name( $this->state->current_state() ),
|
144 |
+
'current_env' => $this->environment->current_environment(),
|
145 |
+
'error_messages' => array(
|
146 |
+
'no_credentials' => __( 'API credentials must be entered to save the settings.', 'woocommerce-paypal-payments' ),
|
147 |
+
),
|
148 |
);
|
149 |
}
|
150 |
|
170 |
* @return bool
|
171 |
*/
|
172 |
private function should_render_onboarding_script(): bool {
|
173 |
+
return PayPalGateway::ID === $this->page_id;
|
|
|
174 |
}
|
175 |
}
|
modules/ppcp-onboarding/src/Endpoint/LoginSellerEndpoint.php
CHANGED
@@ -128,6 +128,7 @@ class LoginSellerEndpoint implements EndpointInterface {
|
|
128 |
$this->settings->set( 'sandbox_on', $is_sandbox );
|
129 |
$this->settings->set( 'products_dcc_enabled', null );
|
130 |
$this->settings->persist();
|
|
|
131 |
$endpoint = $is_sandbox ? $this->login_seller_sandbox : $this->login_seller_production;
|
132 |
$credentials = $endpoint->credentials_for(
|
133 |
$data['sharedId'],
|
@@ -143,10 +144,30 @@ class LoginSellerEndpoint implements EndpointInterface {
|
|
143 |
}
|
144 |
$this->settings->set( 'client_secret', $credentials->client_secret );
|
145 |
$this->settings->set( 'client_id', $credentials->client_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
$this->settings->persist();
|
|
|
147 |
if ( $this->cache->has( PayPalBearer::CACHE_KEY ) ) {
|
148 |
$this->cache->delete( PayPalBearer::CACHE_KEY );
|
149 |
}
|
|
|
150 |
wp_schedule_single_event(
|
151 |
time() + 5,
|
152 |
WebhookRegistrar::EVENT_HOOK
|
128 |
$this->settings->set( 'sandbox_on', $is_sandbox );
|
129 |
$this->settings->set( 'products_dcc_enabled', null );
|
130 |
$this->settings->persist();
|
131 |
+
|
132 |
$endpoint = $is_sandbox ? $this->login_seller_sandbox : $this->login_seller_production;
|
133 |
$credentials = $endpoint->credentials_for(
|
134 |
$data['sharedId'],
|
144 |
}
|
145 |
$this->settings->set( 'client_secret', $credentials->client_secret );
|
146 |
$this->settings->set( 'client_id', $credentials->client_id );
|
147 |
+
|
148 |
+
$accept_cards = (bool) ( $data['acceptCards'] ?? true );
|
149 |
+
$funding_sources = array();
|
150 |
+
if ( $this->settings->has( 'disable_funding' ) ) {
|
151 |
+
$funding_sources = $this->settings->get( 'disable_funding' );
|
152 |
+
if ( ! is_array( $funding_sources ) ) {
|
153 |
+
$funding_sources = array();
|
154 |
+
}
|
155 |
+
}
|
156 |
+
if ( $accept_cards ) {
|
157 |
+
$funding_sources = array_diff( $funding_sources, array( 'card' ) );
|
158 |
+
} else {
|
159 |
+
if ( ! in_array( 'card', $funding_sources, true ) ) {
|
160 |
+
$funding_sources[] = 'card';
|
161 |
+
}
|
162 |
+
}
|
163 |
+
$this->settings->set( 'disable_funding', $funding_sources );
|
164 |
+
|
165 |
$this->settings->persist();
|
166 |
+
|
167 |
if ( $this->cache->has( PayPalBearer::CACHE_KEY ) ) {
|
168 |
$this->cache->delete( PayPalBearer::CACHE_KEY );
|
169 |
}
|
170 |
+
|
171 |
wp_schedule_single_event(
|
172 |
time() + 5,
|
173 |
WebhookRegistrar::EVENT_HOOK
|
modules/ppcp-onboarding/src/OnboardingModule.php
CHANGED
@@ -65,16 +65,15 @@ class OnboardingModule implements ModuleInterface {
|
|
65 |
if ( 'ppcp_onboarding' !== $config['type'] ) {
|
66 |
return $field;
|
67 |
}
|
68 |
-
|
|
|
|
|
|
|
69 |
$is_production = 'production' === $config['env'];
|
|
|
70 |
|
71 |
-
/**
|
72 |
-
* The OnboardingRenderer.
|
73 |
-
*
|
74 |
-
* @var OnboardingRenderer $renderer
|
75 |
-
*/
|
76 |
ob_start();
|
77 |
-
$renderer->render( $is_production );
|
78 |
$content = ob_get_contents();
|
79 |
ob_end_clean();
|
80 |
return $content;
|
65 |
if ( 'ppcp_onboarding' !== $config['type'] ) {
|
66 |
return $field;
|
67 |
}
|
68 |
+
|
69 |
+
$renderer = $c->get( 'onboarding.render' );
|
70 |
+
assert( $renderer instanceof OnboardingRenderer );
|
71 |
+
|
72 |
$is_production = 'production' === $config['env'];
|
73 |
+
$products = $config['products'];
|
74 |
|
|
|
|
|
|
|
|
|
|
|
75 |
ob_start();
|
76 |
+
$renderer->render( $is_production, $products );
|
77 |
$content = ob_get_contents();
|
78 |
ob_end_clean();
|
79 |
return $content;
|
modules/ppcp-onboarding/src/OnboardingRESTController.php
CHANGED
@@ -10,7 +10,6 @@ declare(strict_types=1);
|
|
10 |
namespace WooCommerce\PayPalCommerce\Onboarding;
|
11 |
|
12 |
use Psr\Container\ContainerInterface;
|
13 |
-
use WooCommerce\PayPalCommerce\Onboarding\State;
|
14 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
15 |
|
16 |
/**
|
@@ -138,13 +137,13 @@ class OnboardingRESTController {
|
|
138 |
return array(
|
139 |
'environment' => $environment->current_environment(),
|
140 |
'onboarded' => ( $state->current_state() >= State::STATE_ONBOARDED ),
|
141 |
-
'state' =>
|
142 |
'sandbox' => array(
|
143 |
-
'state' =>
|
144 |
'onboarded' => ( $state->sandbox_state() >= State::STATE_ONBOARDED ),
|
145 |
),
|
146 |
'production' => array(
|
147 |
-
'state' =>
|
148 |
'onboarded' => ( $state->production_state() >= State::STATE_ONBOARDED ),
|
149 |
),
|
150 |
);
|
@@ -265,34 +264,6 @@ class OnboardingRESTController {
|
|
265 |
return add_query_arg( $this->return_url_args, $url );
|
266 |
}
|
267 |
|
268 |
-
/**
|
269 |
-
* Translates an onboarding state to a string.
|
270 |
-
*
|
271 |
-
* @param int $state An onboarding state to translate as returned by {@link State} methods.
|
272 |
-
* @return string A string representing the state: "start", "progressive" or "onboarded".
|
273 |
-
* @see State::current_state(), State::sandbox_state(), State::production_state().
|
274 |
-
*/
|
275 |
-
public function get_onboarding_state_name( $state ) {
|
276 |
-
$name = 'unknown';
|
277 |
-
|
278 |
-
switch ( absint( $state ) ) {
|
279 |
-
case State::STATE_START:
|
280 |
-
$name = 'start';
|
281 |
-
break;
|
282 |
-
case State::STATE_PROGRESSIVE:
|
283 |
-
$name = 'progressive';
|
284 |
-
break;
|
285 |
-
case State::STATE_ONBOARDED:
|
286 |
-
$name = 'onboarded';
|
287 |
-
break;
|
288 |
-
default:
|
289 |
-
break;
|
290 |
-
|
291 |
-
}
|
292 |
-
|
293 |
-
return $name;
|
294 |
-
}
|
295 |
-
|
296 |
/**
|
297 |
* Generates a signup link for onboarding for a given environment and optionally adding certain URL arguments
|
298 |
* to the URL users are redirected after completing the onboarding flow.
|
10 |
namespace WooCommerce\PayPalCommerce\Onboarding;
|
11 |
|
12 |
use Psr\Container\ContainerInterface;
|
|
|
13 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
14 |
|
15 |
/**
|
137 |
return array(
|
138 |
'environment' => $environment->current_environment(),
|
139 |
'onboarded' => ( $state->current_state() >= State::STATE_ONBOARDED ),
|
140 |
+
'state' => State::get_state_name( $state->current_state() ),
|
141 |
'sandbox' => array(
|
142 |
+
'state' => State::get_state_name( $state->sandbox_state() ),
|
143 |
'onboarded' => ( $state->sandbox_state() >= State::STATE_ONBOARDED ),
|
144 |
),
|
145 |
'production' => array(
|
146 |
+
'state' => State::get_state_name( $state->production_state() ),
|
147 |
'onboarded' => ( $state->production_state() >= State::STATE_ONBOARDED ),
|
148 |
),
|
149 |
);
|
264 |
return add_query_arg( $this->return_url_args, $url );
|
265 |
}
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
/**
|
268 |
* Generates a signup link for onboarding for a given environment and optionally adding certain URL arguments
|
269 |
* to the URL users are redirected after completing the onboarding flow.
|
modules/ppcp-onboarding/src/Render/OnboardingOptionsRenderer.php
ADDED
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Renders the onboarding options.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\Onboarding\Render
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\Onboarding\Render;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class OnboardingRenderer
|
14 |
+
*/
|
15 |
+
class OnboardingOptionsRenderer {
|
16 |
+
/**
|
17 |
+
* The module url.
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
private $module_url;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* 2-letter country code of the shop.
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
private $country;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* OnboardingOptionsRenderer constructor.
|
32 |
+
*
|
33 |
+
* @param string $module_url The module url (for assets).
|
34 |
+
* @param string $country 2-letter country code of the shop.
|
35 |
+
*/
|
36 |
+
public function __construct( string $module_url, string $country ) {
|
37 |
+
$this->module_url = $module_url;
|
38 |
+
$this->country = $country;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Renders the onboarding options.
|
43 |
+
*
|
44 |
+
* @param bool $is_shop_supports_dcc Whether the shop can use DCC (country, currency).
|
45 |
+
*/
|
46 |
+
public function render( bool $is_shop_supports_dcc ): string {
|
47 |
+
return '
|
48 |
+
<ul class="ppcp-onboarding-options">
|
49 |
+
<li>
|
50 |
+
<label><input type="checkbox" disabled checked> ' .
|
51 |
+
__( 'Enable PayPal Payments — includes PayPal, Venmo, Pay Later — with fraud protection', 'woocommerce-paypal-payments' ) . '
|
52 |
+
</label>
|
53 |
+
</li>
|
54 |
+
<li>
|
55 |
+
<label><input type="checkbox" id="ppcp-onboarding-accept-cards" checked> ' .
|
56 |
+
__( 'Securely accept all major credit & debit cards on the strength of the PayPal network', 'woocommerce-paypal-payments' ) . '
|
57 |
+
</label>
|
58 |
+
</li>
|
59 |
+
<li>' . $this->render_dcc( $is_shop_supports_dcc ) . '</li>
|
60 |
+
</ul>';
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Renders the onboarding DCC options.
|
65 |
+
*
|
66 |
+
* @param bool $is_shop_supports_dcc Whether the shop can use DCC (country, currency).
|
67 |
+
*/
|
68 |
+
private function render_dcc( bool $is_shop_supports_dcc ): string {
|
69 |
+
$items = array();
|
70 |
+
|
71 |
+
$is_us_shop = 'US' === $this->country;
|
72 |
+
|
73 |
+
if ( $is_shop_supports_dcc ) {
|
74 |
+
$dcc_table_rows = array(
|
75 |
+
$this->render_table_row(
|
76 |
+
__( 'Credit & Debit Card form fields', 'woocommerce-paypal-payments' ),
|
77 |
+
__( 'Customizable user experience', 'woocommerce-paypal-payments' )
|
78 |
+
),
|
79 |
+
! $is_us_shop ? '' : $this->render_table_row(
|
80 |
+
__( 'Credit & Debit Card pricing', 'woocommerce-paypal-payments' ),
|
81 |
+
__( '2.59% + $0.49', 'woocommerce-paypal-payments' ),
|
82 |
+
'',
|
83 |
+
__( 'for US domestic transactions', 'woocommerce-paypal-payments' )
|
84 |
+
),
|
85 |
+
$this->render_table_row(
|
86 |
+
__( 'Seller Protection', 'woocommerce-paypal-payments' ),
|
87 |
+
__( 'Yes', 'woocommerce-paypal-payments' ),
|
88 |
+
__( 'No matter what you sell, Seller Protection can help you avoid chargebacks, reversals, and fees on eligible PayPal payment transactions — even when a customer has filed a dispute.', 'woocommerce-paypal-payments' ),
|
89 |
+
__( 'for eligible PayPal transactions', 'woocommerce-paypal-payments' )
|
90 |
+
),
|
91 |
+
$this->render_table_row(
|
92 |
+
__( 'Fraud Protection', 'woocommerce-paypal-payments' ),
|
93 |
+
__( 'Yes', 'woocommerce-paypal-payments' ),
|
94 |
+
__( 'Included with Advanced Checkout at no extra cost, Fraud Protection gives you the insight and control you need to better balance chargebacks and declines.', 'woocommerce-paypal-payments' )
|
95 |
+
),
|
96 |
+
! $is_us_shop ? '' : $this->render_table_row(
|
97 |
+
__( 'Chargeback Protection', 'woocommerce-paypal-payments' ),
|
98 |
+
__( 'Optional', 'woocommerce-paypal-payments' ),
|
99 |
+
__( 'If you choose this optional, fee-based alternative to Fraud Protection, PayPal will manage chargebacks for eligible credit and debit card transactions — so you won’t have to worry about unexpected costs.', 'woocommerce-paypal-payments' ),
|
100 |
+
__( 'extra 0.4% per transaction', 'woocommerce-paypal-payments' )
|
101 |
+
),
|
102 |
+
$this->render_table_row(
|
103 |
+
__( 'Additional Vetting and Underwriting Required', 'woocommerce-paypal-payments' ),
|
104 |
+
__( 'Yes', 'woocommerce-paypal-payments' ),
|
105 |
+
__( 'Business Ownership and other business information will be required during the application for Advanced Card Processing.', 'woocommerce-paypal-payments' )
|
106 |
+
),
|
107 |
+
$this->render_table_row(
|
108 |
+
__( 'Seller Account Type', 'woocommerce-paypal-payments' ),
|
109 |
+
__( 'Business', 'woocommerce-paypal-payments' ),
|
110 |
+
__( 'For Standard payments, Casual sellers may connect their Personal PayPal account in eligible countries to sell on WooCommerce. For Advanced payments, a Business PayPal account is required.', 'woocommerce-paypal-payments' )
|
111 |
+
),
|
112 |
+
);
|
113 |
+
$items[] = '
|
114 |
+
<li>
|
115 |
+
<label>
|
116 |
+
<input type="radio" id="ppcp-onboarding-dcc-acdc" name="ppcp_onboarding_dcc" value="acdc" checked ' .
|
117 |
+
'data-screen-url="' . $this->get_screen_url( 'acdc' ) . '"> ' .
|
118 |
+
__( 'Advanced Card Processing', 'woocommerce-paypal-payments' ) . '
|
119 |
+
</label>
|
120 |
+
' . $this->render_tooltip( __( 'PayPal acts as the payment processor for card transactions. You can add optional features like Chargeback Protection for more security.', 'woocommerce-paypal-payments' ) ) . '
|
121 |
+
<table>
|
122 |
+
' . implode( '', $dcc_table_rows ) . '
|
123 |
+
</table>
|
124 |
+
</li>';
|
125 |
+
}
|
126 |
+
|
127 |
+
$basic_table_rows = array(
|
128 |
+
$this->render_table_row(
|
129 |
+
__( 'Credit & Debit Card form fields', 'woocommerce-paypal-payments' ),
|
130 |
+
__( 'Prebuilt user experience', 'woocommerce-paypal-payments' )
|
131 |
+
),
|
132 |
+
! $is_us_shop ? '' : $this->render_table_row(
|
133 |
+
__( 'Credit & Debit Card pricing', 'woocommerce-paypal-payments' ),
|
134 |
+
__( '3.49% + $0.49', 'woocommerce-paypal-payments' ),
|
135 |
+
'',
|
136 |
+
__( 'for US domestic transactions', 'woocommerce-paypal-payments' )
|
137 |
+
),
|
138 |
+
$this->render_table_row(
|
139 |
+
__( 'Seller Protection', 'woocommerce-paypal-payments' ),
|
140 |
+
__( 'Yes', 'woocommerce-paypal-payments' ),
|
141 |
+
__( 'No matter what you sell, Seller Protection can help you avoid chargebacks, reversals, and fees on eligible PayPal payment transactions — even when a customer has filed a dispute.', 'woocommerce-paypal-payments' ),
|
142 |
+
__( 'for eligible PayPal transactions', 'woocommerce-paypal-payments' )
|
143 |
+
),
|
144 |
+
$this->render_table_row(
|
145 |
+
__( 'Seller Account Type', 'woocommerce-paypal-payments' ),
|
146 |
+
__( 'Business or Casual', 'woocommerce-paypal-payments' ),
|
147 |
+
__( 'For Standard payments, Casual sellers may connect their Personal PayPal account in eligible countries to sell on WooCommerce. For Advanced payments, a Business PayPal account is required.', 'woocommerce-paypal-payments' )
|
148 |
+
),
|
149 |
+
);
|
150 |
+
$items[] = '
|
151 |
+
<li ' . ( ! $is_shop_supports_dcc ? 'style="display: none;"' : '' ) . '>
|
152 |
+
<label>
|
153 |
+
<input type="radio" id="ppcp-onboarding-dcc-basic" name="ppcp_onboarding_dcc" value="basic" ' .
|
154 |
+
( ! $is_shop_supports_dcc ? 'checked' : '' ) .
|
155 |
+
' data-screen-url="' . $this->get_screen_url( 'basic' ) . '"' .
|
156 |
+
'> ' .
|
157 |
+
__( 'Standard Card Processing', 'woocommerce-paypal-payments' ) . '
|
158 |
+
</label>
|
159 |
+
' . $this->render_tooltip( __( 'Card transactions are managed by PayPal, which simplifies compliance requirements for you.', 'woocommerce-paypal-payments' ) ) . '
|
160 |
+
<table>
|
161 |
+
' . implode( $basic_table_rows ) . '
|
162 |
+
</table>
|
163 |
+
</li>';
|
164 |
+
|
165 |
+
return '
|
166 |
+
<div class="ppcp-onboarding-cards-options">
|
167 |
+
<ul id="ppcp-onboarding-dcc-options" class="ppcp-onboarding-options-sublist">' .
|
168 |
+
implode( '', $items ) .
|
169 |
+
'
|
170 |
+
</ul>
|
171 |
+
<div class="ppcp-onboarding-cards-screen">' .
|
172 |
+
( $is_shop_supports_dcc ? '<img id="ppcp-onboarding-cards-screen-img" />' : '' ) . '
|
173 |
+
</div>
|
174 |
+
</div>';
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Returns HTML of a row for the cards options tables.
|
179 |
+
*
|
180 |
+
* @param string $header The text in the first cell.
|
181 |
+
* @param string $value The text in the second cell.
|
182 |
+
* @param string $tooltip The text shown on hover.
|
183 |
+
* @param string $note The additional description text, such as about conditions.
|
184 |
+
* @return string
|
185 |
+
*/
|
186 |
+
private function render_table_row( string $header, string $value, string $tooltip = '', string $note = '' ): string {
|
187 |
+
$value_html = $value;
|
188 |
+
if ( $note ) {
|
189 |
+
$value_html .= '<br/><span class="ppcp-muted-text">' . $note . '</span>';
|
190 |
+
}
|
191 |
+
|
192 |
+
$tooltip_html = '';
|
193 |
+
if ( $tooltip ) {
|
194 |
+
$tooltip_html = $this->render_tooltip( $tooltip, array( 'ppcp-table-row-tooltip' ) );
|
195 |
+
}
|
196 |
+
|
197 |
+
return "
|
198 |
+
<tr>
|
199 |
+
<th>$tooltip_html $header</th>
|
200 |
+
<td>$value_html</td>
|
201 |
+
</tr>";
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Returns HTML of a tooltip (question mark icon).
|
206 |
+
*
|
207 |
+
* @param string $tooltip The text shown on hover.
|
208 |
+
* @param string[] $classes Additional CSS classes.
|
209 |
+
* @return string
|
210 |
+
*/
|
211 |
+
private function render_tooltip( string $tooltip, array $classes = array() ): string {
|
212 |
+
return '<span class="woocommerce-help-tip ' . implode( ' ', $classes ) . '" data-tip="' . esc_attr( $tooltip ) . '"></span> ';
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Returns the screen image URL.
|
217 |
+
*
|
218 |
+
* @param string $key The image suffix, 'acdc' or 'basic'.
|
219 |
+
* @return string
|
220 |
+
*/
|
221 |
+
private function get_screen_url( string $key ): string {
|
222 |
+
return untrailingslashit( $this->module_url ) . "/assets/images/cards-screen-$key.png";
|
223 |
+
}
|
224 |
+
}
|
modules/ppcp-onboarding/src/Render/OnboardingRenderer.php
CHANGED
@@ -11,6 +11,7 @@ namespace WooCommerce\PayPalCommerce\Onboarding\Render;
|
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PartnerReferrals;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
|
|
14 |
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
15 |
|
16 |
/**
|
@@ -39,31 +40,50 @@ class OnboardingRenderer {
|
|
39 |
*/
|
40 |
private $sandbox_partner_referrals;
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* OnboardingRenderer constructor.
|
44 |
*
|
45 |
-
* @param Settings
|
46 |
-
* @param PartnerReferrals
|
47 |
-
* @param PartnerReferrals
|
|
|
48 |
*/
|
49 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
50 |
$this->settings = $settings;
|
51 |
$this->production_partner_referrals = $production_partner_referrals;
|
52 |
$this->sandbox_partner_referrals = $sandbox_partner_referrals;
|
|
|
53 |
}
|
54 |
|
55 |
/**
|
56 |
* Returns the action URL for the onboarding button/link.
|
57 |
*
|
58 |
-
* @param boolean
|
|
|
59 |
* @return string URL.
|
60 |
*/
|
61 |
-
public function get_signup_link( bool $is_production ) {
|
62 |
$args = array(
|
63 |
'displayMode' => 'minibrowser',
|
64 |
);
|
65 |
|
66 |
-
$
|
|
|
|
|
|
|
|
|
67 |
$url = add_query_arg( $args, $url );
|
68 |
|
69 |
return $url;
|
@@ -72,14 +92,18 @@ class OnboardingRenderer {
|
|
72 |
/**
|
73 |
* Renders the "Connect to PayPal" button.
|
74 |
*
|
75 |
-
* @param bool
|
|
|
76 |
*/
|
77 |
-
public function render( bool $is_production ) {
|
78 |
try {
|
|
|
|
|
79 |
$this->render_button(
|
80 |
-
$this->get_signup_link( $is_production ),
|
81 |
-
$
|
82 |
-
$is_production ? __( '
|
|
|
83 |
$is_production ? 'production' : 'sandbox'
|
84 |
);
|
85 |
} catch ( RuntimeException $exception ) {
|
@@ -96,13 +120,14 @@ class OnboardingRenderer {
|
|
96 |
* @param string $url The url of the button.
|
97 |
* @param string $id The ID of the button.
|
98 |
* @param string $label The button text.
|
|
|
99 |
* @param string $env The environment ('production' or 'sandbox').
|
100 |
*/
|
101 |
-
private function render_button( string $url, string $id, string $label, string $env ) {
|
102 |
?>
|
103 |
<a
|
104 |
target="_blank"
|
105 |
-
class="button
|
106 |
id="<?php echo esc_attr( $id ); ?>"
|
107 |
data-paypal-onboard-complete="ppcp_onboarding_<?php echo esc_attr( $env ); ?>Callback"
|
108 |
data-paypal-onboard-button="true"
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PartnerReferrals;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
14 |
+
use WooCommerce\PayPalCommerce\ApiClient\Repository\PartnerReferralsData;
|
15 |
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
16 |
|
17 |
/**
|
40 |
*/
|
41 |
private $sandbox_partner_referrals;
|
42 |
|
43 |
+
/**
|
44 |
+
* The default partner referrals data.
|
45 |
+
*
|
46 |
+
* @var PartnerReferralsData
|
47 |
+
*/
|
48 |
+
private $partner_referrals_data;
|
49 |
+
|
50 |
/**
|
51 |
* OnboardingRenderer constructor.
|
52 |
*
|
53 |
+
* @param Settings $settings The settings.
|
54 |
+
* @param PartnerReferrals $production_partner_referrals The PartnerReferrals for production.
|
55 |
+
* @param PartnerReferrals $sandbox_partner_referrals The PartnerReferrals for sandbox.
|
56 |
+
* @param PartnerReferralsData $partner_referrals_data The default partner referrals data.
|
57 |
*/
|
58 |
+
public function __construct(
|
59 |
+
Settings $settings,
|
60 |
+
PartnerReferrals $production_partner_referrals,
|
61 |
+
PartnerReferrals $sandbox_partner_referrals,
|
62 |
+
PartnerReferralsData $partner_referrals_data
|
63 |
+
) {
|
64 |
$this->settings = $settings;
|
65 |
$this->production_partner_referrals = $production_partner_referrals;
|
66 |
$this->sandbox_partner_referrals = $sandbox_partner_referrals;
|
67 |
+
$this->partner_referrals_data = $partner_referrals_data;
|
68 |
}
|
69 |
|
70 |
/**
|
71 |
* Returns the action URL for the onboarding button/link.
|
72 |
*
|
73 |
+
* @param boolean $is_production Whether the production or sandbox button should be rendered.
|
74 |
+
* @param string[] $products The list of products ('PPCP', 'EXPRESS_CHECKOUT').
|
75 |
* @return string URL.
|
76 |
*/
|
77 |
+
public function get_signup_link( bool $is_production, array $products ) {
|
78 |
$args = array(
|
79 |
'displayMode' => 'minibrowser',
|
80 |
);
|
81 |
|
82 |
+
$data = $this->partner_referrals_data
|
83 |
+
->with_products( $products )
|
84 |
+
->data();
|
85 |
+
|
86 |
+
$url = $is_production ? $this->production_partner_referrals->signup_link( $data ) : $this->sandbox_partner_referrals->signup_link( $data );
|
87 |
$url = add_query_arg( $args, $url );
|
88 |
|
89 |
return $url;
|
92 |
/**
|
93 |
* Renders the "Connect to PayPal" button.
|
94 |
*
|
95 |
+
* @param bool $is_production Whether the production or sandbox button should be rendered.
|
96 |
+
* @param string[] $products The list of products ('PPCP', 'EXPRESS_CHECKOUT').
|
97 |
*/
|
98 |
+
public function render( bool $is_production, array $products ) {
|
99 |
try {
|
100 |
+
$id = 'connect-to' . ( $is_production ? 'production' : 'sandbox' ) . strtolower( implode( '-', $products ) );
|
101 |
+
|
102 |
$this->render_button(
|
103 |
+
$this->get_signup_link( $is_production, $products ),
|
104 |
+
$id,
|
105 |
+
$is_production ? __( 'Activate PayPal', 'woocommerce-paypal-payments' ) : __( 'Test payments with PayPal sandbox', 'woocommerce-paypal-payments' ),
|
106 |
+
$is_production ? 'primary' : 'secondary',
|
107 |
$is_production ? 'production' : 'sandbox'
|
108 |
);
|
109 |
} catch ( RuntimeException $exception ) {
|
120 |
* @param string $url The url of the button.
|
121 |
* @param string $id The ID of the button.
|
122 |
* @param string $label The button text.
|
123 |
+
* @param string $class The CSS class for button ('primary', 'secondary').
|
124 |
* @param string $env The environment ('production' or 'sandbox').
|
125 |
*/
|
126 |
+
private function render_button( string $url, string $id, string $label, string $class, string $env ) {
|
127 |
?>
|
128 |
<a
|
129 |
target="_blank"
|
130 |
+
class="button-<?php echo esc_attr( $class ); ?>"
|
131 |
id="<?php echo esc_attr( $id ); ?>"
|
132 |
data-paypal-onboard-complete="ppcp_onboarding_<?php echo esc_attr( $env ); ?>Callback"
|
133 |
data-paypal-onboard-button="true"
|
modules/ppcp-onboarding/src/State.php
CHANGED
@@ -16,16 +16,8 @@ use Psr\Container\ContainerInterface;
|
|
16 |
*/
|
17 |
class State {
|
18 |
|
19 |
-
const STATE_START
|
20 |
-
const
|
21 |
-
const STATE_ONBOARDED = 8;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* The Environment.
|
25 |
-
*
|
26 |
-
* @var Environment
|
27 |
-
*/
|
28 |
-
private $environment;
|
29 |
|
30 |
/**
|
31 |
* The Settings.
|
@@ -37,16 +29,29 @@ class State {
|
|
37 |
/**
|
38 |
* State constructor.
|
39 |
*
|
40 |
-
* @param Environment $environment The Environment.
|
41 |
* @param ContainerInterface $settings The Settings.
|
42 |
*/
|
43 |
public function __construct(
|
44 |
-
Environment $environment,
|
45 |
ContainerInterface $settings
|
46 |
) {
|
47 |
|
48 |
-
$this->
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
/**
|
@@ -57,9 +62,6 @@ class State {
|
|
57 |
public function current_state(): int {
|
58 |
|
59 |
return $this->state_by_keys(
|
60 |
-
array(
|
61 |
-
'merchant_email',
|
62 |
-
),
|
63 |
array(
|
64 |
'merchant_email',
|
65 |
'merchant_id',
|
@@ -77,9 +79,6 @@ class State {
|
|
77 |
public function sandbox_state() : int {
|
78 |
|
79 |
return $this->state_by_keys(
|
80 |
-
array(
|
81 |
-
'merchant_email_sandbox',
|
82 |
-
),
|
83 |
array(
|
84 |
'merchant_email_sandbox',
|
85 |
'merchant_id_sandbox',
|
@@ -97,9 +96,6 @@ class State {
|
|
97 |
public function production_state() : int {
|
98 |
|
99 |
return $this->state_by_keys(
|
100 |
-
array(
|
101 |
-
'merchant_email_production',
|
102 |
-
),
|
103 |
array(
|
104 |
'merchant_email_production',
|
105 |
'merchant_id_production',
|
@@ -110,36 +106,36 @@ class State {
|
|
110 |
}
|
111 |
|
112 |
/**
|
113 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
*
|
115 |
-
* @param array $progressive_keys The keys which need to be present to be at least in progressive state.
|
116 |
* @param array $onboarded_keys The keys which need to be present to be in onboarded state.
|
117 |
*
|
118 |
* @return int
|
119 |
*/
|
120 |
-
private function state_by_keys( array $
|
121 |
-
$state = self::STATE_START;
|
122 |
-
$is_progressive = true;
|
123 |
-
foreach ( $progressive_keys as $key ) {
|
124 |
-
if ( ! $this->settings->has( $key ) || ! $this->settings->get( $key ) ) {
|
125 |
-
$is_progressive = false;
|
126 |
-
}
|
127 |
-
}
|
128 |
-
if ( $is_progressive ) {
|
129 |
-
$state = self::STATE_PROGRESSIVE;
|
130 |
-
}
|
131 |
-
|
132 |
-
$is_onboarded = true;
|
133 |
foreach ( $onboarded_keys as $key ) {
|
134 |
if ( ! $this->settings->has( $key ) || ! $this->settings->get( $key ) ) {
|
135 |
-
|
136 |
}
|
137 |
}
|
138 |
|
139 |
-
|
140 |
-
$state = self::STATE_ONBOARDED;
|
141 |
-
}
|
142 |
-
|
143 |
-
return $state;
|
144 |
}
|
145 |
}
|
16 |
*/
|
17 |
class State {
|
18 |
|
19 |
+
const STATE_START = 0;
|
20 |
+
const STATE_ONBOARDED = 8;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
/**
|
23 |
* The Settings.
|
29 |
/**
|
30 |
* State constructor.
|
31 |
*
|
|
|
32 |
* @param ContainerInterface $settings The Settings.
|
33 |
*/
|
34 |
public function __construct(
|
|
|
35 |
ContainerInterface $settings
|
36 |
) {
|
37 |
|
38 |
+
$this->settings = $settings;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Returns the state of the specified environment (or the active environment if null).
|
43 |
+
*
|
44 |
+
* @param string|null $environment 'sandbox', 'production'.
|
45 |
+
* @return int
|
46 |
+
*/
|
47 |
+
public function environment_state( ?string $environment = null ): int {
|
48 |
+
switch ( $environment ) {
|
49 |
+
case Environment::PRODUCTION:
|
50 |
+
return $this->production_state();
|
51 |
+
case Environment::SANDBOX:
|
52 |
+
return $this->sandbox_state();
|
53 |
+
}
|
54 |
+
return $this->current_state();
|
55 |
}
|
56 |
|
57 |
/**
|
62 |
public function current_state(): int {
|
63 |
|
64 |
return $this->state_by_keys(
|
|
|
|
|
|
|
65 |
array(
|
66 |
'merchant_email',
|
67 |
'merchant_id',
|
79 |
public function sandbox_state() : int {
|
80 |
|
81 |
return $this->state_by_keys(
|
|
|
|
|
|
|
82 |
array(
|
83 |
'merchant_email_sandbox',
|
84 |
'merchant_id_sandbox',
|
96 |
public function production_state() : int {
|
97 |
|
98 |
return $this->state_by_keys(
|
|
|
|
|
|
|
99 |
array(
|
100 |
'merchant_email_production',
|
101 |
'merchant_id_production',
|
106 |
}
|
107 |
|
108 |
/**
|
109 |
+
* Translates an onboarding state to a string.
|
110 |
+
*
|
111 |
+
* @param int $state An onboarding state to translate.
|
112 |
+
* @return string A string representing the state: "start" or "onboarded".
|
113 |
+
*/
|
114 |
+
public static function get_state_name( int $state ) : string {
|
115 |
+
switch ( $state ) {
|
116 |
+
case self::STATE_START:
|
117 |
+
return 'start';
|
118 |
+
case self::STATE_ONBOARDED:
|
119 |
+
return 'onboarded';
|
120 |
+
default:
|
121 |
+
return 'unknown';
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Returns the state based on onboarding settings values.
|
127 |
*
|
|
|
128 |
* @param array $onboarded_keys The keys which need to be present to be in onboarded state.
|
129 |
*
|
130 |
* @return int
|
131 |
*/
|
132 |
+
private function state_by_keys( array $onboarded_keys ) : int {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
foreach ( $onboarded_keys as $key ) {
|
134 |
if ( ! $this->settings->has( $key ) || ! $this->settings->get( $key ) ) {
|
135 |
+
return self::STATE_START;
|
136 |
}
|
137 |
}
|
138 |
|
139 |
+
return self::STATE_ONBOARDED;
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
}
|
modules/ppcp-subscription/src/RenewalHandler.php
CHANGED
@@ -174,6 +174,9 @@ class RenewalHandler {
|
|
174 |
* @return PaymentToken|null
|
175 |
*/
|
176 |
private function get_token_for_customer( \WC_Customer $customer, \WC_Order $wc_order ) {
|
|
|
|
|
|
|
177 |
$token = apply_filters( 'woocommerce_paypal_payments_subscriptions_get_token_for_customer', null, $customer, $wc_order );
|
178 |
if ( null !== $token ) {
|
179 |
return $token;
|
174 |
* @return PaymentToken|null
|
175 |
*/
|
176 |
private function get_token_for_customer( \WC_Customer $customer, \WC_Order $wc_order ) {
|
177 |
+
/**
|
178 |
+
* Returns a payment token for a customer, or null.
|
179 |
+
*/
|
180 |
$token = apply_filters( 'woocommerce_paypal_payments_subscriptions_get_token_for_customer', null, $customer, $wc_order );
|
181 |
if ( null !== $token ) {
|
182 |
return $token;
|
modules/ppcp-vaulting/services.php
CHANGED
@@ -22,7 +22,8 @@ return array(
|
|
22 |
},
|
23 |
'vaulting.assets.myaccount-payments' => function( ContainerInterface $container ) : MyAccountPaymentsAssets {
|
24 |
return new MyAccountPaymentsAssets(
|
25 |
-
$container->get( 'vaulting.module-url' )
|
|
|
26 |
);
|
27 |
},
|
28 |
'vaulting.payment-tokens-renderer' => static function (): PaymentTokensRenderer {
|
22 |
},
|
23 |
'vaulting.assets.myaccount-payments' => function( ContainerInterface $container ) : MyAccountPaymentsAssets {
|
24 |
return new MyAccountPaymentsAssets(
|
25 |
+
$container->get( 'vaulting.module-url' ),
|
26 |
+
$container->get( 'ppcp.asset-version' )
|
27 |
);
|
28 |
},
|
29 |
'vaulting.payment-tokens-renderer' => static function (): PaymentTokensRenderer {
|
modules/ppcp-vaulting/src/Assets/MyAccountPaymentsAssets.php
CHANGED
@@ -23,15 +23,25 @@ class MyAccountPaymentsAssets {
|
|
23 |
*/
|
24 |
private $module_url;
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* MyAccountPaymentsAssets constructor.
|
28 |
*
|
29 |
* @param string $module_url The URL to the module.
|
|
|
30 |
*/
|
31 |
public function __construct(
|
32 |
-
string $module_url
|
|
|
33 |
) {
|
34 |
$this->module_url = untrailingslashit( $module_url );
|
|
|
35 |
}
|
36 |
|
37 |
/**
|
@@ -44,7 +54,7 @@ class MyAccountPaymentsAssets {
|
|
44 |
'ppcp-vaulting-myaccount-payments',
|
45 |
untrailingslashit( $this->module_url ) . '/assets/js/myaccount-payments.js',
|
46 |
array( 'jquery' ),
|
47 |
-
|
48 |
true
|
49 |
);
|
50 |
}
|
23 |
*/
|
24 |
private $module_url;
|
25 |
|
26 |
+
/**
|
27 |
+
* The assets version.
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
private $version;
|
32 |
+
|
33 |
/**
|
34 |
* MyAccountPaymentsAssets constructor.
|
35 |
*
|
36 |
* @param string $module_url The URL to the module.
|
37 |
+
* @param string $version The assets version.
|
38 |
*/
|
39 |
public function __construct(
|
40 |
+
string $module_url,
|
41 |
+
string $version
|
42 |
) {
|
43 |
$this->module_url = untrailingslashit( $module_url );
|
44 |
+
$this->version = $version;
|
45 |
}
|
46 |
|
47 |
/**
|
54 |
'ppcp-vaulting-myaccount-payments',
|
55 |
untrailingslashit( $this->module_url ) . '/assets/js/myaccount-payments.js',
|
56 |
array( 'jquery' ),
|
57 |
+
$this->version,
|
58 |
true
|
59 |
);
|
60 |
}
|
modules/ppcp-wc-gateway/assets/images/amex.svg
CHANGED
@@ -1,10 +1,19 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<svg width="
|
3 |
-
<title>
|
4 |
-
<g id="
|
5 |
-
<g id="
|
6 |
-
<
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
</g>
|
9 |
</g>
|
10 |
</svg>
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="134px" height="85px" viewBox="0 0 134 85" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<title>AmEx Card Icon</title>
|
4 |
+
<g id="RD-4" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5 |
+
<g id="LP---venmo---social---primary" transform="translate(-824.000000, -1587.000000)">
|
6 |
+
<g id="AmEx-Card-Icon" transform="translate(824.988647, 1587.578995)">
|
7 |
+
<rect id="Rectangle" fill="#216EA9" x="0" y="0" width="132.39159" height="83.7921454" rx="4.581738"></rect>
|
8 |
+
<g id="Amex" transform="translate(11.042625, 26.813487)" fill-rule="nonzero">
|
9 |
+
<polygon id="path3082" fill="#FFFFFF" points="58.1781633 28.829246 58.1781633 0.111970975 88.752584 0.111970975 92.0328881 4.36473322 95.4216632 0.111970975 111.627357 0.111970975 100.111543 14.3998649 111.627357 28.829246 95.1623158 28.829246 91.8866983 24.4852763 88.560787 28.829246"></polygon>
|
10 |
+
<polygon id="path3080" fill="#FFFFFF" points="12.9456251 0.111970975 24.8692065 0.111970975 28.7820013 9.06638213 28.7820013 0.111970975 43.6041122 0.111970975 45.933401 6.58395398 48.1915676 0.111970975 83.0100213 0.111970975 83.0100213 28.829228 23.1027999 28.829228 21.2713726 24.3023659 16.3877429 24.3023659 14.5692593 28.829228 0.216820214 28.829228"></polygon>
|
11 |
+
<path d="M15.3859151,3.6521988 L6.08653439,25.1547742 L12.140911,25.1547742 L13.8567623,20.8489817 L23.8318149,20.8489817 L25.5387763,25.1547742 L31.7265095,25.1547742 L22.436018,3.6521988 L15.3859151,3.6521988 Z M18.8265072,8.6564979 L21.8670326,16.1806509 L15.7770926,16.1806509 L18.8265072,8.6564979 L18.8265072,8.6564979 Z" id="path3046" fill="#216EA9"></path>
|
12 |
+
<polygon id="path3048" fill="#216EA9" points="32.3666185 25.1511618 32.3666185 3.64856809 40.9702248 3.68034593 45.9743744 17.543851 50.8586955 3.64856809 59.3934994 3.64856809 59.3934994 25.1511618 53.9881232 25.1511618 53.9881232 9.30714548 48.2583106 25.1511618 43.5177841 25.1511618 37.7719947 9.30714548 37.7719947 25.1511618"></polygon>
|
13 |
+
<polygon id="path3050" fill="#216EA9" points="63.091914 25.1511618 63.091914 3.64856809 80.7305103 3.64856809 80.7305103 8.45836792 68.5541888 8.45836792 68.5541888 12.1364341 80.4460167 12.1364341 80.4460167 16.6632958 68.5541888 16.6632958 68.5541888 20.482831 80.7305103 20.482831 80.7305103 25.1511618"></polygon>
|
14 |
+
<polygon id="path3066" fill="#216EA9" points="80.1997365 25.1511618 88.7878839 14.5324773 79.9952578 3.64856809 86.80532 3.64856809 92.0417773 10.3769555 97.2960166 3.64856809 103.839367 3.64856809 95.1623158 14.3998648 103.766272 25.1511618 96.9572869 25.1511618 91.8728606 18.5288349 86.9120057 25.1511618"></polygon>
|
15 |
+
</g>
|
16 |
+
</g>
|
17 |
</g>
|
18 |
</g>
|
19 |
</svg>
|
modules/ppcp-wc-gateway/assets/images/ideal-dark.svg
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="88px" height="55px" viewBox="0 0 88 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<title>iDEAL_acceptancemark_80x50</title>
|
4 |
+
<g id="RD-4" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5 |
+
<g id="LP---venmo---social---primary" transform="translate(-1290.000000, -1489.000000)">
|
6 |
+
<g id="iDEAL_acceptancemark_80x50" transform="translate(1290.674250, 1489.000000)">
|
7 |
+
<rect id="Rectangle" fill="#000000" x="0" y="0" width="86.55975" height="54.78165" rx="3.55725"></rect>
|
8 |
+
<g id="iDeal" transform="translate(19.722475, 8.569431)" fill-rule="nonzero">
|
9 |
+
<g id="Group-10">
|
10 |
+
<path d="M1.31483165,0.4147596 L1.31483165,38.542788 L23.6150559,38.542788 C38.3257411,38.542788 44.7042759,30.3306152 44.7042759,19.4407953 C44.7042759,8.59428425 38.3257411,0.4147596 23.6150559,0.4147596 L1.31483165,0.4147596 Z" id="Fill-6" fill="#FFFFFF"></path>
|
11 |
+
<path d="M24.4089797,0.0145181949 C43.6643857,0.0145181949 46.5394168,12.2271201 46.5394168,19.5055435 C46.5394168,32.133495 38.680567,39.0878016 24.4089797,39.0878016 L0.807144801,39.0878016 L0.807144801,0.0145181949 L24.4089797,0.0145181949 Z M2.66510307,1.8517804 L2.66510307,37.249739 L24.4089797,37.249739 C37.5392931,37.249739 44.6818631,31.2003587 44.6818631,19.5055435 C44.6818631,7.48721161 36.9395275,1.8517804 24.4089797,1.8517804 L2.66510307,1.8517804 Z" id="Fill-8" fill="#000000"></path>
|
12 |
+
</g>
|
13 |
+
<polygon id="Fill-11" fill="#000000" points="5.58237061 34.364139 12.5430893 34.364139 12.5430893 22.1081216 5.58237061 22.1081216"></polygon>
|
14 |
+
<g id="Group-16" transform="translate(4.652482, 4.673437)">
|
15 |
+
<path d="M8.73559986,11.2615791 C8.73559986,13.6248309 6.79935854,15.5409215 4.40980375,15.5409215 C2.02146263,15.5409215 0.0834007826,13.6248309 0.0834007826,11.2615791 C0.0834007826,8.89992785 2.02146263,6.98303694 4.40980375,6.98303694 C6.79935854,6.98303694 8.73559986,8.89992785 8.73559986,11.2615791" id="Fill-12" fill="#000000"></path>
|
16 |
+
<path d="M22.3930799,13.2641209 L22.3930799,15.2470356 L17.4327257,15.2470356 L17.4327257,7.28636627 L22.233075,7.28636627 L22.233075,9.26848068 L19.4381473,9.26848068 L19.4381473,10.1914133 L22.0813635,10.1914133 L22.0813635,12.1731276 L19.4381473,12.1731276 L19.4381473,13.2641209 L22.3930799,13.2641209 Z M23.3559412,15.2496365 L25.7841318,7.28296504 L28.6367095,7.28296504 L31.0640911,15.2496365 L28.9767452,15.2496365 L28.5218135,13.708481 L25.8990278,13.708481 L25.4426801,15.2496365 L23.3559412,15.2496365 Z M26.4850382,11.7269668 L27.9356009,11.7269668 L27.2723189,9.47555532 L27.1519613,9.47555532 L26.4850382,11.7269668 Z M32.0714544,7.2831651 L34.0764715,7.2831651 L34.0764715,13.2641209 L37.0477888,13.2641209 C36.2329978,2.4118093 27.6012291,0.0671642083 19.7581572,0.0671642083 L11.3960302,0.0671642083 L11.3960302,7.28736663 L12.6337925,7.28736663 C14.8904481,7.28736663 16.2924632,8.80091216 16.2924632,11.2355897 C16.2924632,13.7476951 14.9242292,15.2470356 12.6337925,15.2470356 L11.3960302,15.2470356 L11.3960302,29.6942429 L19.7581572,29.6942429 C32.5104059,29.6942429 36.9480638,23.8371318 37.1046299,15.2470356 L32.0714544,15.2470356 L32.0714544,7.2831651 Z M11.394412,9.26988119 L11.394412,13.2641209 L12.6337925,13.2641209 C13.492681,13.2641209 14.2858279,13.0186324 14.2858279,11.2355897 C14.2858279,9.49336174 13.4030701,9.26988119 12.6337925,9.26988119 L11.394412,9.26988119 Z" id="Fill-14" fill="#CC0066"></path>
|
17 |
+
</g>
|
18 |
+
</g>
|
19 |
+
</g>
|
20 |
+
</g>
|
21 |
+
</g>
|
22 |
+
</svg>
|
modules/ppcp-wc-gateway/assets/images/mastercard-dark.svg
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="134px" height="84px" viewBox="0 0 134 84" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<title>Mastercard_acceptancemark_80x50</title>
|
4 |
+
<g id="RD-4" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5 |
+
<g id="LP---venmo---social---primary" transform="translate(-967.000000, -1489.000000)">
|
6 |
+
<g id="Mastercard_acceptancemark_80x50" transform="translate(967.005261, 1489.000000)">
|
7 |
+
<rect id="Rectangle" fill="#000000" x="0" y="0" width="132.39159" height="83.7921454" rx="4.581738"></rect>
|
8 |
+
<g id="mc_symbol" transform="translate(16.758429, 11.730900)" fill-rule="nonzero">
|
9 |
+
<rect id="Rectangle" fill="#FF5F00" x="34.961091" y="6.91411461" width="29.2905829" height="48.0845243"></rect>
|
10 |
+
<path d="M37.978038,30.9606238 C37.9706835,21.5790039 42.2555184,12.7149877 49.5979316,6.92260862 C37.1243267,-2.93038543 19.2117299,-1.49521164 8.44863276,10.2195284 C-2.31446439,21.9342684 -2.31446439,39.9954731 8.44863276,51.7102132 C19.2117299,63.4249532 37.1243267,64.8601271 49.5979316,55.0071329 C42.2531818,49.2129145 37.9680851,40.3452244 37.978038,30.9606238 Z" id="Path" fill="#EB001B"></path>
|
11 |
+
<path d="M95.9169404,50.3974171 L95.9169404,49.0088616 L96.3394821,49.0088616 L96.3394821,48.7215742 L95.333833,48.7215742 L95.333833,49.0088616 L95.7310222,49.0088616 L95.7310222,50.3974171 L95.9169404,50.3974171 Z M97.8690825,50.3974171 L97.8690825,48.7215742 L97.5648527,48.7215742 L97.2099177,49.9186049 L96.8549827,48.7215742 L96.5507529,48.7215742 L96.5507529,50.3974171 L96.7704745,50.3974171 L96.7704745,49.1285648 L97.1000568,50.2178626 L97.3282294,50.2178626 L97.6578119,49.1285648 L97.6578119,50.3974171 L97.8690825,50.3974171 Z" id="Shape" fill="#F79E1B"></path>
|
12 |
+
<path d="M98.8240266,30.9606238 C98.8240266,42.6682247 92.1727326,53.3479581 81.695674,58.4641002 C71.2186153,63.5802422 58.7549062,62.2345869 49.5979316,54.9986391 C56.9371412,49.2013423 61.2222985,40.3385046 61.2222985,30.9563768 C61.2222985,21.5742491 56.9371412,12.7114113 49.5979316,6.91411461 C58.7549062,-0.321833201 71.2186153,-1.66748859 81.695674,3.44865344 C92.1727326,8.56479549 98.8240266,19.2445288 98.8240266,30.9521297 L98.8240266,30.9606238 Z" id="Path" fill="#F79E1B"></path>
|
13 |
+
</g>
|
14 |
+
</g>
|
15 |
+
</g>
|
16 |
+
</g>
|
17 |
+
</svg>
|
modules/ppcp-wc-gateway/assets/images/paylater.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="1040" height="253" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="hidden"><defs><clipPath id="clip0"><rect x="0" y="0" width="1040" height="253"/></clipPath><clipPath id="clip1"><rect x="0" y="0" width="2.47652e+06" height="604842"/></clipPath><image width="1044" height="252" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABBQAAAD8CAYAAADHR/dgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAOw4AADsOAcy2oYMAACzaSURBVHhe7d37dxX1vf9xVn85f8VZp7Wi1dJW5LYJJCEQEi4BwiXcb4EQSLgkEMiVi4AoiKioqCAXuWMBQYiAgFySWKtgtT3ai62nPbZybK21ViT5/nDO55v3Nmgg772zZ/bsmdmzn3utx3Jpsj/zycwkzvu1Z96fLnZfN17r/h/Njb1ntTSFdrR6vdW1Vtf/3+t9DQAAAAAA8Bep2dtqd6nhd0hNL7V9W5mf2NcHp+78t+amUFFLY+hn2uQAAAAAAEBykRpfan2p+dvKf+deq1Z1+U5zY2hu60Y+1jYOAAAAAACSm9T8UvtLBtAWB8T3amnqeXdLU+gtbWMAAAAAACBYJAOQLKAtFrD3utEYGt860JfaBgAAAAAAQDBJFiCZQFs8YO3V0hgqbx3g/7SBAQAAAABAsEkmINlAW0wQ26u5oU+pNhgAAAAAAEgtkhG0xQXRXy0NvfJamkL/qw0CAAAAAABSi2QEkhW0xQb668blnv/e0tTnM20AAAAAAACQmiQrkMygLT7o+GpuCtVrbwQAAAAAAKmtuSl0si0+uPUlty9obwAAAAAAABAtl3sPb4sRvn21NIauaN8MAAAAAAAgJDtoixG+ft1oCGVq3wgAAAAAANCeZAhtcUKXLi1NoZ3aNwEAAAAAALQnGUI4TFi1qst3Wv/lc+2bAAAAAAAA2mtpCv1DsoQuXzX26aF9AwAAAAAAgEayhC7NTX1KtC8CAAAAAABoJEvo0twUekL7IgAAAAAAgEayhC7NjaEj2hcBAAAAAAA0kiV0aWkMvap9EQAAAAAAQCNZgiwZeVn7IgAAAAAAgKalqc8lAgUAAAAAAGCJZAkECgAAAAAAwBICBQAAAAAAYBmBAgAAAAAAsIxAAQ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tUhG0BYXxPZqaQyVtzSF/k8bDAAAAAAABJtkApINtMUE1l43GkPjWwf4UhsYAAAAAAAEk2QBkgm0xQP2Xi1NPe9uHegtbQMAAAAAACBYJAOQLKAtFojvtWpVl+80N4bmtjSGPtY2BgAAAAAAkpvU/FL7SwbQFgc49/rg1J3/1twUKmrdyM+0jQMAAAAAgOQiNb7U+lLzt5X/iX3deK37fzQ39p7V0hTaIRtv/ee1Vl9pkwMAAAAAAN6Smj1cu39dw++Qml5q+7Yy3+KrS5f/DwqgGCOBK25DAAAAAElFTkSuQmCC" preserveAspectRatio="none" id="img2"></image><clipPath id="clip3"><rect x="0" y="0" width="2.47652e+06" height="597780"/></clipPath></defs><g clip-path="url(#clip0)"><g clip-path="url(#clip1)" transform="scale(0.000419944 0.000419944)"><g clip-path="url(#clip3)" transform="scale(1 1.00783)"><use width="100%" height="100%" xlink:href="#img2" transform="scale(2372.14 2372.14)"></use></g></g></g></svg>
|
modules/ppcp-wc-gateway/assets/images/paypal-button.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="1040" height="253" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="hidden"><defs><clipPath id="clip0"><rect x="0" y="0" width="1040" height="253"/></clipPath><clipPath id="clip1"><rect x="0" y="0" width="2.47652e+06" height="604842"/></clipPath><image width="1044" height="252" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABBQAAAD8CAYAAADHR/dgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAOw4AADsOAcy2oYMAADEwSURBVHhe7d35d1VVnvdxVv3Sf0Wv/qXXep7qsga7SonM8xjmeZ6ROWEIAcIkqKCIgohCgIRACBAIgSQMIfMATohYapdao1qFVSqFA0KeH7r3c/claUP4JLlnuknufd+1Xqtbk7O/52ysKr+fu8/endx+7pY9+m/3ah6fXVebcCjkSsjNkDv/78oTBgAAAAAAtC+2Z6/v3W0Pf8j29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JReoCAAAAAAAQ3+7VJhTWxwcPf+5W/eZf62o731IXAgAAAACA+GSzApsZ1McH+mNffairTfhvNQAAAAAAAIgvNiOwWUF9bNDy515150VqEAAAAAAAEF9sRlAfF0T2qatJSK6rTfgfNRgAAAAAAIhtNhOw2UB9TODsc7cmYXxogO/VwAAAAAAAIDbZLMBmAvXxgLtPXe1v/k9ooLdUAQAAAAAAEFtsBmCzgPpYwNtn06ZOP7lXk/BkXU3C31QxAAAAAADQsdme3/b+NgOojwP8+3xy4d//5V5twtxQkauqOAAAAAAA6Fhsj297fdvz17f/wX7ulj36b/dqHp9dV5twyBYP/d+bIT+omwMAAAAAAG3L9uzh3v1+D3/I9vS2t69v8x1+OnX6/6lzcFPn8GgjAAAAAElFTkSuQmCC" preserveAspectRatio="none" id="img2"></image><clipPath id="clip3"><rect x="0" y="0" width="2.47652e+06" height="597780"/></clipPath></defs><g clip-path="url(#clip0)"><g clip-path="url(#clip1)" transform="scale(0.000419944 0.000419944)"><g clip-path="url(#clip3)" transform="scale(1 1.00783)"><use width="100%" height="100%" xlink:href="#img2" transform="scale(2372.14 2372.14)"></use></g></g></g></svg>
|
modules/ppcp-wc-gateway/assets/images/paypal.png
ADDED
Binary file
|
modules/ppcp-wc-gateway/assets/images/sofort.svg
CHANGED
@@ -1,12 +1,16 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<svg width="
|
3 |
-
<title>
|
4 |
-
<g id="
|
5 |
-
<g id="
|
6 |
-
<
|
7 |
-
|
8 |
-
|
9 |
-
<
|
|
|
|
|
|
|
|
|
10 |
</g>
|
11 |
</g>
|
12 |
</g>
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="87px" height="55px" viewBox="0 0 87 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<title>Sofort</title>
|
4 |
+
<g id="RD-4" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5 |
+
<g id="LP---venmo---social---primary" transform="translate(-1197.000000, -1489.000000)">
|
6 |
+
<g id="Sofort" transform="translate(1197.000000, 1489.000000)">
|
7 |
+
<rect id="Rectangle" fill="#EF809F" x="0" y="0" width="86.55975" height="54.78165" rx="3.55725"></rect>
|
8 |
+
<path d="M33.5916209,33.964623 C35.9907213,33.964623 37.8253275,32.4414259 37.8253275,30.2100758 C37.8253275,28.1390622 36.2729684,27.2438498 34.3678005,26.7093947 C33.1541379,26.3753603 32.3920707,26.1214941 32.3920707,25.30645 C32.3920707,24.6250197 32.9142279,24.0905646 33.7468568,24.0905646 C34.4524746,24.0905646 34.9746317,24.4780446 35.3556653,25.0659452 L37.3455074,23.8767826 C36.7245638,22.5807289 35.3274406,21.91266 33.8174186,21.91266 C31.4183182,21.91266 29.8941838,23.5427481 29.8941838,25.4400638 C29.8941838,26.9498995 30.853824,28.1123394 33.2105873,28.7670469 C34.4948117,29.1144428 35.3133283,29.3549476 35.3133283,30.3169668 C35.3133283,31.2255405 34.6218229,31.7867184 33.6198456,31.7867184 C32.5473066,31.7867184 31.72879,31.1320109 31.2348576,30.5307488 L29.583712,32.0940301 C30.4727904,33.2431086 31.9122506,33.964623 33.5916209,33.964623 M43.286809,33.964623 C40.746585,33.964623 38.6861812,32.0405846 38.6861812,29.7023434 C38.6861812,27.3641022 40.746585,25.4400638 43.286809,25.4400638 C45.8270329,25.4400638 47.8874368,27.3641022 47.8874368,29.7023434 C47.8874368,32.0405846 45.8270329,33.964623 43.286809,33.964623 M43.286809,31.8268025 C44.5145839,31.8268025 45.4883364,30.9048674 45.4883364,29.7023434 C45.4883364,28.4998194 44.5145839,27.5778843 43.286809,27.5778843 C42.0449217,27.5778843 41.0852816,28.4998194 41.0852816,29.7023434 C41.0852816,30.9182288 42.0590341,31.8268025 43.286809,31.8268025 M53.8287384,24.1974556 L53.8287384,22.0596352 L53.4759295,22.0596352 C50.554672,22.0596352 49.1152117,23.9035053 49.1152117,26.0680486 L49.1152117,33.750841 L51.5143121,33.750841 L51.5143121,30.3837737 C51.5143121,29.2614179 52.4316152,28.4597352 53.7581766,28.4330125 L53.7581766,26.2684692 C52.8126488,26.2684692 52.0505816,26.5356968 51.5143121,27.0701519 L51.5143121,26.2016624 C51.5143121,24.7853563 52.4880646,24.1440101 53.8287384,24.1974556 M59.0644222,33.964623 C56.5241982,33.964623 54.4637944,32.0405846 54.4637944,29.7023434 C54.4637944,27.3641022 56.5241982,25.4400638 59.0644222,25.4400638 C61.6046461,25.4400638 63.66505,27.3641022 63.66505,29.7023434 C63.66505,32.0405846 61.6046461,33.964623 59.0644222,33.964623 M59.0644222,31.8268025 C60.3063094,31.8268025 61.2659496,30.9048674 61.2659496,29.7023434 C61.2659496,28.4998194 60.2921971,27.5778843 59.0644222,27.5778843 C57.8366473,27.5778843 56.8628948,28.4998194 56.8628948,29.7023434 C56.8628948,30.9182288 57.8366473,31.8268025 59.0644222,31.8268025 M67.2919253,26.5891423 L67.2919253,25.6672072 L64.9633867,25.6672072 L64.9633867,33.750841 L67.3624871,33.750841 L67.3624871,30.0631006 C67.3624871,28.7269628 68.195116,27.9787256 69.6345763,27.9787256 L69.6345763,25.5469548 C68.5479249,25.5068707 67.7717454,25.8542665 67.2919253,26.5891423 M73.4166875,29.6221751 L73.4166875,27.6446912 C73.952957,28.1791463 74.7009118,28.4463739 75.660552,28.4463739 L75.660552,26.295192 C74.3622153,26.2684692 73.4166875,25.4400638 73.4166875,24.3444308 L73.4166875,23.0750999 L71.0175871,23.0750999 L71.0175871,29.7557889 C71.0175871,31.9203322 72.442935,33.7642023 75.3783049,33.7642023 L75.7311138,33.7642023 L75.7311138,31.6263818 C74.39044,31.666466 73.4166875,31.0384812 73.4166875,29.6221751 M78.5959219,33.8844547 C79.4708879,33.8844547 80.2047304,33.2030245 80.2047304,32.3612576 C80.2047304,31.5328522 79.4850003,30.8380605 78.5959219,30.8380605 C77.7068435,30.8380605 76.9871134,31.5194908 76.9871134,32.3612576 C76.9871134,33.2030245 77.7068435,33.8844547 78.5959219,33.8844547" id="Shape" fill="#FFFFFF" fill-rule="nonzero"></path>
|
9 |
+
<g id="peace" transform="translate(5.478465, 13.147596)" fill="#FFFFFF" fill-rule="nonzero">
|
10 |
+
<path d="M7.08009616,20.2252017 C7.63200989,20.7666723 7.64242336,21.6517685 7.10092309,22.203652 L6.99678843,22.3181938 C6.45528816,22.8700773 5.5701435,22.8804902 5.01822977,22.3390196 L1.89418978,19.2463895 C1.02987205,18.3821191 0.915323914,17.3200037 1.45682418,16.7577074 L1.56095885,16.6431655 C2.00873791,16.1745852 2.74809404,16.1329336 3.25835391,16.5286236 C3.49786364,16.7160558 3.8519215,16.6744042 4.04977737,16.4349076 C4.23721977,16.195411 4.1955659,15.8413725 3.95605617,15.6435275 C2.98760377,14.8833861 1.60261271,14.9771021 0.748708448,15.8517854 L0.644573782,15.9663273 C-0.365532482,17.0076169 -0.167676616,18.7673963 1.09235285,20.0273567 L4.2268063,23.1512255 C5.23691257,24.1196248 6.83017296,24.0987991 7.80903883,23.099161 L7.92358696,22.9846192 C8.88162589,21.9849812 8.86079896,20.402221 7.87151962,19.4234087 C7.65283683,19.2047379 7.29877896,19.2047379 7.08009616,19.4338216 C6.85099989,19.6524925 6.85099989,20.0065309 7.08009616,20.2252017 M5.20567217,3.45002622 L6.48652856,13.9670512 C6.51776896,14.2690252 6.79893256,14.4981089 7.11133656,14.4564573 C7.41332709,14.4252186 7.64242336,14.1440704 7.60076949,13.8316836 L6.3199131,3.27300699 L6.30949963,3.21052962 C6.09081683,2.33584635 6.6323171,1.35703412 7.36125976,1.20084068 C7.76738496,1.11753751 8.19433709,1.19042779 8.53798149,1.4195115 C8.88162589,1.64859521 9.12113562,2.00263368 9.20444335,2.40873662 L11.4329252,11.9261236 C11.5058195,12.2280976 11.80781,12.4155297 12.1098005,12.3426394 C12.4117911,12.2697492 12.5992335,11.9677752 12.5263392,11.6658012 L10.3082708,2.17965291 C10.1728958,1.49240177 9.75635709,0.878040905 9.16278949,0.482350856 C8.56922189,0.0866608066 7.82986576,-0.0487068418 7.13216349,0.0970737026 C5.7575859,0.388634792 4.86202777,1.99222078 5.20567217,3.45002622" id="Shape"></path>
|
11 |
+
<path d="M16.9520625,15.7997209 L19.4825349,3.20011672 C19.774112,1.84644024 18.9722751,0.482350856 17.6289379,0.0866608066 C16.1293987,-0.288203451 14.619446,0.586479816 14.2341477,2.06511105 L11.4329252,11.6553883 C11.3496175,11.9573623 11.5162329,12.2697492 11.8182235,12.3530523 C12.120214,12.4363555 12.432618,12.2697492 12.5159257,11.9677752 L15.3171483,2.36708504 C15.556658,1.48198887 16.4522161,0.950931177 17.3269473,1.16960199 C18.0767169,1.39868571 18.5453229,2.17965291 18.3787075,2.97103301 L15.8482351,15.5810501 C15.7857543,15.8830241 15.9836101,16.1849981 16.2856007,16.2474754 C16.5980047,16.2995399 16.8999952,16.1016949 16.9520625,15.7997209 M10.5894344,27.9411577 C6.58024976,27.9411577 3.23752697,25.004721 3.23752697,20.8291497 C3.23752697,20.5167628 2.98760377,20.2668533 2.67519978,20.2668533 C2.36279578,20.2668533 2.11287258,20.5167628 2.11287258,20.8291497 C2.11287258,25.6607335 5.99709563,29.0657505 10.5894344,29.0657505 C10.9018384,29.0657505 11.1517616,28.815841 11.1517616,28.5034541 C11.1517616,28.1910672 10.9018384,27.9411577 10.5894344,27.9411577 M8.61087576,18.1217967 C8.52756802,18.4341836 8.32971216,18.7153318 8.05896202,18.892351 L7.93400042,18.9652413 C7.28836549,19.4025829 6.4136343,19.2359766 5.9762687,18.5903771 L3.51869057,14.9354505 C2.85222871,13.9149867 2.93553644,12.8528713 3.58117137,12.4051168 L3.69571951,12.3218136 C4.52879684,11.8428204 5.2264991,12.2072718 5.9450283,13.2589743 L7.99648122,16.3203657 C8.17351016,16.5806881 8.51715456,16.6431655 8.77749122,16.4765592 C9.03782789,16.3099528 9.10030869,15.9559144 8.93369322,15.695592 L6.88224029,12.6342005 C5.86172056,11.1555693 4.61210457,10.4995568 3.10215191,11.3742401 L2.94594991,11.4783691 C1.73798778,12.3009879 1.59219925,14.0711802 2.58147858,15.5602243 L5.0390567,19.2255637 C5.83048016,20.3813952 7.39250016,20.6833692 8.54839496,19.902402 L8.67335656,19.8190988 C9.16278949,19.4858861 9.51684735,18.9860671 9.68346282,18.4133578 C9.76677055,18.1113838 9.58974162,17.8094099 9.28775109,17.7261067 C8.99617402,17.6428035 8.69418349,17.8198227 8.61087576,18.1217967" id="Shape"></path>
|
12 |
+
<path d="M12.3284833,19.9752922 C11.1621751,20.6313047 10.4332324,21.8496135 10.3499247,23.7135219 C10.3290978,24.0259088 10.5686075,24.2862312 10.8810115,24.307057 C11.1934155,24.3174699 11.4537521,24.0883862 11.4745791,23.7759993 C11.5578868,22.0891101 12.2139352,21.1831882 13.2656953,20.7874981 C13.8280225,20.5792402 14.4424171,20.5375886 14.9839173,20.5896531 L15.1192924,20.6104789 C15.8378216,20.7458465 16.0669179,19.6733182 15.3483887,19.5067119 L11.0268,18.5383126 C9.00658749,17.9864291 8.69418349,17.2367006 9.06906829,15.987153 C9.23568375,15.4456825 9.55850122,15.1645343 10.0687611,15.0499924 C10.401992,14.9771021 10.7664633,14.987515 11.1205212,15.0499924 C11.2246559,15.0708182 11.2975501,15.0812311 11.3287905,15.091644 L17.8892745,16.6223397 L18.0142361,16.6639913 C18.1183708,16.7056429 18.2329189,16.788946 18.3474671,16.9034879 C18.7848327,17.3720682 19.0347559,18.2571644 18.9097943,19.7149698 C18.4828421,24.8172889 16.1085717,27.9828093 10.4644728,27.9307448 C10.1520688,27.9307448 9.90214562,28.1806543 9.90214562,28.4826283 C9.90214562,28.7950152 10.1520688,29.0449247 10.4540593,29.0449247 C16.7854471,29.0969892 19.5554292,25.4212369 20.0240352,19.798273 C20.1698237,18.0489065 19.8470063,16.8514234 19.1701309,16.1329336 C18.7952461,15.7372435 18.3995344,15.5498114 18.0975439,15.5081598 L11.6099541,13.9982899 C11.5683003,13.987877 11.4641656,13.9566383 11.3183771,13.9358125 C10.8289441,13.8525094 10.3186843,13.8420965 9.81883789,13.9462254 C8.94410669,14.1440704 8.27764482,14.6959539 7.99648122,15.6539404 C7.45498096,17.4553714 8.02772162,18.8715252 10.7560499,19.6108409 L12.3284833,19.9752922 Z" id="Path"></path>
|
13 |
+
</g>
|
14 |
</g>
|
15 |
</g>
|
16 |
</g>
|
modules/ppcp-wc-gateway/assets/images/venmo.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="1040" height="253" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="hidden"><defs><clipPath id="clip0"><rect x="0" y="0" width="1040" height="253"/></clipPath><clipPath id="clip1"><rect x="0" y="0" width="2.47652e+06" height="604842"/></clipPath><image width="1044" height="252" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABBQAAAD8CAYAAADHR/dgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAOw4AADsOAcy2oYMAACp8SURBVHhe7d0HmG1XVQDgZ6SpIEWqSFGUACotgggKWFAQBAFBRUWqCAqiKE0xSNPkAekkJHkvvZDeSO+9956Q3ntvJLO9693zPoZhzb333Df7vJm5//q+/1Py5px177Rv9jp7r7Vk7Fg69bwl60x9qPd/l/Uc13PdknWn7vmpb5YCAAAAzC+xZl+xdu+v4Zc1a/rnNav8yvHJqcf2En6kl/D47MUBAAAAC0us8Ves9WPNP+exdlljybpTH+sluTZLDgAAACxsseZfsfaPGsCcxDpTa/ZueHKWDAAAAFhcogawohawSrF06r09d2cJAAAAgMUpagEragJjxbpTn/6ppVNT2Y0BAACARW7p1FTUBpoqwYixdOoT6c0AAACAiRI1gqZaMCTWmXpb74MfyW4CAAAATJaoEayoFQyMr049p/eBt2Y3AAAAACZT1ApW1AxmjXWn9ssuBAAAACbbkqVT+zbVgxmxztTbsgsAAAAAwpKlU29tqgjTYunUKdkHAwAAAISoHTRVhCbWmXpD9oEAAAAA00UNoakm9GLdqeXZBwEAAABMFzWEfjFh7bLGkqVTt2cfBAAAADDdkqVTt62oJSz5Zlkr+wAAAACATNQS4rjDx7N/BAAAAMhELSGmO6yf/SMAAABAJmoJUVDYLftHAAAAgEzUEqKgcFD2jwAAAACZqCVED4Wjsn8EAAAAyCxZWo5UUAAAAABaiVqCggIAAADQioICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggIAAADQmoICAAAA0JqCAgAAANCaggLAhHr6JqW8ZbdSvnRsKXtfUsp1d5fyT4fmHztfPOpbpfzalqX8Se91v3//Uj5zRClrH1fKN04sZZ2TSvmf40v5/NGlfPSgUt7c+5gXLy/lp3vXZPeaRE/tfc1//3ulfPCAUr7S+1xtdmYp259Xyl69r3/Y+YJSNj+rlC/3Pqd/3/v8vnybUh797fxek+Alve+fd+1Vyn8cWcomZ5Sy4/ml7PeDUo64qpSjry7lmJ7vXVjK//W+9969dylP2ii/z1x63HqlvGaH/vf/f/d+dpef0//aHXx5KcdeU8pxPYdd2f+Z3rT39f1C7+fhrbuX8ozv5PdbSOK9v2Lb/uc6fva/eUopW/Xe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AAC0pqAAAAAAtKagAAAAALSmoAAAAAC0pqAAAAAAtKagAAAAALSmoAAAAAC0pqAAAAAAtKagAAAAALSmoAAAAAC0pqAAAAAAtKagAAAAALSmoAAAAAC0pqAAAAAAtKagAAAAALSmoAAAAAC0pqAAAAAAtKagAAAAALSmoAAAAAC0pqAAAAAAtKagAAAAALSmoAAAAAC0pqAAAAAAtKagAAAAALSmoAAAAAC0tmRpOXLJkqVTB2X/CAAAAJCJWkIUFHbL/hEAAAAgE7WEKCisn/0jAAAAQCZqCdFD4ePZPwIAAABkopawZMk3y1rZPwIAAABkopawZMnaZY0lS6duyz4AAAAAYLqoIayoJayIdaeWZx8EAAAAMF3UEPrFhIh1pt6QfRAAAADAdFFDaKoJTSydOiX7QAAAAIAQtYOmijAt1pl6W/bBAAAAAGHJ0qm3NlWEGbHu1H7ZBQAAAMBkW7J0at+mepDEV6ee0/uAW7MLAQAAgMkUtYIVNYOBsc7U23of+Eh2AwAAAGCyRI1gRa1gpFg69YnsJgAAAMBkiRpBUy0YMdad+vRPLZ2aym4GAAAALHJLp6aiNtBUCVrG0qn39tyd3hgAAABYlKIWsKImsEqxztSaS9adOjlLAAAAACwuUQNYUQuYk1i7rNG74ceWLJ26NksGAAAALGyx5l+x9o8awJzHJ6ceu2SdqY/0khyfJQcAAAAWlljjr1jrx5q/k1g69bxewg/1/u+yFcmXTl3Xc2/24gAAAIDVK9bszdo91vDLmjX985pVfstYsuT/AbSFY2y8hbhRAAAAAElFTkSuQmCC" preserveAspectRatio="none" id="img2"></image><clipPath id="clip3"><rect x="0" y="0" width="2.47652e+06" height="597780"/></clipPath></defs><g clip-path="url(#clip0)"><g clip-path="url(#clip1)" transform="scale(0.000419944 0.000419944)"><g clip-path="url(#clip3)" transform="scale(1 1.00783)"><use width="100%" height="100%" xlink:href="#img2" transform="scale(2372.14 2372.14)"></use></g></g></g></svg>
|
modules/ppcp-wc-gateway/assets/images/visa-dark.svg
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="133px" height="84px" viewBox="0 0 133 84" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<title>Visa_acceptancemark_80x50</title>
|
4 |
+
<g id="RD-4" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5 |
+
<g id="LP---venmo---social---primary" transform="translate(-824.000000, -1489.000000)">
|
6 |
+
<g id="Visa_acceptancemark_80x50" transform="translate(824.000000, 1489.000000)">
|
7 |
+
<rect id="Rectangle" fill="#1D1C45" x="0" y="0" width="132.39159" height="83.7921454" rx="4.581738"></rect>
|
8 |
+
<g id="Visa" transform="translate(15.082586, 25.137644)" fill="#FFFFFF" fill-rule="nonzero">
|
9 |
+
<path d="M51.4455687,0.590854329 L44.5028773,32.8958387 L36.1060355,32.8958387 L43.051613,0.590854329 L51.4455687,0.590854329 Z M86.768489,21.4493529 L91.1881833,9.31960182 L93.7323456,21.4493529 L86.768489,21.4493529 Z M96.1370094,32.8958387 L103.90226,32.8958387 L97.1240809,0.590854329 L89.9581922,0.590854329 C88.3462641,0.590854329 86.9873571,1.5231018 86.3841468,2.96001738 L73.7864787,32.8958387 L82.6003729,32.8958387 L84.3517993,28.0694111 L95.1225193,28.0694111 L96.1370094,32.8958387 Z M74.222772,22.3476047 C74.2602923,13.8223523 62.3788765,13.3516799 62.4606514,9.54224952 C62.486627,8.38400266 63.5949177,7.15249753 66.021709,6.83696026 C67.2228384,6.68086746 70.5404952,6.55972795 74.2987747,8.28201565 L75.7740906,1.43212747 C73.7523257,0.701938773 71.1542883,0 67.9188872,0 C59.6211374,0 53.7795214,4.39166605 53.7328615,10.6779922 C53.6775431,15.3310897 57.9014586,17.9238582 61.0839464,19.4709005 C64.3535004,21.0538539 65.4502465,22.0694147 65.4382207,23.4852625 C65.4136884,25.6538032 62.8291196,26.6095125 60.412911,26.6468598 C56.1918816,26.7124572 53.7420011,25.5111171 51.7899855,24.6056832 L50.2699339,31.6849224 C52.2296459,32.581259 55.8508322,33.3626806 59.6062254,33.4009855 C68.4268539,33.4009855 74.1953534,29.0658194 74.222772,22.3476047 L74.222772,22.3476047 Z M39.4487059,0.590854329 L25.8456873,32.8958387 L16.9711835,32.8958387 L10.2771842,7.11419256 C9.87071473,5.52692991 9.51812048,4.94421538 8.28235702,4.2767511 C6.26444044,3.18553796 2.93187165,2.16279498 0,1.52741111 L0.197702912,0.590854329 L14.4847447,0.590854329 C16.3044774,0.590854329 17.9428621,1.79602479 18.3560659,3.88412506 L21.8916291,22.578392 L30.6300016,0.590854329 L39.4487059,0.590854329 L39.4487059,0.590854329 Z" id="Fill-1"></path>
|
10 |
+
</g>
|
11 |
+
</g>
|
12 |
+
</g>
|
13 |
+
</g>
|
14 |
+
</svg>
|
modules/ppcp-wc-gateway/services.php
CHANGED
@@ -17,7 +17,9 @@ use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
|
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
18 |
use WooCommerce\PayPalCommerce\Button\Helper\MessagesDisclaimers;
|
19 |
use WooCommerce\PayPalCommerce\Onboarding\Environment;
|
|
|
20 |
use WooCommerce\PayPalCommerce\Onboarding\State;
|
|
|
21 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
|
22 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail;
|
23 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\RenderAuthorizeAction;
|
@@ -250,198 +252,272 @@ return array(
|
|
250 |
$settings = $container->get( 'wcgateway.settings' );
|
251 |
return new OrderTablePaymentStatusColumn( $settings );
|
252 |
},
|
|
|
|
|
|
|
253 |
|
254 |
'wcgateway.settings.fields' => static function ( ContainerInterface $container ): array {
|
255 |
|
256 |
$state = $container->get( 'onboarding.state' );
|
|
|
|
|
257 |
$messages_disclaimers = $container->get( 'button.helper.messages-disclaimers' );
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
$fields = array(
|
260 |
-
'
|
261 |
-
'
|
262 |
-
'
|
263 |
-
'
|
264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
'screens' => array(
|
266 |
State::STATE_START,
|
267 |
-
State::STATE_PROGRESSIVE,
|
268 |
State::STATE_ONBOARDED,
|
269 |
),
|
270 |
'requirements' => array(),
|
271 |
'gateway' => 'paypal',
|
272 |
),
|
273 |
|
274 |
-
|
275 |
-
'credentials_production_heading' => array(
|
276 |
'heading' => __( 'API Credentials', 'woocommerce-paypal-payments' ),
|
277 |
'type' => 'ppcp-heading',
|
278 |
'screens' => array(
|
279 |
-
State::STATE_PROGRESSIVE,
|
280 |
State::STATE_ONBOARDED,
|
281 |
),
|
|
|
282 |
'requirements' => array(),
|
283 |
'gateway' => 'paypal',
|
284 |
),
|
285 |
-
'
|
286 |
-
'
|
287 |
-
'type' => '
|
288 |
'screens' => array(
|
289 |
-
State::STATE_START,
|
290 |
-
State::STATE_PROGRESSIVE,
|
291 |
State::STATE_ONBOARDED,
|
292 |
),
|
293 |
-
'
|
294 |
'requirements' => array(),
|
295 |
'gateway' => 'paypal',
|
296 |
-
'description' => __( '
|
297 |
),
|
298 |
-
|
299 |
-
|
300 |
'type' => 'ppcp-text',
|
301 |
-
'classes' => array(
|
302 |
-
'text' =>
|
|
|
303 |
'screens' => array(
|
304 |
State::STATE_START,
|
305 |
-
State::STATE_PROGRESSIVE,
|
306 |
State::STATE_ONBOARDED,
|
307 |
),
|
308 |
-
'env' => 'production',
|
309 |
'requirements' => array(),
|
310 |
'gateway' => 'paypal',
|
311 |
-
'description' => __( 'Click to reset current credentials and use another account.', 'woocommerce-paypal-payments' ),
|
312 |
),
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
|
|
|
|
318 |
'screens' => array(
|
319 |
State::STATE_START,
|
320 |
-
State::STATE_PROGRESSIVE,
|
321 |
-
State::STATE_ONBOARDED,
|
322 |
),
|
|
|
|
|
|
|
323 |
'requirements' => array(),
|
324 |
'gateway' => 'paypal',
|
325 |
),
|
326 |
-
'
|
327 |
-
'
|
328 |
-
'classes' => array(
|
329 |
-
'
|
330 |
-
|
331 |
-
|
332 |
-
'
|
333 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
'screens' => array(
|
335 |
State::STATE_START,
|
336 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
State::STATE_ONBOARDED,
|
338 |
),
|
|
|
|
|
339 |
'requirements' => array(),
|
340 |
'gateway' => 'paypal',
|
|
|
341 |
),
|
342 |
-
'
|
343 |
-
'title' => __( '
|
344 |
-
'
|
345 |
-
'
|
346 |
-
'
|
347 |
-
|
348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
'screens' => array(
|
350 |
State::STATE_START,
|
351 |
-
State::STATE_PROGRESSIVE,
|
352 |
State::STATE_ONBOARDED,
|
353 |
),
|
354 |
'requirements' => array(),
|
355 |
'gateway' => 'paypal',
|
356 |
),
|
357 |
-
'
|
358 |
-
'
|
359 |
-
'
|
360 |
-
'
|
361 |
-
'desc_tip' => true,
|
362 |
-
'description' => __( 'The client id of your api ', 'woocommerce-paypal-payments' ),
|
363 |
-
'default' => false,
|
364 |
'screens' => array(
|
365 |
State::STATE_START,
|
366 |
-
State::STATE_PROGRESSIVE,
|
367 |
State::STATE_ONBOARDED,
|
368 |
),
|
369 |
'requirements' => array(),
|
370 |
'gateway' => 'paypal',
|
371 |
),
|
372 |
-
'
|
373 |
-
'title' => __( '
|
374 |
-
'classes' => array(
|
375 |
-
'type' => '
|
376 |
-
'
|
377 |
-
'
|
378 |
-
'default' => false,
|
379 |
'screens' => array(
|
380 |
State::STATE_START,
|
381 |
-
State::STATE_PROGRESSIVE,
|
382 |
State::STATE_ONBOARDED,
|
383 |
),
|
384 |
'requirements' => array(),
|
385 |
'gateway' => 'paypal',
|
386 |
),
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
'
|
391 |
-
'
|
|
|
|
|
|
|
392 |
'screens' => array(
|
393 |
-
State::
|
394 |
State::STATE_ONBOARDED,
|
395 |
),
|
396 |
'requirements' => array(),
|
397 |
'gateway' => 'paypal',
|
398 |
-
'description' => __( 'Your account setting is set to sandbox, no real charging takes place. To accept live payments, switch your environment to live and connect your PayPal account.', 'woocommerce-paypal-payments' ),
|
399 |
),
|
400 |
-
|
401 |
-
|
402 |
-
'
|
403 |
-
'type' => '
|
|
|
|
|
|
|
404 |
'screens' => array(
|
405 |
State::STATE_START,
|
406 |
-
State::STATE_PROGRESSIVE,
|
407 |
State::STATE_ONBOARDED,
|
408 |
),
|
409 |
-
'env' => 'sandbox',
|
410 |
'requirements' => array(),
|
411 |
'gateway' => 'paypal',
|
412 |
-
'description' => __( 'Setup or link an existing PayPal Sandbox account.', 'woocommerce-paypal-payments' ),
|
413 |
),
|
414 |
-
'
|
415 |
-
'title' => __( '
|
416 |
-
'
|
417 |
-
'
|
418 |
-
'
|
|
|
|
|
419 |
'screens' => array(
|
420 |
State::STATE_START,
|
421 |
-
State::STATE_PROGRESSIVE,
|
422 |
State::STATE_ONBOARDED,
|
423 |
),
|
424 |
-
'env' => 'production',
|
425 |
'requirements' => array(),
|
426 |
'gateway' => 'paypal',
|
427 |
-
'description' => __( 'Click to reset current credentials and use another account.', 'woocommerce-paypal-payments' ),
|
428 |
),
|
429 |
-
'
|
430 |
-
'
|
431 |
-
'
|
432 |
-
'
|
433 |
-
'
|
|
|
|
|
434 |
'screens' => array(
|
435 |
State::STATE_START,
|
436 |
-
State::STATE_PROGRESSIVE,
|
437 |
State::STATE_ONBOARDED,
|
438 |
),
|
439 |
'requirements' => array(),
|
440 |
'gateway' => 'paypal',
|
441 |
),
|
442 |
-
|
|
|
443 |
'title' => __( 'Sandbox Email address', 'woocommerce-paypal-payments' ),
|
444 |
-
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '' ),
|
445 |
'type' => 'text',
|
446 |
'required' => true,
|
447 |
'desc_tip' => true,
|
@@ -449,69 +525,65 @@ return array(
|
|
449 |
'default' => '',
|
450 |
'screens' => array(
|
451 |
State::STATE_START,
|
452 |
-
State::STATE_PROGRESSIVE,
|
453 |
State::STATE_ONBOARDED,
|
454 |
),
|
455 |
'requirements' => array(),
|
456 |
'gateway' => 'paypal',
|
457 |
),
|
458 |
-
'merchant_id_sandbox'
|
459 |
'title' => __( 'Sandbox Merchant Id', 'woocommerce-paypal-payments' ),
|
460 |
-
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '' ),
|
461 |
'type' => 'ppcp-text-input',
|
462 |
'desc_tip' => true,
|
463 |
'description' => __( 'The merchant id of your account ', 'woocommerce-paypal-payments' ),
|
464 |
'default' => false,
|
465 |
'screens' => array(
|
466 |
State::STATE_START,
|
467 |
-
State::STATE_PROGRESSIVE,
|
468 |
State::STATE_ONBOARDED,
|
469 |
),
|
470 |
'requirements' => array(),
|
471 |
'gateway' => 'paypal',
|
472 |
),
|
473 |
-
'client_id_sandbox'
|
474 |
'title' => __( 'Sandbox Client Id', 'woocommerce-paypal-payments' ),
|
475 |
-
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '' ),
|
476 |
'type' => 'ppcp-text-input',
|
477 |
'desc_tip' => true,
|
478 |
'description' => __( 'The client id of your api ', 'woocommerce-paypal-payments' ),
|
479 |
'default' => false,
|
480 |
'screens' => array(
|
481 |
State::STATE_START,
|
482 |
-
State::STATE_PROGRESSIVE,
|
483 |
State::STATE_ONBOARDED,
|
484 |
),
|
485 |
'requirements' => array(),
|
486 |
'gateway' => 'paypal',
|
487 |
),
|
488 |
-
'client_secret_sandbox'
|
489 |
'title' => __( 'Sandbox Secret Key', 'woocommerce-paypal-payments' ),
|
490 |
-
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '' ),
|
491 |
'type' => 'ppcp-password',
|
492 |
'desc_tip' => true,
|
493 |
'description' => __( 'The secret key of your api', 'woocommerce-paypal-payments' ),
|
494 |
'default' => false,
|
495 |
'screens' => array(
|
496 |
State::STATE_START,
|
497 |
-
State::STATE_PROGRESSIVE,
|
498 |
State::STATE_ONBOARDED,
|
499 |
),
|
500 |
'requirements' => array(),
|
501 |
'gateway' => 'paypal',
|
502 |
),
|
503 |
|
504 |
-
'checkout_settings_heading'
|
505 |
'heading' => __( 'PayPal Checkout Settings', 'woocommerce-paypal-payments' ),
|
506 |
'type' => 'ppcp-heading',
|
507 |
'screens' => array(
|
508 |
-
State::
|
509 |
State::STATE_ONBOARDED,
|
510 |
),
|
511 |
'requirements' => array(),
|
512 |
'gateway' => 'paypal',
|
513 |
),
|
514 |
-
'title'
|
515 |
'title' => __( 'Title', 'woocommerce-paypal-payments' ),
|
516 |
'type' => 'text',
|
517 |
'description' => __(
|
@@ -521,13 +593,13 @@ return array(
|
|
521 |
'default' => __( 'PayPal', 'woocommerce-paypal-payments' ),
|
522 |
'desc_tip' => true,
|
523 |
'screens' => array(
|
524 |
-
State::
|
525 |
State::STATE_ONBOARDED,
|
526 |
),
|
527 |
'requirements' => array(),
|
528 |
'gateway' => 'paypal',
|
529 |
),
|
530 |
-
'dcc_enabled'
|
531 |
'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ),
|
532 |
'desc_tip' => true,
|
533 |
'description' => __( 'Once enabled, the Credit Card option will show up in the checkout.', 'woocommerce-paypal-payments' ),
|
@@ -542,7 +614,7 @@ return array(
|
|
542 |
State::STATE_ONBOARDED,
|
543 |
),
|
544 |
),
|
545 |
-
'dcc_gateway_title'
|
546 |
'title' => __( 'Title', 'woocommerce-paypal-payments' ),
|
547 |
'type' => 'text',
|
548 |
'description' => __(
|
@@ -559,7 +631,7 @@ return array(
|
|
559 |
),
|
560 |
'gateway' => 'dcc',
|
561 |
),
|
562 |
-
'description'
|
563 |
'title' => __( 'Description', 'woocommerce-paypal-payments' ),
|
564 |
'type' => 'text',
|
565 |
'desc_tip' => true,
|
@@ -572,13 +644,13 @@ return array(
|
|
572 |
'woocommerce-paypal-payments'
|
573 |
),
|
574 |
'screens' => array(
|
575 |
-
State::
|
576 |
State::STATE_ONBOARDED,
|
577 |
),
|
578 |
'requirements' => array(),
|
579 |
'gateway' => 'paypal',
|
580 |
),
|
581 |
-
'intent'
|
582 |
'title' => __( 'Intent', 'woocommerce-paypal-payments' ),
|
583 |
'type' => 'select',
|
584 |
'class' => array(),
|
@@ -594,12 +666,13 @@ return array(
|
|
594 |
'authorize' => __( 'Authorize', 'woocommerce-paypal-payments' ),
|
595 |
),
|
596 |
'screens' => array(
|
|
|
597 |
State::STATE_ONBOARDED,
|
598 |
),
|
599 |
'requirements' => array(),
|
600 |
'gateway' => 'paypal',
|
601 |
),
|
602 |
-
'capture_for_virtual_only'
|
603 |
'title' => __( 'Capture Virtual-Only Orders ', 'woocommerce-paypal-payments' ),
|
604 |
'type' => 'checkbox',
|
605 |
'default' => false,
|
@@ -610,12 +683,13 @@ return array(
|
|
610 |
),
|
611 |
'label' => __( 'Capture Virtual-Only Orders', 'woocommerce-paypal-payments' ),
|
612 |
'screens' => array(
|
|
|
613 |
State::STATE_ONBOARDED,
|
614 |
),
|
615 |
'requirements' => array(),
|
616 |
'gateway' => 'paypal',
|
617 |
),
|
618 |
-
'payee_preferred'
|
619 |
'title' => __( 'Instant Payments ', 'woocommerce-paypal-payments' ),
|
620 |
'type' => 'checkbox',
|
621 |
'default' => false,
|
@@ -626,13 +700,13 @@ return array(
|
|
626 |
),
|
627 |
'label' => __( 'Require Instant Payment', 'woocommerce-paypal-payments' ),
|
628 |
'screens' => array(
|
629 |
-
State::
|
630 |
State::STATE_ONBOARDED,
|
631 |
),
|
632 |
'requirements' => array(),
|
633 |
'gateway' => 'paypal',
|
634 |
),
|
635 |
-
'brand_name'
|
636 |
'title' => __( 'Brand Name', 'woocommerce-paypal-payments' ),
|
637 |
'type' => 'text',
|
638 |
'default' => get_bloginfo( 'name' ),
|
@@ -642,13 +716,13 @@ return array(
|
|
642 |
'woocommerce-paypal-payments'
|
643 |
),
|
644 |
'screens' => array(
|
645 |
-
State::
|
646 |
State::STATE_ONBOARDED,
|
647 |
),
|
648 |
'requirements' => array(),
|
649 |
'gateway' => 'paypal',
|
650 |
),
|
651 |
-
'landing_page'
|
652 |
'title' => __( 'Landing Page', 'woocommerce-paypal-payments' ),
|
653 |
'type' => 'select',
|
654 |
'class' => array(),
|
@@ -664,22 +738,27 @@ return array(
|
|
664 |
ApplicationContext::LANDING_PAGE_BILLING => __( 'Billing (Non-PayPal account)', 'woocommerce-paypal-payments' ),
|
665 |
),
|
666 |
'screens' => array(
|
667 |
-
State::
|
668 |
State::STATE_ONBOARDED,
|
669 |
),
|
670 |
'requirements' => array(),
|
671 |
'gateway' => 'paypal',
|
672 |
),
|
673 |
-
'disable_funding'
|
674 |
-
'title' => __( '
|
675 |
'type' => 'ppcp-multiselect',
|
676 |
'class' => array(),
|
677 |
'input_class' => array( 'wc-enhanced-select' ),
|
678 |
'default' => array(),
|
679 |
-
'desc_tip' =>
|
680 |
-
'description' =>
|
681 |
-
|
682 |
-
'woocommerce-paypal-payments'
|
|
|
|
|
|
|
|
|
|
|
683 |
),
|
684 |
'options' => array(
|
685 |
'card' => _x( 'Credit or debit cards', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
@@ -697,13 +776,13 @@ return array(
|
|
697 |
'venmo' => _x( 'Venmo', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
698 |
),
|
699 |
'screens' => array(
|
700 |
-
State::
|
701 |
State::STATE_ONBOARDED,
|
702 |
),
|
703 |
'requirements' => array(),
|
704 |
'gateway' => 'paypal',
|
705 |
),
|
706 |
-
'vault_enabled'
|
707 |
'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ),
|
708 |
'type' => 'checkbox',
|
709 |
'desc_tip' => true,
|
@@ -724,7 +803,7 @@ return array(
|
|
724 |
'requirements' => array(),
|
725 |
'gateway' => array( 'paypal', 'dcc' ),
|
726 |
),
|
727 |
-
'logging_enabled'
|
728 |
'title' => __( 'Logging', 'woocommerce-paypal-payments' ),
|
729 |
'type' => 'checkbox',
|
730 |
'desc_tip' => true,
|
@@ -733,13 +812,13 @@ return array(
|
|
733 |
'description' => __( 'Enable logging of unexpected behavior. This can also log private data and should only be enabled in a development or stage environment.', 'woocommerce-paypal-payments' ),
|
734 |
'default' => false,
|
735 |
'screens' => array(
|
736 |
-
State::
|
737 |
State::STATE_ONBOARDED,
|
738 |
),
|
739 |
'requirements' => array(),
|
740 |
'gateway' => 'paypal',
|
741 |
),
|
742 |
-
'prefix'
|
743 |
'title' => __( 'Invoice prefix', 'woocommerce-paypal-payments' ),
|
744 |
'type' => 'text',
|
745 |
'desc_tip' => true,
|
@@ -755,7 +834,7 @@ return array(
|
|
755 |
return substr( $letters, 0, 6 ) . '-';
|
756 |
} )(),
|
757 |
'screens' => array(
|
758 |
-
State::
|
759 |
State::STATE_ONBOARDED,
|
760 |
),
|
761 |
'requirements' => array(),
|
@@ -763,30 +842,30 @@ return array(
|
|
763 |
),
|
764 |
|
765 |
// General button styles.
|
766 |
-
'button_style_heading'
|
767 |
'heading' => __( 'Checkout', 'woocommerce-paypal-payments' ),
|
768 |
'type' => 'ppcp-heading',
|
769 |
'screens' => array(
|
770 |
-
State::
|
771 |
State::STATE_ONBOARDED,
|
772 |
),
|
773 |
'requirements' => array(),
|
774 |
'gateway' => 'paypal',
|
775 |
'description' => __( 'Customize the appearance of PayPal Checkout on the checkout page.', 'woocommerce-paypal-payments' ),
|
776 |
),
|
777 |
-
'button_enabled'
|
778 |
'title' => __( 'Enable buttons on Checkout', 'woocommerce-paypal-payments' ),
|
779 |
'type' => 'checkbox',
|
780 |
'label' => __( 'Enable on Checkout', 'woocommerce-paypal-payments' ),
|
781 |
'default' => true,
|
782 |
'screens' => array(
|
783 |
-
State::
|
784 |
State::STATE_ONBOARDED,
|
785 |
),
|
786 |
'requirements' => array(),
|
787 |
'gateway' => 'paypal',
|
788 |
),
|
789 |
-
'button_layout'
|
790 |
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
791 |
'type' => 'select',
|
792 |
'class' => array(),
|
@@ -802,13 +881,13 @@ return array(
|
|
802 |
'horizontal' => __( 'Horizontal', 'woocommerce-paypal-payments' ),
|
803 |
),
|
804 |
'screens' => array(
|
805 |
-
State::
|
806 |
State::STATE_ONBOARDED,
|
807 |
),
|
808 |
'requirements' => array(),
|
809 |
'gateway' => 'paypal',
|
810 |
),
|
811 |
-
'button_tagline'
|
812 |
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
813 |
'type' => 'checkbox',
|
814 |
'default' => true,
|
@@ -819,17 +898,20 @@ return array(
|
|
819 |
'woocommerce-paypal-payments'
|
820 |
),
|
821 |
'screens' => array(
|
822 |
-
State::
|
823 |
State::STATE_ONBOARDED,
|
824 |
),
|
825 |
'requirements' => array(),
|
826 |
'gateway' => 'paypal',
|
827 |
),
|
828 |
-
'button_label'
|
829 |
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
830 |
'type' => 'select',
|
831 |
'class' => array(),
|
832 |
'input_class' => array( 'wc-enhanced-select' ),
|
|
|
|
|
|
|
833 |
'default' => apply_filters( 'woocommerce_paypal_payments_button_label_default', 'paypal' ),
|
834 |
'desc_tip' => true,
|
835 |
'description' => __(
|
@@ -843,13 +925,13 @@ return array(
|
|
843 |
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
|
844 |
),
|
845 |
'screens' => array(
|
846 |
-
State::
|
847 |
State::STATE_ONBOARDED,
|
848 |
),
|
849 |
'requirements' => array(),
|
850 |
'gateway' => 'paypal',
|
851 |
),
|
852 |
-
'button_color'
|
853 |
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
854 |
'type' => 'select',
|
855 |
'class' => array(),
|
@@ -867,13 +949,13 @@ return array(
|
|
867 |
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
868 |
),
|
869 |
'screens' => array(
|
870 |
-
State::
|
871 |
State::STATE_ONBOARDED,
|
872 |
),
|
873 |
'requirements' => array(),
|
874 |
'gateway' => 'paypal',
|
875 |
),
|
876 |
-
'button_shape'
|
877 |
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
878 |
'type' => 'select',
|
879 |
'class' => array(),
|
@@ -889,17 +971,17 @@ return array(
|
|
889 |
'rect' => __( 'Rectangle', 'woocommerce-paypal-payments' ),
|
890 |
),
|
891 |
'screens' => array(
|
892 |
-
State::
|
893 |
State::STATE_ONBOARDED,
|
894 |
),
|
895 |
'requirements' => array(),
|
896 |
'gateway' => 'paypal',
|
897 |
),
|
898 |
-
'message_heading'
|
899 |
'heading' => __( 'Pay Later on Checkout', 'woocommerce-paypal-payments' ),
|
900 |
'type' => 'ppcp-heading',
|
901 |
'screens' => array(
|
902 |
-
State::
|
903 |
State::STATE_ONBOARDED,
|
904 |
),
|
905 |
'requirements' => array( 'messages' ),
|
@@ -907,19 +989,19 @@ return array(
|
|
907 |
'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' ) ),
|
908 |
'class' => array( 'ppcp-subheading' ),
|
909 |
),
|
910 |
-
'message_enabled'
|
911 |
'title' => __( 'Enable message on Checkout', 'woocommerce-paypal-payments' ),
|
912 |
'type' => 'checkbox',
|
913 |
'label' => __( 'Enable on Checkout', 'woocommerce-paypal-payments' ),
|
914 |
'default' => true,
|
915 |
'screens' => array(
|
916 |
-
State::
|
917 |
State::STATE_ONBOARDED,
|
918 |
),
|
919 |
'requirements' => array( 'messages' ),
|
920 |
'gateway' => 'paypal',
|
921 |
),
|
922 |
-
'message_layout'
|
923 |
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
924 |
'type' => 'select',
|
925 |
'class' => array(),
|
@@ -935,13 +1017,13 @@ return array(
|
|
935 |
'flex' => __( 'Flex', 'woocommerce-paypal-payments' ),
|
936 |
),
|
937 |
'screens' => array(
|
938 |
-
State::
|
939 |
State::STATE_ONBOARDED,
|
940 |
),
|
941 |
'requirements' => array( 'messages' ),
|
942 |
'gateway' => 'paypal',
|
943 |
),
|
944 |
-
'message_logo'
|
945 |
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
946 |
'type' => 'select',
|
947 |
'class' => array(),
|
@@ -959,13 +1041,13 @@ return array(
|
|
959 |
'none' => __( 'None', 'woocommerce-paypal-payments' ),
|
960 |
),
|
961 |
'screens' => array(
|
962 |
-
State::
|
963 |
State::STATE_ONBOARDED,
|
964 |
),
|
965 |
'requirements' => array( 'messages' ),
|
966 |
'gateway' => 'paypal',
|
967 |
),
|
968 |
-
'message_position'
|
969 |
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
970 |
'type' => 'select',
|
971 |
'class' => array(),
|
@@ -982,13 +1064,13 @@ return array(
|
|
982 |
'top' => __( 'Top', 'woocommerce-paypal-payments' ),
|
983 |
),
|
984 |
'screens' => array(
|
985 |
-
State::
|
986 |
State::STATE_ONBOARDED,
|
987 |
),
|
988 |
'requirements' => array( 'messages' ),
|
989 |
'gateway' => 'paypal',
|
990 |
),
|
991 |
-
'message_color'
|
992 |
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
993 |
'type' => 'select',
|
994 |
'class' => array(),
|
@@ -1006,13 +1088,13 @@ return array(
|
|
1006 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1007 |
),
|
1008 |
'screens' => array(
|
1009 |
-
State::
|
1010 |
State::STATE_ONBOARDED,
|
1011 |
),
|
1012 |
'requirements' => array( 'messages' ),
|
1013 |
'gateway' => 'paypal',
|
1014 |
),
|
1015 |
-
'message_flex_color'
|
1016 |
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
1017 |
'type' => 'select',
|
1018 |
'class' => array(),
|
@@ -1033,13 +1115,13 @@ return array(
|
|
1033 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1034 |
),
|
1035 |
'screens' => array(
|
1036 |
-
State::
|
1037 |
State::STATE_ONBOARDED,
|
1038 |
),
|
1039 |
'requirements' => array( 'messages' ),
|
1040 |
'gateway' => 'paypal',
|
1041 |
),
|
1042 |
-
'message_flex_ratio'
|
1043 |
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
1044 |
'type' => 'select',
|
1045 |
'class' => array(),
|
@@ -1057,7 +1139,7 @@ return array(
|
|
1057 |
'20x1' => __( '20x1', 'woocommerce-paypal-payments' ),
|
1058 |
),
|
1059 |
'screens' => array(
|
1060 |
-
State::
|
1061 |
State::STATE_ONBOARDED,
|
1062 |
),
|
1063 |
'requirements' => array( 'messages' ),
|
@@ -1065,30 +1147,30 @@ return array(
|
|
1065 |
),
|
1066 |
|
1067 |
// Single product page.
|
1068 |
-
'button_product_heading'
|
1069 |
'heading' => __( 'Single Product Page', 'woocommerce-paypal-payments' ),
|
1070 |
'type' => 'ppcp-heading',
|
1071 |
'screens' => array(
|
1072 |
-
State::
|
1073 |
State::STATE_ONBOARDED,
|
1074 |
),
|
1075 |
'requirements' => array(),
|
1076 |
'gateway' => 'paypal',
|
1077 |
'description' => __( 'Customize the appearance of PayPal Checkout on the single product page.', 'woocommerce-paypal-payments' ),
|
1078 |
),
|
1079 |
-
'button_product_enabled'
|
1080 |
'title' => __( 'Enable buttons on Single Product', 'woocommerce-paypal-payments' ),
|
1081 |
'type' => 'checkbox',
|
1082 |
'label' => __( 'Enable on Single Product', 'woocommerce-paypal-payments' ),
|
1083 |
'default' => true,
|
1084 |
'screens' => array(
|
1085 |
-
State::
|
1086 |
State::STATE_ONBOARDED,
|
1087 |
),
|
1088 |
'requirements' => array(),
|
1089 |
'gateway' => 'paypal',
|
1090 |
),
|
1091 |
-
'button_product_layout'
|
1092 |
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
1093 |
'type' => 'select',
|
1094 |
'class' => array(),
|
@@ -1104,13 +1186,13 @@ return array(
|
|
1104 |
'horizontal' => __( 'Horizontal', 'woocommerce-paypal-payments' ),
|
1105 |
),
|
1106 |
'screens' => array(
|
1107 |
-
State::
|
1108 |
State::STATE_ONBOARDED,
|
1109 |
),
|
1110 |
'requirements' => array(),
|
1111 |
'gateway' => 'paypal',
|
1112 |
),
|
1113 |
-
'button_product_tagline'
|
1114 |
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
1115 |
'type' => 'checkbox',
|
1116 |
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
@@ -1121,17 +1203,20 @@ return array(
|
|
1121 |
'woocommerce-paypal-payments'
|
1122 |
),
|
1123 |
'screens' => array(
|
1124 |
-
State::
|
1125 |
State::STATE_ONBOARDED,
|
1126 |
),
|
1127 |
'requirements' => array(),
|
1128 |
'gateway' => 'paypal',
|
1129 |
),
|
1130 |
-
'button_product_label'
|
1131 |
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
1132 |
'type' => 'select',
|
1133 |
'class' => array(),
|
1134 |
'input_class' => array( 'wc-enhanced-select' ),
|
|
|
|
|
|
|
1135 |
'default' => apply_filters( 'woocommerce_paypal_payments_button_product_label_default', 'paypal' ),
|
1136 |
'desc_tip' => true,
|
1137 |
'description' => __(
|
@@ -1145,13 +1230,13 @@ return array(
|
|
1145 |
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
|
1146 |
),
|
1147 |
'screens' => array(
|
1148 |
-
State::
|
1149 |
State::STATE_ONBOARDED,
|
1150 |
),
|
1151 |
'requirements' => array(),
|
1152 |
'gateway' => 'paypal',
|
1153 |
),
|
1154 |
-
'button_product_color'
|
1155 |
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
1156 |
'type' => 'select',
|
1157 |
'class' => array(),
|
@@ -1169,13 +1254,13 @@ return array(
|
|
1169 |
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
1170 |
),
|
1171 |
'screens' => array(
|
1172 |
-
State::
|
1173 |
State::STATE_ONBOARDED,
|
1174 |
),
|
1175 |
'requirements' => array(),
|
1176 |
'gateway' => 'paypal',
|
1177 |
),
|
1178 |
-
'button_product_shape'
|
1179 |
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
1180 |
'type' => 'select',
|
1181 |
'class' => array(),
|
@@ -1191,18 +1276,18 @@ return array(
|
|
1191 |
'rect' => __( 'Rectangle', 'woocommerce-paypal-payments' ),
|
1192 |
),
|
1193 |
'screens' => array(
|
1194 |
-
State::
|
1195 |
State::STATE_ONBOARDED,
|
1196 |
),
|
1197 |
'requirements' => array(),
|
1198 |
'gateway' => 'paypal',
|
1199 |
),
|
1200 |
|
1201 |
-
'message_product_heading'
|
1202 |
'heading' => __( 'Pay Later on Single Product Page', 'woocommerce-paypal-payments' ),
|
1203 |
'type' => 'ppcp-heading',
|
1204 |
'screens' => array(
|
1205 |
-
State::
|
1206 |
State::STATE_ONBOARDED,
|
1207 |
),
|
1208 |
'requirements' => array( 'messages' ),
|
@@ -1210,19 +1295,19 @@ return array(
|
|
1210 |
'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' ) ),
|
1211 |
'class' => array( 'ppcp-subheading' ),
|
1212 |
),
|
1213 |
-
'message_product_enabled'
|
1214 |
'title' => __( 'Enable message on Single Product', 'woocommerce-paypal-payments' ),
|
1215 |
'type' => 'checkbox',
|
1216 |
'label' => __( 'Enable on Single Product', 'woocommerce-paypal-payments' ),
|
1217 |
'default' => true,
|
1218 |
'screens' => array(
|
1219 |
-
State::
|
1220 |
State::STATE_ONBOARDED,
|
1221 |
),
|
1222 |
'requirements' => array( 'messages' ),
|
1223 |
'gateway' => 'paypal',
|
1224 |
),
|
1225 |
-
'message_product_layout'
|
1226 |
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
1227 |
'type' => 'select',
|
1228 |
'class' => array(),
|
@@ -1238,13 +1323,13 @@ return array(
|
|
1238 |
'flex' => __( 'Flex', 'woocommerce-paypal-payments' ),
|
1239 |
),
|
1240 |
'screens' => array(
|
1241 |
-
State::
|
1242 |
State::STATE_ONBOARDED,
|
1243 |
),
|
1244 |
'requirements' => array( 'messages' ),
|
1245 |
'gateway' => 'paypal',
|
1246 |
),
|
1247 |
-
'message_product_logo'
|
1248 |
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
1249 |
'type' => 'select',
|
1250 |
'class' => array(),
|
@@ -1262,13 +1347,13 @@ return array(
|
|
1262 |
'none' => __( 'None', 'woocommerce-paypal-payments' ),
|
1263 |
),
|
1264 |
'screens' => array(
|
1265 |
-
State::
|
1266 |
State::STATE_ONBOARDED,
|
1267 |
),
|
1268 |
'requirements' => array( 'messages' ),
|
1269 |
'gateway' => 'paypal',
|
1270 |
),
|
1271 |
-
'message_product_position'
|
1272 |
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
1273 |
'type' => 'select',
|
1274 |
'class' => array(),
|
@@ -1285,13 +1370,13 @@ return array(
|
|
1285 |
'top' => __( 'Top', 'woocommerce-paypal-payments' ),
|
1286 |
),
|
1287 |
'screens' => array(
|
1288 |
-
State::
|
1289 |
State::STATE_ONBOARDED,
|
1290 |
),
|
1291 |
'requirements' => array( 'messages' ),
|
1292 |
'gateway' => 'paypal',
|
1293 |
),
|
1294 |
-
'message_product_color'
|
1295 |
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
1296 |
'type' => 'select',
|
1297 |
'class' => array(),
|
@@ -1309,13 +1394,13 @@ return array(
|
|
1309 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1310 |
),
|
1311 |
'screens' => array(
|
1312 |
-
State::
|
1313 |
State::STATE_ONBOARDED,
|
1314 |
),
|
1315 |
'requirements' => array( 'messages' ),
|
1316 |
'gateway' => 'paypal',
|
1317 |
),
|
1318 |
-
'message_product_flex_color'
|
1319 |
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
1320 |
'type' => 'select',
|
1321 |
'class' => array(),
|
@@ -1336,13 +1421,13 @@ return array(
|
|
1336 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1337 |
),
|
1338 |
'screens' => array(
|
1339 |
-
State::
|
1340 |
State::STATE_ONBOARDED,
|
1341 |
),
|
1342 |
'requirements' => array( 'messages' ),
|
1343 |
'gateway' => 'paypal',
|
1344 |
),
|
1345 |
-
'message_product_flex_ratio'
|
1346 |
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
1347 |
'type' => 'select',
|
1348 |
'class' => array(),
|
@@ -1360,7 +1445,7 @@ return array(
|
|
1360 |
'20x1' => __( '20x1', 'woocommerce-paypal-payments' ),
|
1361 |
),
|
1362 |
'screens' => array(
|
1363 |
-
State::
|
1364 |
State::STATE_ONBOARDED,
|
1365 |
),
|
1366 |
'requirements' => array( 'messages' ),
|
@@ -1368,30 +1453,30 @@ return array(
|
|
1368 |
),
|
1369 |
|
1370 |
// Cart settings.
|
1371 |
-
'button_cart_heading'
|
1372 |
'heading' => __( 'Cart', 'woocommerce-paypal-payments' ),
|
1373 |
'type' => 'ppcp-heading',
|
1374 |
'screens' => array(
|
1375 |
-
State::
|
1376 |
State::STATE_ONBOARDED,
|
1377 |
),
|
1378 |
'requirements' => array(),
|
1379 |
'gateway' => 'paypal',
|
1380 |
'description' => __( 'Customize the appearance of PayPal Checkout on the cart page.', 'woocommerce-paypal-payments' ),
|
1381 |
),
|
1382 |
-
'button_cart_enabled'
|
1383 |
'title' => __( 'Buttons on Cart', 'woocommerce-paypal-payments' ),
|
1384 |
'type' => 'checkbox',
|
1385 |
'label' => __( 'Enable on Cart', 'woocommerce-paypal-payments' ),
|
1386 |
'default' => true,
|
1387 |
'screens' => array(
|
1388 |
-
State::
|
1389 |
State::STATE_ONBOARDED,
|
1390 |
),
|
1391 |
'requirements' => array(),
|
1392 |
'gateway' => 'paypal',
|
1393 |
),
|
1394 |
-
'button_cart_layout'
|
1395 |
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
1396 |
'type' => 'select',
|
1397 |
'class' => array(),
|
@@ -1407,13 +1492,13 @@ return array(
|
|
1407 |
'horizontal' => __( 'Horizontal', 'woocommerce-paypal-payments' ),
|
1408 |
),
|
1409 |
'screens' => array(
|
1410 |
-
State::
|
1411 |
State::STATE_ONBOARDED,
|
1412 |
),
|
1413 |
'requirements' => array(),
|
1414 |
'gateway' => 'paypal',
|
1415 |
),
|
1416 |
-
'button_cart_tagline'
|
1417 |
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
1418 |
'type' => 'checkbox',
|
1419 |
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
@@ -1424,17 +1509,20 @@ return array(
|
|
1424 |
'woocommerce-paypal-payments'
|
1425 |
),
|
1426 |
'screens' => array(
|
1427 |
-
State::
|
1428 |
State::STATE_ONBOARDED,
|
1429 |
),
|
1430 |
'requirements' => array(),
|
1431 |
'gateway' => 'paypal',
|
1432 |
),
|
1433 |
-
'button_cart_label'
|
1434 |
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
1435 |
'type' => 'select',
|
1436 |
'class' => array(),
|
1437 |
'input_class' => array( 'wc-enhanced-select' ),
|
|
|
|
|
|
|
1438 |
'default' => apply_filters( 'woocommerce_paypal_payments_button_cart_label_default', 'paypal' ),
|
1439 |
'desc_tip' => true,
|
1440 |
'description' => __(
|
@@ -1448,13 +1536,13 @@ return array(
|
|
1448 |
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
|
1449 |
),
|
1450 |
'screens' => array(
|
1451 |
-
State::
|
1452 |
State::STATE_ONBOARDED,
|
1453 |
),
|
1454 |
'requirements' => array(),
|
1455 |
'gateway' => 'paypal',
|
1456 |
),
|
1457 |
-
'button_cart_color'
|
1458 |
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
1459 |
'type' => 'select',
|
1460 |
'class' => array(),
|
@@ -1472,13 +1560,13 @@ return array(
|
|
1472 |
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
1473 |
),
|
1474 |
'screens' => array(
|
1475 |
-
State::
|
1476 |
State::STATE_ONBOARDED,
|
1477 |
),
|
1478 |
'requirements' => array(),
|
1479 |
'gateway' => 'paypal',
|
1480 |
),
|
1481 |
-
'button_cart_shape'
|
1482 |
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
1483 |
'type' => 'select',
|
1484 |
'class' => array(),
|
@@ -1494,18 +1582,18 @@ return array(
|
|
1494 |
'rect' => __( 'Rectangle', 'woocommerce-paypal-payments' ),
|
1495 |
),
|
1496 |
'screens' => array(
|
1497 |
-
State::
|
1498 |
State::STATE_ONBOARDED,
|
1499 |
),
|
1500 |
'requirements' => array(),
|
1501 |
'gateway' => 'paypal',
|
1502 |
),
|
1503 |
|
1504 |
-
'message_cart_heading'
|
1505 |
'heading' => __( 'Pay Later on Cart', 'woocommerce-paypal-payments' ),
|
1506 |
'type' => 'ppcp-heading',
|
1507 |
'screens' => array(
|
1508 |
-
State::
|
1509 |
State::STATE_ONBOARDED,
|
1510 |
),
|
1511 |
'requirements' => array( 'messages' ),
|
@@ -1513,19 +1601,19 @@ return array(
|
|
1513 |
'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' ) ),
|
1514 |
'class' => array( 'ppcp-subheading' ),
|
1515 |
),
|
1516 |
-
'message_cart_enabled'
|
1517 |
'title' => __( 'Enable message on Cart', 'woocommerce-paypal-payments' ),
|
1518 |
'type' => 'checkbox',
|
1519 |
'label' => __( 'Enable on Cart', 'woocommerce-paypal-payments' ),
|
1520 |
'default' => true,
|
1521 |
'screens' => array(
|
1522 |
-
State::
|
1523 |
State::STATE_ONBOARDED,
|
1524 |
),
|
1525 |
'requirements' => array( 'messages' ),
|
1526 |
'gateway' => 'paypal',
|
1527 |
),
|
1528 |
-
'message_cart_layout'
|
1529 |
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
1530 |
'type' => 'select',
|
1531 |
'class' => array(),
|
@@ -1541,13 +1629,13 @@ return array(
|
|
1541 |
'flex' => __( 'Flex', 'woocommerce-paypal-payments' ),
|
1542 |
),
|
1543 |
'screens' => array(
|
1544 |
-
State::
|
1545 |
State::STATE_ONBOARDED,
|
1546 |
),
|
1547 |
'requirements' => array( 'messages' ),
|
1548 |
'gateway' => 'paypal',
|
1549 |
),
|
1550 |
-
'message_cart_logo'
|
1551 |
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
1552 |
'type' => 'select',
|
1553 |
'class' => array(),
|
@@ -1565,13 +1653,13 @@ return array(
|
|
1565 |
'none' => __( 'None', 'woocommerce-paypal-payments' ),
|
1566 |
),
|
1567 |
'screens' => array(
|
1568 |
-
State::
|
1569 |
State::STATE_ONBOARDED,
|
1570 |
),
|
1571 |
'requirements' => array( 'messages' ),
|
1572 |
'gateway' => 'paypal',
|
1573 |
),
|
1574 |
-
'message_cart_position'
|
1575 |
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
1576 |
'type' => 'select',
|
1577 |
'class' => array(),
|
@@ -1588,13 +1676,13 @@ return array(
|
|
1588 |
'top' => __( 'Top', 'woocommerce-paypal-payments' ),
|
1589 |
),
|
1590 |
'screens' => array(
|
1591 |
-
State::
|
1592 |
State::STATE_ONBOARDED,
|
1593 |
),
|
1594 |
'requirements' => array( 'messages' ),
|
1595 |
'gateway' => 'paypal',
|
1596 |
),
|
1597 |
-
'message_cart_color'
|
1598 |
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
1599 |
'type' => 'select',
|
1600 |
'class' => array(),
|
@@ -1612,13 +1700,13 @@ return array(
|
|
1612 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1613 |
),
|
1614 |
'screens' => array(
|
1615 |
-
State::
|
1616 |
State::STATE_ONBOARDED,
|
1617 |
),
|
1618 |
'requirements' => array( 'messages' ),
|
1619 |
'gateway' => 'paypal',
|
1620 |
),
|
1621 |
-
'message_cart_flex_color'
|
1622 |
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
1623 |
'type' => 'select',
|
1624 |
'class' => array(),
|
@@ -1639,13 +1727,13 @@ return array(
|
|
1639 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1640 |
),
|
1641 |
'screens' => array(
|
1642 |
-
State::
|
1643 |
State::STATE_ONBOARDED,
|
1644 |
),
|
1645 |
'requirements' => array( 'messages' ),
|
1646 |
'gateway' => 'paypal',
|
1647 |
),
|
1648 |
-
'message_cart_flex_ratio'
|
1649 |
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
1650 |
'type' => 'select',
|
1651 |
'class' => array(),
|
@@ -1663,7 +1751,7 @@ return array(
|
|
1663 |
'20x1' => __( '20x1', 'woocommerce-paypal-payments' ),
|
1664 |
),
|
1665 |
'screens' => array(
|
1666 |
-
State::
|
1667 |
State::STATE_ONBOARDED,
|
1668 |
),
|
1669 |
'requirements' => array( 'messages' ),
|
@@ -1671,30 +1759,30 @@ return array(
|
|
1671 |
),
|
1672 |
|
1673 |
// Mini cart settings.
|
1674 |
-
'button_mini-cart_heading'
|
1675 |
'heading' => __( 'Mini Cart', 'woocommerce-paypal-payments' ),
|
1676 |
'type' => 'ppcp-heading',
|
1677 |
'screens' => array(
|
1678 |
-
State::
|
1679 |
State::STATE_ONBOARDED,
|
1680 |
),
|
1681 |
'requirements' => array(),
|
1682 |
'gateway' => 'paypal',
|
1683 |
'description' => __( 'Customize the appearance of PayPal Checkout on the Mini Cart.', 'woocommerce-paypal-payments' ),
|
1684 |
),
|
1685 |
-
'button_mini-cart_enabled'
|
1686 |
'title' => __( 'Buttons on Mini Cart', 'woocommerce-paypal-payments' ),
|
1687 |
'type' => 'checkbox',
|
1688 |
'label' => __( 'Enable on Mini Cart', 'woocommerce-paypal-payments' ),
|
1689 |
'default' => true,
|
1690 |
'screens' => array(
|
1691 |
-
State::
|
1692 |
State::STATE_ONBOARDED,
|
1693 |
),
|
1694 |
'requirements' => array(),
|
1695 |
'gateway' => 'paypal',
|
1696 |
),
|
1697 |
-
'button_mini-cart_layout'
|
1698 |
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
1699 |
'type' => 'select',
|
1700 |
'class' => array(),
|
@@ -1710,13 +1798,13 @@ return array(
|
|
1710 |
'horizontal' => __( 'Horizontal', 'woocommerce-paypal-payments' ),
|
1711 |
),
|
1712 |
'screens' => array(
|
1713 |
-
State::
|
1714 |
State::STATE_ONBOARDED,
|
1715 |
),
|
1716 |
'requirements' => array(),
|
1717 |
'gateway' => 'paypal',
|
1718 |
),
|
1719 |
-
'button_mini-cart_tagline'
|
1720 |
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
1721 |
'type' => 'checkbox',
|
1722 |
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
@@ -1727,17 +1815,20 @@ return array(
|
|
1727 |
'woocommerce-paypal-payments'
|
1728 |
),
|
1729 |
'screens' => array(
|
1730 |
-
State::
|
1731 |
State::STATE_ONBOARDED,
|
1732 |
),
|
1733 |
'requirements' => array(),
|
1734 |
'gateway' => 'paypal',
|
1735 |
),
|
1736 |
-
'button_mini-cart_label'
|
1737 |
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
1738 |
'type' => 'select',
|
1739 |
'class' => array(),
|
1740 |
'input_class' => array( 'wc-enhanced-select' ),
|
|
|
|
|
|
|
1741 |
'default' => apply_filters( 'woocommerce_paypal_payments_button_mini_cart_label_default', 'paypal' ),
|
1742 |
'desc_tip' => true,
|
1743 |
'description' => __(
|
@@ -1751,13 +1842,13 @@ return array(
|
|
1751 |
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
|
1752 |
),
|
1753 |
'screens' => array(
|
1754 |
-
State::
|
1755 |
State::STATE_ONBOARDED,
|
1756 |
),
|
1757 |
'requirements' => array(),
|
1758 |
'gateway' => 'paypal',
|
1759 |
),
|
1760 |
-
'button_mini-cart_color'
|
1761 |
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
1762 |
'type' => 'select',
|
1763 |
'class' => array(),
|
@@ -1775,13 +1866,13 @@ return array(
|
|
1775 |
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
1776 |
),
|
1777 |
'screens' => array(
|
1778 |
-
State::
|
1779 |
State::STATE_ONBOARDED,
|
1780 |
),
|
1781 |
'requirements' => array(),
|
1782 |
'gateway' => 'paypal',
|
1783 |
),
|
1784 |
-
'button_mini-cart_shape'
|
1785 |
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
1786 |
'type' => 'select',
|
1787 |
'class' => array(),
|
@@ -1797,27 +1888,27 @@ return array(
|
|
1797 |
'rect' => __( 'Rectangle', 'woocommerce-paypal-payments' ),
|
1798 |
),
|
1799 |
'screens' => array(
|
1800 |
-
State::
|
1801 |
State::STATE_ONBOARDED,
|
1802 |
),
|
1803 |
'requirements' => array(),
|
1804 |
'gateway' => 'paypal',
|
1805 |
),
|
1806 |
-
'button_mini-cart_height'
|
1807 |
'title' => __( 'Button Height', 'woocommerce-paypal-payments' ),
|
1808 |
'type' => 'number',
|
1809 |
'default' => '35',
|
1810 |
'desc_tip' => true,
|
1811 |
'description' => __( 'Add a value from 25 to 55.', 'woocommerce-paypal-payments' ),
|
1812 |
'screens' => array(
|
1813 |
-
State::
|
1814 |
State::STATE_ONBOARDED,
|
1815 |
),
|
1816 |
'requirements' => array(),
|
1817 |
'gateway' => 'paypal',
|
1818 |
),
|
1819 |
|
1820 |
-
'disable_cards'
|
1821 |
'title' => __( 'Disable specific credit cards', 'woocommerce-paypal-payments' ),
|
1822 |
'type' => 'ppcp-multiselect',
|
1823 |
'class' => array(),
|
@@ -1845,7 +1936,7 @@ return array(
|
|
1845 |
),
|
1846 |
'gateway' => 'dcc',
|
1847 |
),
|
1848 |
-
'card_icons'
|
1849 |
'title' => __( 'Show logo of the following credit cards', 'woocommerce-paypal-payments' ),
|
1850 |
'type' => 'ppcp-multiselect',
|
1851 |
'class' => array(),
|
@@ -1873,7 +1964,7 @@ return array(
|
|
1873 |
),
|
1874 |
'gateway' => 'dcc',
|
1875 |
),
|
1876 |
-
'3d_secure_heading'
|
1877 |
'heading' => __( '3D Secure', 'woocommerce-paypal-payments' ),
|
1878 |
'type' => 'ppcp-heading',
|
1879 |
'description' => wp_kses_post(
|
@@ -1901,7 +1992,7 @@ return array(
|
|
1901 |
),
|
1902 |
'gateway' => 'dcc',
|
1903 |
),
|
1904 |
-
'3d_secure_contingency'
|
1905 |
'title' => __( 'Contingency for 3D Secure', 'woocommerce-paypal-payments' ),
|
1906 |
'type' => 'select',
|
1907 |
'description' => sprintf(
|
@@ -1914,12 +2005,12 @@ return array(
|
|
1914 |
),
|
1915 |
'class' => array(),
|
1916 |
'input_class' => array( 'wc-enhanced-select' ),
|
1917 |
-
'default' => $container->get( 'api.shop.is-psd2-country' ) ? '
|
1918 |
'desc_tip' => true,
|
1919 |
'options' => array(
|
1920 |
'NO_3D_SECURE' => __( 'No 3D Secure (transaction will be denied if 3D Secure is required)', 'woocommerce-paypal-payments' ),
|
1921 |
'SCA_WHEN_REQUIRED' => __( '3D Secure when required', 'woocommerce-paypal-payments' ),
|
1922 |
-
'
|
1923 |
),
|
1924 |
'screens' => array(
|
1925 |
State::STATE_ONBOARDED,
|
@@ -1934,26 +2025,10 @@ return array(
|
|
1934 |
unset( $fields['vault_enabled'] );
|
1935 |
}
|
1936 |
|
1937 |
-
if ( State::STATE_ONBOARDED === $state->production_state() ) {
|
1938 |
-
unset( $fields['ppcp_onboarding_production'] );
|
1939 |
-
} else {
|
1940 |
-
unset( $fields['ppcp_disconnect_production'] );
|
1941 |
-
}
|
1942 |
-
if ( State::STATE_ONBOARDED === $state->sandbox_state() ) {
|
1943 |
-
unset( $fields['ppcp_onboarding_sandbox'] );
|
1944 |
-
} else {
|
1945 |
-
unset( $fields['ppcp_disconnect_sandbox'] );
|
1946 |
-
}
|
1947 |
-
|
1948 |
/**
|
1949 |
* Depending on your store location, some credit cards can't be used.
|
1950 |
* Here, we filter them out.
|
1951 |
-
*
|
1952 |
-
* The DCC Applies object.
|
1953 |
-
*
|
1954 |
-
* @var DccApplies $dcc_applies
|
1955 |
*/
|
1956 |
-
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
1957 |
$card_options = $fields['disable_cards']['options'];
|
1958 |
foreach ( $card_options as $card => $label ) {
|
1959 |
if ( $dcc_applies->can_process_card( $card ) ) {
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
18 |
use WooCommerce\PayPalCommerce\Button\Helper\MessagesDisclaimers;
|
19 |
use WooCommerce\PayPalCommerce\Onboarding\Environment;
|
20 |
+
use WooCommerce\PayPalCommerce\Onboarding\Render\OnboardingOptionsRenderer;
|
21 |
use WooCommerce\PayPalCommerce\Onboarding\State;
|
22 |
+
use WooCommerce\PayPalCommerce\WcGateway\Admin\FeesRenderer;
|
23 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
|
24 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail;
|
25 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\RenderAuthorizeAction;
|
252 |
$settings = $container->get( 'wcgateway.settings' );
|
253 |
return new OrderTablePaymentStatusColumn( $settings );
|
254 |
},
|
255 |
+
'wcgateway.admin.fees-renderer' => static function ( ContainerInterface $container ): FeesRenderer {
|
256 |
+
return new FeesRenderer();
|
257 |
+
},
|
258 |
|
259 |
'wcgateway.settings.fields' => static function ( ContainerInterface $container ): array {
|
260 |
|
261 |
$state = $container->get( 'onboarding.state' );
|
262 |
+
assert( $state instanceof State );
|
263 |
+
|
264 |
$messages_disclaimers = $container->get( 'button.helper.messages-disclaimers' );
|
265 |
|
266 |
+
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
267 |
+
assert( $dcc_applies instanceof DccApplies );
|
268 |
+
|
269 |
+
$is_shop_supports_dcc = $dcc_applies->for_country_currency();
|
270 |
+
|
271 |
+
$onboarding_options_renderer = $container->get( 'onboarding.render-options' );
|
272 |
+
assert( $onboarding_options_renderer instanceof OnboardingOptionsRenderer );
|
273 |
+
|
274 |
+
$module_url = $container->get( 'wcgateway.url' );
|
275 |
+
|
276 |
$fields = array(
|
277 |
+
'ppcp_onboarading_header' => array(
|
278 |
+
'type' => 'ppcp-text',
|
279 |
+
'classes' => array( 'ppcp-onboarding-element' ),
|
280 |
+
'text' => '
|
281 |
+
<div class="ppcp-onboarding-header">
|
282 |
+
<div class="ppcp-onboarding-header-left">
|
283 |
+
<img alt="PayPal" src="' . esc_url( $module_url ) . 'assets/images/paypal.png"/>
|
284 |
+
<h2>The all-in-one checkout solution</h2>
|
285 |
+
</div>
|
286 |
+
<div class="ppcp-onboarding-header-right">
|
287 |
+
<div class="ppcp-onboarding-header-paypal-logos">
|
288 |
+
<img alt="PayPal" src="' . esc_url( $module_url ) . 'assets/images/paypal-button.svg"/>
|
289 |
+
<img alt="Venmo" src="' . esc_url( $module_url ) . 'assets/images/venmo.svg"/>
|
290 |
+
<img alt="Pay Later" src="' . esc_url( $module_url ) . 'assets/images/paylater.svg"/>
|
291 |
+
</div>
|
292 |
+
<div class="ppcp-onboarding-header-cards">
|
293 |
+
<img alt="Visa" src="' . esc_url( $module_url ) . 'assets/images/visa-dark.svg"/>
|
294 |
+
<img alt="Mastercard" src="' . esc_url( $module_url ) . 'assets/images/mastercard-dark.svg"/>
|
295 |
+
<img alt="American Express" src="' . esc_url( $module_url ) . 'assets/images/amex.svg"/>
|
296 |
+
<img alt="Discover" src="' . esc_url( $module_url ) . 'assets/images/discover.svg"/>
|
297 |
+
<img alt="iDEAL" src="' . esc_url( $module_url ) . 'assets/images/ideal-dark.svg"/>
|
298 |
+
<img alt="Sofort" src="' . esc_url( $module_url ) . 'assets/images/sofort.svg"/>
|
299 |
+
</div>
|
300 |
+
</div>
|
301 |
+
</div>',
|
302 |
'screens' => array(
|
303 |
State::STATE_START,
|
|
|
304 |
State::STATE_ONBOARDED,
|
305 |
),
|
306 |
'requirements' => array(),
|
307 |
'gateway' => 'paypal',
|
308 |
),
|
309 |
|
310 |
+
'credentials_production_heading' => array(
|
|
|
311 |
'heading' => __( 'API Credentials', 'woocommerce-paypal-payments' ),
|
312 |
'type' => 'ppcp-heading',
|
313 |
'screens' => array(
|
|
|
314 |
State::STATE_ONBOARDED,
|
315 |
),
|
316 |
+
'state_from' => Environment::PRODUCTION,
|
317 |
'requirements' => array(),
|
318 |
'gateway' => 'paypal',
|
319 |
),
|
320 |
+
'credentials_sandbox_heading' => array(
|
321 |
+
'heading' => __( 'Sandbox API Credentials', 'woocommerce-paypal-payments' ),
|
322 |
+
'type' => 'ppcp-heading',
|
323 |
'screens' => array(
|
|
|
|
|
324 |
State::STATE_ONBOARDED,
|
325 |
),
|
326 |
+
'state_from' => Environment::SANDBOX,
|
327 |
'requirements' => array(),
|
328 |
'gateway' => 'paypal',
|
329 |
+
'description' => __( 'Your account is connected to sandbox, no real charging takes place. To accept live payments, turn off sandbox mode and connect your live PayPal account.', 'woocommerce-paypal-payments' ),
|
330 |
),
|
331 |
+
|
332 |
+
'ppcp_onboarading_options' => array(
|
333 |
'type' => 'ppcp-text',
|
334 |
+
'classes' => array( 'ppcp-onboarding-element' ),
|
335 |
+
'text' => $onboarding_options_renderer->render( $is_shop_supports_dcc ),
|
336 |
+
'raw' => true,
|
337 |
'screens' => array(
|
338 |
State::STATE_START,
|
|
|
339 |
State::STATE_ONBOARDED,
|
340 |
),
|
|
|
341 |
'requirements' => array(),
|
342 |
'gateway' => 'paypal',
|
|
|
343 |
),
|
344 |
+
|
345 |
+
// We need to have a button for each option (ppcp, express)
|
346 |
+
// because currently the only documented way to use the PayPal onboarding JS library
|
347 |
+
// is to have the buttons before loading the script.
|
348 |
+
'ppcp_onboarding_production_ppcp' => array(
|
349 |
+
'type' => 'ppcp_onboarding',
|
350 |
+
'classes' => array( 'ppcp-onboarding-element' ),
|
351 |
'screens' => array(
|
352 |
State::STATE_START,
|
|
|
|
|
353 |
),
|
354 |
+
'state_from' => Environment::PRODUCTION,
|
355 |
+
'env' => Environment::PRODUCTION,
|
356 |
+
'products' => array( 'PPCP' ),
|
357 |
'requirements' => array(),
|
358 |
'gateway' => 'paypal',
|
359 |
),
|
360 |
+
'ppcp_onboarding_production_express' => array(
|
361 |
+
'type' => 'ppcp_onboarding',
|
362 |
+
'classes' => array( 'ppcp-onboarding-element' ),
|
363 |
+
'screens' => array(
|
364 |
+
State::STATE_START,
|
365 |
+
),
|
366 |
+
'state_from' => Environment::PRODUCTION,
|
367 |
+
'env' => Environment::PRODUCTION,
|
368 |
+
'products' => array( 'EXPRESS_CHECKOUT' ),
|
369 |
+
'requirements' => array(),
|
370 |
+
'gateway' => 'paypal',
|
371 |
+
),
|
372 |
+
'ppcp_onboarding_sandbox_ppcp' => array(
|
373 |
+
'type' => 'ppcp_onboarding',
|
374 |
+
'classes' => array( 'ppcp-onboarding-element' ),
|
375 |
+
'screens' => array(
|
376 |
+
State::STATE_START,
|
377 |
+
),
|
378 |
+
'state_from' => Environment::SANDBOX,
|
379 |
+
'env' => Environment::SANDBOX,
|
380 |
+
'products' => array( 'PPCP' ),
|
381 |
+
'requirements' => array(),
|
382 |
+
'gateway' => 'paypal',
|
383 |
+
'description' => __( 'Prior to accepting live payments, you can test payments on your WooCommerce platform in a safe PayPal sandbox environment.', 'woocommerce-paypal-payments' ),
|
384 |
+
),
|
385 |
+
'ppcp_onboarding_sandbox_express' => array(
|
386 |
+
'type' => 'ppcp_onboarding',
|
387 |
+
'classes' => array( 'ppcp-onboarding-element' ),
|
388 |
'screens' => array(
|
389 |
State::STATE_START,
|
390 |
+
),
|
391 |
+
'state_from' => Environment::SANDBOX,
|
392 |
+
'env' => Environment::SANDBOX,
|
393 |
+
'products' => array( 'EXPRESS_CHECKOUT' ),
|
394 |
+
'requirements' => array(),
|
395 |
+
'gateway' => 'paypal',
|
396 |
+
'description' => __( 'Prior to accepting live payments, you can test payments on your WooCommerce platform in a safe PayPal sandbox environment.', 'woocommerce-paypal-payments' ),
|
397 |
+
),
|
398 |
+
|
399 |
+
'ppcp_disconnect_production' => array(
|
400 |
+
'title' => __( 'Disconnect from PayPal', 'woocommerce-paypal-payments' ),
|
401 |
+
'type' => 'ppcp-text',
|
402 |
+
'text' => '<button type="button" class="button ppcp-disconnect production">' . esc_html__( 'Disconnect', 'woocommerce-paypal-payments' ) . '</button>',
|
403 |
+
'screens' => array(
|
404 |
State::STATE_ONBOARDED,
|
405 |
),
|
406 |
+
'state_from' => Environment::PRODUCTION,
|
407 |
+
'env' => Environment::PRODUCTION,
|
408 |
'requirements' => array(),
|
409 |
'gateway' => 'paypal',
|
410 |
+
'description' => __( 'Click to reset current credentials and use another account.', 'woocommerce-paypal-payments' ),
|
411 |
),
|
412 |
+
'ppcp_disconnect_sandbox' => array(
|
413 |
+
'title' => __( 'Disconnect from PayPal Sandbox', 'woocommerce-paypal-payments' ),
|
414 |
+
'type' => 'ppcp-text',
|
415 |
+
'text' => '<button type="button" class="button ppcp-disconnect sandbox">' . esc_html__( 'Disconnect', 'woocommerce-paypal-payments' ) . '</button>',
|
416 |
+
'screens' => array(
|
417 |
+
State::STATE_ONBOARDED,
|
418 |
+
),
|
419 |
+
'state_from' => Environment::SANDBOX,
|
420 |
+
'env' => Environment::SANDBOX,
|
421 |
+
'requirements' => array(),
|
422 |
+
'gateway' => 'paypal',
|
423 |
+
'description' => __( 'Click to reset current credentials and use another account.', 'woocommerce-paypal-payments' ),
|
424 |
+
),
|
425 |
+
'toggle_manual_input' => array(
|
426 |
+
'type' => 'ppcp-text',
|
427 |
+
'text' => '<button type="button" id="ppcp[toggle_manual_input]">' . __( 'Toggle to manual credential input', 'woocommerce-paypal-payments' ) . '</button>',
|
428 |
+
'classes' => array( 'ppcp-onboarding-element' ),
|
429 |
'screens' => array(
|
430 |
State::STATE_START,
|
|
|
431 |
State::STATE_ONBOARDED,
|
432 |
),
|
433 |
'requirements' => array(),
|
434 |
'gateway' => 'paypal',
|
435 |
),
|
436 |
+
'error_label' => array(
|
437 |
+
'type' => 'ppcp-text',
|
438 |
+
'text' => '<label class="error" id="ppcp-form-errors-label"></label>',
|
439 |
+
'classes' => array( 'hide', 'ppcp-always-shown-element' ),
|
|
|
|
|
|
|
440 |
'screens' => array(
|
441 |
State::STATE_START,
|
|
|
442 |
State::STATE_ONBOARDED,
|
443 |
),
|
444 |
'requirements' => array(),
|
445 |
'gateway' => 'paypal',
|
446 |
),
|
447 |
+
'sandbox_on' => array(
|
448 |
+
'title' => __( 'Sandbox', 'woocommerce-paypal-payments' ),
|
449 |
+
'classes' => array( 'ppcp-onboarding-element', 'ppcp-always-shown-element' ),
|
450 |
+
'type' => 'checkbox',
|
451 |
+
'label' => __( 'To test your WooCommerce installation, you can use the sandbox mode.', 'woocommerce-paypal-payments' ),
|
452 |
+
'default' => 0,
|
|
|
453 |
'screens' => array(
|
454 |
State::STATE_START,
|
|
|
455 |
State::STATE_ONBOARDED,
|
456 |
),
|
457 |
'requirements' => array(),
|
458 |
'gateway' => 'paypal',
|
459 |
),
|
460 |
+
'merchant_email_production' => array(
|
461 |
+
'title' => __( 'Live Email address', 'woocommerce-paypal-payments' ),
|
462 |
+
'classes' => array( State::STATE_ONBOARDED === $state->production_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
463 |
+
'type' => 'text',
|
464 |
+
'required' => true,
|
465 |
+
'desc_tip' => true,
|
466 |
+
'description' => __( 'The email address of your PayPal account.', 'woocommerce-paypal-payments' ),
|
467 |
+
'default' => '',
|
468 |
'screens' => array(
|
469 |
+
State::STATE_START,
|
470 |
State::STATE_ONBOARDED,
|
471 |
),
|
472 |
'requirements' => array(),
|
473 |
'gateway' => 'paypal',
|
|
|
474 |
),
|
475 |
+
'merchant_id_production' => array(
|
476 |
+
'title' => __( 'Live Merchant Id', 'woocommerce-paypal-payments' ),
|
477 |
+
'classes' => array( State::STATE_ONBOARDED === $state->production_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
478 |
+
'type' => 'ppcp-text-input',
|
479 |
+
'desc_tip' => true,
|
480 |
+
'description' => __( 'The merchant id of your account ', 'woocommerce-paypal-payments' ),
|
481 |
+
'default' => false,
|
482 |
'screens' => array(
|
483 |
State::STATE_START,
|
|
|
484 |
State::STATE_ONBOARDED,
|
485 |
),
|
|
|
486 |
'requirements' => array(),
|
487 |
'gateway' => 'paypal',
|
|
|
488 |
),
|
489 |
+
'client_id_production' => array(
|
490 |
+
'title' => __( 'Live Client Id', 'woocommerce-paypal-payments' ),
|
491 |
+
'classes' => array( State::STATE_ONBOARDED === $state->production_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
492 |
+
'type' => 'ppcp-text-input',
|
493 |
+
'desc_tip' => true,
|
494 |
+
'description' => __( 'The client id of your api ', 'woocommerce-paypal-payments' ),
|
495 |
+
'default' => false,
|
496 |
'screens' => array(
|
497 |
State::STATE_START,
|
|
|
498 |
State::STATE_ONBOARDED,
|
499 |
),
|
|
|
500 |
'requirements' => array(),
|
501 |
'gateway' => 'paypal',
|
|
|
502 |
),
|
503 |
+
'client_secret_production' => array(
|
504 |
+
'title' => __( 'Live Secret Key', 'woocommerce-paypal-payments' ),
|
505 |
+
'classes' => array( State::STATE_ONBOARDED === $state->production_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
506 |
+
'type' => 'ppcp-password',
|
507 |
+
'desc_tip' => true,
|
508 |
+
'description' => __( 'The secret key of your api', 'woocommerce-paypal-payments' ),
|
509 |
+
'default' => false,
|
510 |
'screens' => array(
|
511 |
State::STATE_START,
|
|
|
512 |
State::STATE_ONBOARDED,
|
513 |
),
|
514 |
'requirements' => array(),
|
515 |
'gateway' => 'paypal',
|
516 |
),
|
517 |
+
|
518 |
+
'merchant_email_sandbox' => array(
|
519 |
'title' => __( 'Sandbox Email address', 'woocommerce-paypal-payments' ),
|
520 |
+
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
521 |
'type' => 'text',
|
522 |
'required' => true,
|
523 |
'desc_tip' => true,
|
525 |
'default' => '',
|
526 |
'screens' => array(
|
527 |
State::STATE_START,
|
|
|
528 |
State::STATE_ONBOARDED,
|
529 |
),
|
530 |
'requirements' => array(),
|
531 |
'gateway' => 'paypal',
|
532 |
),
|
533 |
+
'merchant_id_sandbox' => array(
|
534 |
'title' => __( 'Sandbox Merchant Id', 'woocommerce-paypal-payments' ),
|
535 |
+
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
536 |
'type' => 'ppcp-text-input',
|
537 |
'desc_tip' => true,
|
538 |
'description' => __( 'The merchant id of your account ', 'woocommerce-paypal-payments' ),
|
539 |
'default' => false,
|
540 |
'screens' => array(
|
541 |
State::STATE_START,
|
|
|
542 |
State::STATE_ONBOARDED,
|
543 |
),
|
544 |
'requirements' => array(),
|
545 |
'gateway' => 'paypal',
|
546 |
),
|
547 |
+
'client_id_sandbox' => array(
|
548 |
'title' => __( 'Sandbox Client Id', 'woocommerce-paypal-payments' ),
|
549 |
+
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
550 |
'type' => 'ppcp-text-input',
|
551 |
'desc_tip' => true,
|
552 |
'description' => __( 'The client id of your api ', 'woocommerce-paypal-payments' ),
|
553 |
'default' => false,
|
554 |
'screens' => array(
|
555 |
State::STATE_START,
|
|
|
556 |
State::STATE_ONBOARDED,
|
557 |
),
|
558 |
'requirements' => array(),
|
559 |
'gateway' => 'paypal',
|
560 |
),
|
561 |
+
'client_secret_sandbox' => array(
|
562 |
'title' => __( 'Sandbox Secret Key', 'woocommerce-paypal-payments' ),
|
563 |
+
'classes' => array( State::STATE_ONBOARDED === $state->sandbox_state() ? 'onboarded' : '', 'ppcp-always-shown-element' ),
|
564 |
'type' => 'ppcp-password',
|
565 |
'desc_tip' => true,
|
566 |
'description' => __( 'The secret key of your api', 'woocommerce-paypal-payments' ),
|
567 |
'default' => false,
|
568 |
'screens' => array(
|
569 |
State::STATE_START,
|
|
|
570 |
State::STATE_ONBOARDED,
|
571 |
),
|
572 |
'requirements' => array(),
|
573 |
'gateway' => 'paypal',
|
574 |
),
|
575 |
|
576 |
+
'checkout_settings_heading' => array(
|
577 |
'heading' => __( 'PayPal Checkout Settings', 'woocommerce-paypal-payments' ),
|
578 |
'type' => 'ppcp-heading',
|
579 |
'screens' => array(
|
580 |
+
State::STATE_START,
|
581 |
State::STATE_ONBOARDED,
|
582 |
),
|
583 |
'requirements' => array(),
|
584 |
'gateway' => 'paypal',
|
585 |
),
|
586 |
+
'title' => array(
|
587 |
'title' => __( 'Title', 'woocommerce-paypal-payments' ),
|
588 |
'type' => 'text',
|
589 |
'description' => __(
|
593 |
'default' => __( 'PayPal', 'woocommerce-paypal-payments' ),
|
594 |
'desc_tip' => true,
|
595 |
'screens' => array(
|
596 |
+
State::STATE_START,
|
597 |
State::STATE_ONBOARDED,
|
598 |
),
|
599 |
'requirements' => array(),
|
600 |
'gateway' => 'paypal',
|
601 |
),
|
602 |
+
'dcc_enabled' => array(
|
603 |
'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ),
|
604 |
'desc_tip' => true,
|
605 |
'description' => __( 'Once enabled, the Credit Card option will show up in the checkout.', 'woocommerce-paypal-payments' ),
|
614 |
State::STATE_ONBOARDED,
|
615 |
),
|
616 |
),
|
617 |
+
'dcc_gateway_title' => array(
|
618 |
'title' => __( 'Title', 'woocommerce-paypal-payments' ),
|
619 |
'type' => 'text',
|
620 |
'description' => __(
|
631 |
),
|
632 |
'gateway' => 'dcc',
|
633 |
),
|
634 |
+
'description' => array(
|
635 |
'title' => __( 'Description', 'woocommerce-paypal-payments' ),
|
636 |
'type' => 'text',
|
637 |
'desc_tip' => true,
|
644 |
'woocommerce-paypal-payments'
|
645 |
),
|
646 |
'screens' => array(
|
647 |
+
State::STATE_START,
|
648 |
State::STATE_ONBOARDED,
|
649 |
),
|
650 |
'requirements' => array(),
|
651 |
'gateway' => 'paypal',
|
652 |
),
|
653 |
+
'intent' => array(
|
654 |
'title' => __( 'Intent', 'woocommerce-paypal-payments' ),
|
655 |
'type' => 'select',
|
656 |
'class' => array(),
|
666 |
'authorize' => __( 'Authorize', 'woocommerce-paypal-payments' ),
|
667 |
),
|
668 |
'screens' => array(
|
669 |
+
State::STATE_START,
|
670 |
State::STATE_ONBOARDED,
|
671 |
),
|
672 |
'requirements' => array(),
|
673 |
'gateway' => 'paypal',
|
674 |
),
|
675 |
+
'capture_for_virtual_only' => array(
|
676 |
'title' => __( 'Capture Virtual-Only Orders ', 'woocommerce-paypal-payments' ),
|
677 |
'type' => 'checkbox',
|
678 |
'default' => false,
|
683 |
),
|
684 |
'label' => __( 'Capture Virtual-Only Orders', 'woocommerce-paypal-payments' ),
|
685 |
'screens' => array(
|
686 |
+
State::STATE_START,
|
687 |
State::STATE_ONBOARDED,
|
688 |
),
|
689 |
'requirements' => array(),
|
690 |
'gateway' => 'paypal',
|
691 |
),
|
692 |
+
'payee_preferred' => array(
|
693 |
'title' => __( 'Instant Payments ', 'woocommerce-paypal-payments' ),
|
694 |
'type' => 'checkbox',
|
695 |
'default' => false,
|
700 |
),
|
701 |
'label' => __( 'Require Instant Payment', 'woocommerce-paypal-payments' ),
|
702 |
'screens' => array(
|
703 |
+
State::STATE_START,
|
704 |
State::STATE_ONBOARDED,
|
705 |
),
|
706 |
'requirements' => array(),
|
707 |
'gateway' => 'paypal',
|
708 |
),
|
709 |
+
'brand_name' => array(
|
710 |
'title' => __( 'Brand Name', 'woocommerce-paypal-payments' ),
|
711 |
'type' => 'text',
|
712 |
'default' => get_bloginfo( 'name' ),
|
716 |
'woocommerce-paypal-payments'
|
717 |
),
|
718 |
'screens' => array(
|
719 |
+
State::STATE_START,
|
720 |
State::STATE_ONBOARDED,
|
721 |
),
|
722 |
'requirements' => array(),
|
723 |
'gateway' => 'paypal',
|
724 |
),
|
725 |
+
'landing_page' => array(
|
726 |
'title' => __( 'Landing Page', 'woocommerce-paypal-payments' ),
|
727 |
'type' => 'select',
|
728 |
'class' => array(),
|
738 |
ApplicationContext::LANDING_PAGE_BILLING => __( 'Billing (Non-PayPal account)', 'woocommerce-paypal-payments' ),
|
739 |
),
|
740 |
'screens' => array(
|
741 |
+
State::STATE_START,
|
742 |
State::STATE_ONBOARDED,
|
743 |
),
|
744 |
'requirements' => array(),
|
745 |
'gateway' => 'paypal',
|
746 |
),
|
747 |
+
'disable_funding' => array(
|
748 |
+
'title' => __( 'Hide Funding Source(s)', 'woocommerce-paypal-payments' ),
|
749 |
'type' => 'ppcp-multiselect',
|
750 |
'class' => array(),
|
751 |
'input_class' => array( 'wc-enhanced-select' ),
|
752 |
'default' => array(),
|
753 |
+
'desc_tip' => false,
|
754 |
+
'description' => sprintf(
|
755 |
+
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
|
756 |
+
__( 'By default, all possible funding sources will be shown. This setting can disable funding sources such as Credit Cards, Pay Later, Venmo, or other %1$sAlternative Payment Methods%2$s.', 'woocommerce-paypal-payments' ),
|
757 |
+
'<a
|
758 |
+
href="https://developer.paypal.com/docs/checkout/apm/"
|
759 |
+
target="_blank"
|
760 |
+
>',
|
761 |
+
'</a>'
|
762 |
),
|
763 |
'options' => array(
|
764 |
'card' => _x( 'Credit or debit cards', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
776 |
'venmo' => _x( 'Venmo', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
777 |
),
|
778 |
'screens' => array(
|
779 |
+
State::STATE_START,
|
780 |
State::STATE_ONBOARDED,
|
781 |
),
|
782 |
'requirements' => array(),
|
783 |
'gateway' => 'paypal',
|
784 |
),
|
785 |
+
'vault_enabled' => array(
|
786 |
'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ),
|
787 |
'type' => 'checkbox',
|
788 |
'desc_tip' => true,
|
803 |
'requirements' => array(),
|
804 |
'gateway' => array( 'paypal', 'dcc' ),
|
805 |
),
|
806 |
+
'logging_enabled' => array(
|
807 |
'title' => __( 'Logging', 'woocommerce-paypal-payments' ),
|
808 |
'type' => 'checkbox',
|
809 |
'desc_tip' => true,
|
812 |
'description' => __( 'Enable logging of unexpected behavior. This can also log private data and should only be enabled in a development or stage environment.', 'woocommerce-paypal-payments' ),
|
813 |
'default' => false,
|
814 |
'screens' => array(
|
815 |
+
State::STATE_START,
|
816 |
State::STATE_ONBOARDED,
|
817 |
),
|
818 |
'requirements' => array(),
|
819 |
'gateway' => 'paypal',
|
820 |
),
|
821 |
+
'prefix' => array(
|
822 |
'title' => __( 'Invoice prefix', 'woocommerce-paypal-payments' ),
|
823 |
'type' => 'text',
|
824 |
'desc_tip' => true,
|
834 |
return substr( $letters, 0, 6 ) . '-';
|
835 |
} )(),
|
836 |
'screens' => array(
|
837 |
+
State::STATE_START,
|
838 |
State::STATE_ONBOARDED,
|
839 |
),
|
840 |
'requirements' => array(),
|
842 |
),
|
843 |
|
844 |
// General button styles.
|
845 |
+
'button_style_heading' => array(
|
846 |
'heading' => __( 'Checkout', 'woocommerce-paypal-payments' ),
|
847 |
'type' => 'ppcp-heading',
|
848 |
'screens' => array(
|
849 |
+
State::STATE_START,
|
850 |
State::STATE_ONBOARDED,
|
851 |
),
|
852 |
'requirements' => array(),
|
853 |
'gateway' => 'paypal',
|
854 |
'description' => __( 'Customize the appearance of PayPal Checkout on the checkout page.', 'woocommerce-paypal-payments' ),
|
855 |
),
|
856 |
+
'button_enabled' => array(
|
857 |
'title' => __( 'Enable buttons on Checkout', 'woocommerce-paypal-payments' ),
|
858 |
'type' => 'checkbox',
|
859 |
'label' => __( 'Enable on Checkout', 'woocommerce-paypal-payments' ),
|
860 |
'default' => true,
|
861 |
'screens' => array(
|
862 |
+
State::STATE_START,
|
863 |
State::STATE_ONBOARDED,
|
864 |
),
|
865 |
'requirements' => array(),
|
866 |
'gateway' => 'paypal',
|
867 |
),
|
868 |
+
'button_layout' => array(
|
869 |
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
870 |
'type' => 'select',
|
871 |
'class' => array(),
|
881 |
'horizontal' => __( 'Horizontal', 'woocommerce-paypal-payments' ),
|
882 |
),
|
883 |
'screens' => array(
|
884 |
+
State::STATE_START,
|
885 |
State::STATE_ONBOARDED,
|
886 |
),
|
887 |
'requirements' => array(),
|
888 |
'gateway' => 'paypal',
|
889 |
),
|
890 |
+
'button_tagline' => array(
|
891 |
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
892 |
'type' => 'checkbox',
|
893 |
'default' => true,
|
898 |
'woocommerce-paypal-payments'
|
899 |
),
|
900 |
'screens' => array(
|
901 |
+
State::STATE_START,
|
902 |
State::STATE_ONBOARDED,
|
903 |
),
|
904 |
'requirements' => array(),
|
905 |
'gateway' => 'paypal',
|
906 |
),
|
907 |
+
'button_label' => array(
|
908 |
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
909 |
'type' => 'select',
|
910 |
'class' => array(),
|
911 |
'input_class' => array( 'wc-enhanced-select' ),
|
912 |
+
/**
|
913 |
+
* Returns default label ID of the PayPal button.
|
914 |
+
*/
|
915 |
'default' => apply_filters( 'woocommerce_paypal_payments_button_label_default', 'paypal' ),
|
916 |
'desc_tip' => true,
|
917 |
'description' => __(
|
925 |
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
|
926 |
),
|
927 |
'screens' => array(
|
928 |
+
State::STATE_START,
|
929 |
State::STATE_ONBOARDED,
|
930 |
),
|
931 |
'requirements' => array(),
|
932 |
'gateway' => 'paypal',
|
933 |
),
|
934 |
+
'button_color' => array(
|
935 |
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
936 |
'type' => 'select',
|
937 |
'class' => array(),
|
949 |
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
950 |
),
|
951 |
'screens' => array(
|
952 |
+
State::STATE_START,
|
953 |
State::STATE_ONBOARDED,
|
954 |
),
|
955 |
'requirements' => array(),
|
956 |
'gateway' => 'paypal',
|
957 |
),
|
958 |
+
'button_shape' => array(
|
959 |
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
960 |
'type' => 'select',
|
961 |
'class' => array(),
|
971 |
'rect' => __( 'Rectangle', 'woocommerce-paypal-payments' ),
|
972 |
),
|
973 |
'screens' => array(
|
974 |
+
State::STATE_START,
|
975 |
State::STATE_ONBOARDED,
|
976 |
),
|
977 |
'requirements' => array(),
|
978 |
'gateway' => 'paypal',
|
979 |
),
|
980 |
+
'message_heading' => array(
|
981 |
'heading' => __( 'Pay Later on Checkout', 'woocommerce-paypal-payments' ),
|
982 |
'type' => 'ppcp-heading',
|
983 |
'screens' => array(
|
984 |
+
State::STATE_START,
|
985 |
State::STATE_ONBOARDED,
|
986 |
),
|
987 |
'requirements' => array( 'messages' ),
|
989 |
'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' ) ),
|
990 |
'class' => array( 'ppcp-subheading' ),
|
991 |
),
|
992 |
+
'message_enabled' => array(
|
993 |
'title' => __( 'Enable message on Checkout', 'woocommerce-paypal-payments' ),
|
994 |
'type' => 'checkbox',
|
995 |
'label' => __( 'Enable on Checkout', 'woocommerce-paypal-payments' ),
|
996 |
'default' => true,
|
997 |
'screens' => array(
|
998 |
+
State::STATE_START,
|
999 |
State::STATE_ONBOARDED,
|
1000 |
),
|
1001 |
'requirements' => array( 'messages' ),
|
1002 |
'gateway' => 'paypal',
|
1003 |
),
|
1004 |
+
'message_layout' => array(
|
1005 |
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
1006 |
'type' => 'select',
|
1007 |
'class' => array(),
|
1017 |
'flex' => __( 'Flex', 'woocommerce-paypal-payments' ),
|
1018 |
),
|
1019 |
'screens' => array(
|
1020 |
+
State::STATE_START,
|
1021 |
State::STATE_ONBOARDED,
|
1022 |
),
|
1023 |
'requirements' => array( 'messages' ),
|
1024 |
'gateway' => 'paypal',
|
1025 |
),
|
1026 |
+
'message_logo' => array(
|
1027 |
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
1028 |
'type' => 'select',
|
1029 |
'class' => array(),
|
1041 |
'none' => __( 'None', 'woocommerce-paypal-payments' ),
|
1042 |
),
|
1043 |
'screens' => array(
|
1044 |
+
State::STATE_START,
|
1045 |
State::STATE_ONBOARDED,
|
1046 |
),
|
1047 |
'requirements' => array( 'messages' ),
|
1048 |
'gateway' => 'paypal',
|
1049 |
),
|
1050 |
+
'message_position' => array(
|
1051 |
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
1052 |
'type' => 'select',
|
1053 |
'class' => array(),
|
1064 |
'top' => __( 'Top', 'woocommerce-paypal-payments' ),
|
1065 |
),
|
1066 |
'screens' => array(
|
1067 |
+
State::STATE_START,
|
1068 |
State::STATE_ONBOARDED,
|
1069 |
),
|
1070 |
'requirements' => array( 'messages' ),
|
1071 |
'gateway' => 'paypal',
|
1072 |
),
|
1073 |
+
'message_color' => array(
|
1074 |
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
1075 |
'type' => 'select',
|
1076 |
'class' => array(),
|
1088 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1089 |
),
|
1090 |
'screens' => array(
|
1091 |
+
State::STATE_START,
|
1092 |
State::STATE_ONBOARDED,
|
1093 |
),
|
1094 |
'requirements' => array( 'messages' ),
|
1095 |
'gateway' => 'paypal',
|
1096 |
),
|
1097 |
+
'message_flex_color' => array(
|
1098 |
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
1099 |
'type' => 'select',
|
1100 |
'class' => array(),
|
1115 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1116 |
),
|
1117 |
'screens' => array(
|
1118 |
+
State::STATE_START,
|
1119 |
State::STATE_ONBOARDED,
|
1120 |
),
|
1121 |
'requirements' => array( 'messages' ),
|
1122 |
'gateway' => 'paypal',
|
1123 |
),
|
1124 |
+
'message_flex_ratio' => array(
|
1125 |
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
1126 |
'type' => 'select',
|
1127 |
'class' => array(),
|
1139 |
'20x1' => __( '20x1', 'woocommerce-paypal-payments' ),
|
1140 |
),
|
1141 |
'screens' => array(
|
1142 |
+
State::STATE_START,
|
1143 |
State::STATE_ONBOARDED,
|
1144 |
),
|
1145 |
'requirements' => array( 'messages' ),
|
1147 |
),
|
1148 |
|
1149 |
// Single product page.
|
1150 |
+
'button_product_heading' => array(
|
1151 |
'heading' => __( 'Single Product Page', 'woocommerce-paypal-payments' ),
|
1152 |
'type' => 'ppcp-heading',
|
1153 |
'screens' => array(
|
1154 |
+
State::STATE_START,
|
1155 |
State::STATE_ONBOARDED,
|
1156 |
),
|
1157 |
'requirements' => array(),
|
1158 |
'gateway' => 'paypal',
|
1159 |
'description' => __( 'Customize the appearance of PayPal Checkout on the single product page.', 'woocommerce-paypal-payments' ),
|
1160 |
),
|
1161 |
+
'button_product_enabled' => array(
|
1162 |
'title' => __( 'Enable buttons on Single Product', 'woocommerce-paypal-payments' ),
|
1163 |
'type' => 'checkbox',
|
1164 |
'label' => __( 'Enable on Single Product', 'woocommerce-paypal-payments' ),
|
1165 |
'default' => true,
|
1166 |
'screens' => array(
|
1167 |
+
State::STATE_START,
|
1168 |
State::STATE_ONBOARDED,
|
1169 |
),
|
1170 |
'requirements' => array(),
|
1171 |
'gateway' => 'paypal',
|
1172 |
),
|
1173 |
+
'button_product_layout' => array(
|
1174 |
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
1175 |
'type' => 'select',
|
1176 |
'class' => array(),
|
1186 |
'horizontal' => __( 'Horizontal', 'woocommerce-paypal-payments' ),
|
1187 |
),
|
1188 |
'screens' => array(
|
1189 |
+
State::STATE_START,
|
1190 |
State::STATE_ONBOARDED,
|
1191 |
),
|
1192 |
'requirements' => array(),
|
1193 |
'gateway' => 'paypal',
|
1194 |
),
|
1195 |
+
'button_product_tagline' => array(
|
1196 |
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
1197 |
'type' => 'checkbox',
|
1198 |
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
1203 |
'woocommerce-paypal-payments'
|
1204 |
),
|
1205 |
'screens' => array(
|
1206 |
+
State::STATE_START,
|
1207 |
State::STATE_ONBOARDED,
|
1208 |
),
|
1209 |
'requirements' => array(),
|
1210 |
'gateway' => 'paypal',
|
1211 |
),
|
1212 |
+
'button_product_label' => array(
|
1213 |
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
1214 |
'type' => 'select',
|
1215 |
'class' => array(),
|
1216 |
'input_class' => array( 'wc-enhanced-select' ),
|
1217 |
+
/**
|
1218 |
+
* Returns default label ID of the PayPal button on product pages.
|
1219 |
+
*/
|
1220 |
'default' => apply_filters( 'woocommerce_paypal_payments_button_product_label_default', 'paypal' ),
|
1221 |
'desc_tip' => true,
|
1222 |
'description' => __(
|
1230 |
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
|
1231 |
),
|
1232 |
'screens' => array(
|
1233 |
+
State::STATE_START,
|
1234 |
State::STATE_ONBOARDED,
|
1235 |
),
|
1236 |
'requirements' => array(),
|
1237 |
'gateway' => 'paypal',
|
1238 |
),
|
1239 |
+
'button_product_color' => array(
|
1240 |
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
1241 |
'type' => 'select',
|
1242 |
'class' => array(),
|
1254 |
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
1255 |
),
|
1256 |
'screens' => array(
|
1257 |
+
State::STATE_START,
|
1258 |
State::STATE_ONBOARDED,
|
1259 |
),
|
1260 |
'requirements' => array(),
|
1261 |
'gateway' => 'paypal',
|
1262 |
),
|
1263 |
+
'button_product_shape' => array(
|
1264 |
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
1265 |
'type' => 'select',
|
1266 |
'class' => array(),
|
1276 |
'rect' => __( 'Rectangle', 'woocommerce-paypal-payments' ),
|
1277 |
),
|
1278 |
'screens' => array(
|
1279 |
+
State::STATE_START,
|
1280 |
State::STATE_ONBOARDED,
|
1281 |
),
|
1282 |
'requirements' => array(),
|
1283 |
'gateway' => 'paypal',
|
1284 |
),
|
1285 |
|
1286 |
+
'message_product_heading' => array(
|
1287 |
'heading' => __( 'Pay Later on Single Product Page', 'woocommerce-paypal-payments' ),
|
1288 |
'type' => 'ppcp-heading',
|
1289 |
'screens' => array(
|
1290 |
+
State::STATE_START,
|
1291 |
State::STATE_ONBOARDED,
|
1292 |
),
|
1293 |
'requirements' => array( 'messages' ),
|
1295 |
'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' ) ),
|
1296 |
'class' => array( 'ppcp-subheading' ),
|
1297 |
),
|
1298 |
+
'message_product_enabled' => array(
|
1299 |
'title' => __( 'Enable message on Single Product', 'woocommerce-paypal-payments' ),
|
1300 |
'type' => 'checkbox',
|
1301 |
'label' => __( 'Enable on Single Product', 'woocommerce-paypal-payments' ),
|
1302 |
'default' => true,
|
1303 |
'screens' => array(
|
1304 |
+
State::STATE_START,
|
1305 |
State::STATE_ONBOARDED,
|
1306 |
),
|
1307 |
'requirements' => array( 'messages' ),
|
1308 |
'gateway' => 'paypal',
|
1309 |
),
|
1310 |
+
'message_product_layout' => array(
|
1311 |
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
1312 |
'type' => 'select',
|
1313 |
'class' => array(),
|
1323 |
'flex' => __( 'Flex', 'woocommerce-paypal-payments' ),
|
1324 |
),
|
1325 |
'screens' => array(
|
1326 |
+
State::STATE_START,
|
1327 |
State::STATE_ONBOARDED,
|
1328 |
),
|
1329 |
'requirements' => array( 'messages' ),
|
1330 |
'gateway' => 'paypal',
|
1331 |
),
|
1332 |
+
'message_product_logo' => array(
|
1333 |
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
1334 |
'type' => 'select',
|
1335 |
'class' => array(),
|
1347 |
'none' => __( 'None', 'woocommerce-paypal-payments' ),
|
1348 |
),
|
1349 |
'screens' => array(
|
1350 |
+
State::STATE_START,
|
1351 |
State::STATE_ONBOARDED,
|
1352 |
),
|
1353 |
'requirements' => array( 'messages' ),
|
1354 |
'gateway' => 'paypal',
|
1355 |
),
|
1356 |
+
'message_product_position' => array(
|
1357 |
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
1358 |
'type' => 'select',
|
1359 |
'class' => array(),
|
1370 |
'top' => __( 'Top', 'woocommerce-paypal-payments' ),
|
1371 |
),
|
1372 |
'screens' => array(
|
1373 |
+
State::STATE_START,
|
1374 |
State::STATE_ONBOARDED,
|
1375 |
),
|
1376 |
'requirements' => array( 'messages' ),
|
1377 |
'gateway' => 'paypal',
|
1378 |
),
|
1379 |
+
'message_product_color' => array(
|
1380 |
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
1381 |
'type' => 'select',
|
1382 |
'class' => array(),
|
1394 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1395 |
),
|
1396 |
'screens' => array(
|
1397 |
+
State::STATE_START,
|
1398 |
State::STATE_ONBOARDED,
|
1399 |
),
|
1400 |
'requirements' => array( 'messages' ),
|
1401 |
'gateway' => 'paypal',
|
1402 |
),
|
1403 |
+
'message_product_flex_color' => array(
|
1404 |
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
1405 |
'type' => 'select',
|
1406 |
'class' => array(),
|
1421 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1422 |
),
|
1423 |
'screens' => array(
|
1424 |
+
State::STATE_START,
|
1425 |
State::STATE_ONBOARDED,
|
1426 |
),
|
1427 |
'requirements' => array( 'messages' ),
|
1428 |
'gateway' => 'paypal',
|
1429 |
),
|
1430 |
+
'message_product_flex_ratio' => array(
|
1431 |
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
1432 |
'type' => 'select',
|
1433 |
'class' => array(),
|
1445 |
'20x1' => __( '20x1', 'woocommerce-paypal-payments' ),
|
1446 |
),
|
1447 |
'screens' => array(
|
1448 |
+
State::STATE_START,
|
1449 |
State::STATE_ONBOARDED,
|
1450 |
),
|
1451 |
'requirements' => array( 'messages' ),
|
1453 |
),
|
1454 |
|
1455 |
// Cart settings.
|
1456 |
+
'button_cart_heading' => array(
|
1457 |
'heading' => __( 'Cart', 'woocommerce-paypal-payments' ),
|
1458 |
'type' => 'ppcp-heading',
|
1459 |
'screens' => array(
|
1460 |
+
State::STATE_START,
|
1461 |
State::STATE_ONBOARDED,
|
1462 |
),
|
1463 |
'requirements' => array(),
|
1464 |
'gateway' => 'paypal',
|
1465 |
'description' => __( 'Customize the appearance of PayPal Checkout on the cart page.', 'woocommerce-paypal-payments' ),
|
1466 |
),
|
1467 |
+
'button_cart_enabled' => array(
|
1468 |
'title' => __( 'Buttons on Cart', 'woocommerce-paypal-payments' ),
|
1469 |
'type' => 'checkbox',
|
1470 |
'label' => __( 'Enable on Cart', 'woocommerce-paypal-payments' ),
|
1471 |
'default' => true,
|
1472 |
'screens' => array(
|
1473 |
+
State::STATE_START,
|
1474 |
State::STATE_ONBOARDED,
|
1475 |
),
|
1476 |
'requirements' => array(),
|
1477 |
'gateway' => 'paypal',
|
1478 |
),
|
1479 |
+
'button_cart_layout' => array(
|
1480 |
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
1481 |
'type' => 'select',
|
1482 |
'class' => array(),
|
1492 |
'horizontal' => __( 'Horizontal', 'woocommerce-paypal-payments' ),
|
1493 |
),
|
1494 |
'screens' => array(
|
1495 |
+
State::STATE_START,
|
1496 |
State::STATE_ONBOARDED,
|
1497 |
),
|
1498 |
'requirements' => array(),
|
1499 |
'gateway' => 'paypal',
|
1500 |
),
|
1501 |
+
'button_cart_tagline' => array(
|
1502 |
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
1503 |
'type' => 'checkbox',
|
1504 |
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
1509 |
'woocommerce-paypal-payments'
|
1510 |
),
|
1511 |
'screens' => array(
|
1512 |
+
State::STATE_START,
|
1513 |
State::STATE_ONBOARDED,
|
1514 |
),
|
1515 |
'requirements' => array(),
|
1516 |
'gateway' => 'paypal',
|
1517 |
),
|
1518 |
+
'button_cart_label' => array(
|
1519 |
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
1520 |
'type' => 'select',
|
1521 |
'class' => array(),
|
1522 |
'input_class' => array( 'wc-enhanced-select' ),
|
1523 |
+
/**
|
1524 |
+
* Returns default label ID of the PayPal button in cart.
|
1525 |
+
*/
|
1526 |
'default' => apply_filters( 'woocommerce_paypal_payments_button_cart_label_default', 'paypal' ),
|
1527 |
'desc_tip' => true,
|
1528 |
'description' => __(
|
1536 |
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
|
1537 |
),
|
1538 |
'screens' => array(
|
1539 |
+
State::STATE_START,
|
1540 |
State::STATE_ONBOARDED,
|
1541 |
),
|
1542 |
'requirements' => array(),
|
1543 |
'gateway' => 'paypal',
|
1544 |
),
|
1545 |
+
'button_cart_color' => array(
|
1546 |
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
1547 |
'type' => 'select',
|
1548 |
'class' => array(),
|
1560 |
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
1561 |
),
|
1562 |
'screens' => array(
|
1563 |
+
State::STATE_START,
|
1564 |
State::STATE_ONBOARDED,
|
1565 |
),
|
1566 |
'requirements' => array(),
|
1567 |
'gateway' => 'paypal',
|
1568 |
),
|
1569 |
+
'button_cart_shape' => array(
|
1570 |
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
1571 |
'type' => 'select',
|
1572 |
'class' => array(),
|
1582 |
'rect' => __( 'Rectangle', 'woocommerce-paypal-payments' ),
|
1583 |
),
|
1584 |
'screens' => array(
|
1585 |
+
State::STATE_START,
|
1586 |
State::STATE_ONBOARDED,
|
1587 |
),
|
1588 |
'requirements' => array(),
|
1589 |
'gateway' => 'paypal',
|
1590 |
),
|
1591 |
|
1592 |
+
'message_cart_heading' => array(
|
1593 |
'heading' => __( 'Pay Later on Cart', 'woocommerce-paypal-payments' ),
|
1594 |
'type' => 'ppcp-heading',
|
1595 |
'screens' => array(
|
1596 |
+
State::STATE_START,
|
1597 |
State::STATE_ONBOARDED,
|
1598 |
),
|
1599 |
'requirements' => array( 'messages' ),
|
1601 |
'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' ) ),
|
1602 |
'class' => array( 'ppcp-subheading' ),
|
1603 |
),
|
1604 |
+
'message_cart_enabled' => array(
|
1605 |
'title' => __( 'Enable message on Cart', 'woocommerce-paypal-payments' ),
|
1606 |
'type' => 'checkbox',
|
1607 |
'label' => __( 'Enable on Cart', 'woocommerce-paypal-payments' ),
|
1608 |
'default' => true,
|
1609 |
'screens' => array(
|
1610 |
+
State::STATE_START,
|
1611 |
State::STATE_ONBOARDED,
|
1612 |
),
|
1613 |
'requirements' => array( 'messages' ),
|
1614 |
'gateway' => 'paypal',
|
1615 |
),
|
1616 |
+
'message_cart_layout' => array(
|
1617 |
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
1618 |
'type' => 'select',
|
1619 |
'class' => array(),
|
1629 |
'flex' => __( 'Flex', 'woocommerce-paypal-payments' ),
|
1630 |
),
|
1631 |
'screens' => array(
|
1632 |
+
State::STATE_START,
|
1633 |
State::STATE_ONBOARDED,
|
1634 |
),
|
1635 |
'requirements' => array( 'messages' ),
|
1636 |
'gateway' => 'paypal',
|
1637 |
),
|
1638 |
+
'message_cart_logo' => array(
|
1639 |
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
1640 |
'type' => 'select',
|
1641 |
'class' => array(),
|
1653 |
'none' => __( 'None', 'woocommerce-paypal-payments' ),
|
1654 |
),
|
1655 |
'screens' => array(
|
1656 |
+
State::STATE_START,
|
1657 |
State::STATE_ONBOARDED,
|
1658 |
),
|
1659 |
'requirements' => array( 'messages' ),
|
1660 |
'gateway' => 'paypal',
|
1661 |
),
|
1662 |
+
'message_cart_position' => array(
|
1663 |
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
1664 |
'type' => 'select',
|
1665 |
'class' => array(),
|
1676 |
'top' => __( 'Top', 'woocommerce-paypal-payments' ),
|
1677 |
),
|
1678 |
'screens' => array(
|
1679 |
+
State::STATE_START,
|
1680 |
State::STATE_ONBOARDED,
|
1681 |
),
|
1682 |
'requirements' => array( 'messages' ),
|
1683 |
'gateway' => 'paypal',
|
1684 |
),
|
1685 |
+
'message_cart_color' => array(
|
1686 |
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
1687 |
'type' => 'select',
|
1688 |
'class' => array(),
|
1700 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1701 |
),
|
1702 |
'screens' => array(
|
1703 |
+
State::STATE_START,
|
1704 |
State::STATE_ONBOARDED,
|
1705 |
),
|
1706 |
'requirements' => array( 'messages' ),
|
1707 |
'gateway' => 'paypal',
|
1708 |
),
|
1709 |
+
'message_cart_flex_color' => array(
|
1710 |
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
1711 |
'type' => 'select',
|
1712 |
'class' => array(),
|
1727 |
'grayscale' => __( 'Grayscale', 'woocommerce-paypal-payments' ),
|
1728 |
),
|
1729 |
'screens' => array(
|
1730 |
+
State::STATE_START,
|
1731 |
State::STATE_ONBOARDED,
|
1732 |
),
|
1733 |
'requirements' => array( 'messages' ),
|
1734 |
'gateway' => 'paypal',
|
1735 |
),
|
1736 |
+
'message_cart_flex_ratio' => array(
|
1737 |
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
1738 |
'type' => 'select',
|
1739 |
'class' => array(),
|
1751 |
'20x1' => __( '20x1', 'woocommerce-paypal-payments' ),
|
1752 |
),
|
1753 |
'screens' => array(
|
1754 |
+
State::STATE_START,
|
1755 |
State::STATE_ONBOARDED,
|
1756 |
),
|
1757 |
'requirements' => array( 'messages' ),
|
1759 |
),
|
1760 |
|
1761 |
// Mini cart settings.
|
1762 |
+
'button_mini-cart_heading' => array(
|
1763 |
'heading' => __( 'Mini Cart', 'woocommerce-paypal-payments' ),
|
1764 |
'type' => 'ppcp-heading',
|
1765 |
'screens' => array(
|
1766 |
+
State::STATE_START,
|
1767 |
State::STATE_ONBOARDED,
|
1768 |
),
|
1769 |
'requirements' => array(),
|
1770 |
'gateway' => 'paypal',
|
1771 |
'description' => __( 'Customize the appearance of PayPal Checkout on the Mini Cart.', 'woocommerce-paypal-payments' ),
|
1772 |
),
|
1773 |
+
'button_mini-cart_enabled' => array(
|
1774 |
'title' => __( 'Buttons on Mini Cart', 'woocommerce-paypal-payments' ),
|
1775 |
'type' => 'checkbox',
|
1776 |
'label' => __( 'Enable on Mini Cart', 'woocommerce-paypal-payments' ),
|
1777 |
'default' => true,
|
1778 |
'screens' => array(
|
1779 |
+
State::STATE_START,
|
1780 |
State::STATE_ONBOARDED,
|
1781 |
),
|
1782 |
'requirements' => array(),
|
1783 |
'gateway' => 'paypal',
|
1784 |
),
|
1785 |
+
'button_mini-cart_layout' => array(
|
1786 |
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
1787 |
'type' => 'select',
|
1788 |
'class' => array(),
|
1798 |
'horizontal' => __( 'Horizontal', 'woocommerce-paypal-payments' ),
|
1799 |
),
|
1800 |
'screens' => array(
|
1801 |
+
State::STATE_START,
|
1802 |
State::STATE_ONBOARDED,
|
1803 |
),
|
1804 |
'requirements' => array(),
|
1805 |
'gateway' => 'paypal',
|
1806 |
),
|
1807 |
+
'button_mini-cart_tagline' => array(
|
1808 |
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
1809 |
'type' => 'checkbox',
|
1810 |
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
1815 |
'woocommerce-paypal-payments'
|
1816 |
),
|
1817 |
'screens' => array(
|
1818 |
+
State::STATE_START,
|
1819 |
State::STATE_ONBOARDED,
|
1820 |
),
|
1821 |
'requirements' => array(),
|
1822 |
'gateway' => 'paypal',
|
1823 |
),
|
1824 |
+
'button_mini-cart_label' => array(
|
1825 |
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
1826 |
'type' => 'select',
|
1827 |
'class' => array(),
|
1828 |
'input_class' => array( 'wc-enhanced-select' ),
|
1829 |
+
/**
|
1830 |
+
* Returns default label ID of the PayPal button in mini cart.
|
1831 |
+
*/
|
1832 |
'default' => apply_filters( 'woocommerce_paypal_payments_button_mini_cart_label_default', 'paypal' ),
|
1833 |
'desc_tip' => true,
|
1834 |
'description' => __(
|
1842 |
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
|
1843 |
),
|
1844 |
'screens' => array(
|
1845 |
+
State::STATE_START,
|
1846 |
State::STATE_ONBOARDED,
|
1847 |
),
|
1848 |
'requirements' => array(),
|
1849 |
'gateway' => 'paypal',
|
1850 |
),
|
1851 |
+
'button_mini-cart_color' => array(
|
1852 |
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
1853 |
'type' => 'select',
|
1854 |
'class' => array(),
|
1866 |
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
1867 |
),
|
1868 |
'screens' => array(
|
1869 |
+
State::STATE_START,
|
1870 |
State::STATE_ONBOARDED,
|
1871 |
),
|
1872 |
'requirements' => array(),
|
1873 |
'gateway' => 'paypal',
|
1874 |
),
|
1875 |
+
'button_mini-cart_shape' => array(
|
1876 |
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
1877 |
'type' => 'select',
|
1878 |
'class' => array(),
|
1888 |
'rect' => __( 'Rectangle', 'woocommerce-paypal-payments' ),
|
1889 |
),
|
1890 |
'screens' => array(
|
1891 |
+
State::STATE_START,
|
1892 |
State::STATE_ONBOARDED,
|
1893 |
),
|
1894 |
'requirements' => array(),
|
1895 |
'gateway' => 'paypal',
|
1896 |
),
|
1897 |
+
'button_mini-cart_height' => array(
|
1898 |
'title' => __( 'Button Height', 'woocommerce-paypal-payments' ),
|
1899 |
'type' => 'number',
|
1900 |
'default' => '35',
|
1901 |
'desc_tip' => true,
|
1902 |
'description' => __( 'Add a value from 25 to 55.', 'woocommerce-paypal-payments' ),
|
1903 |
'screens' => array(
|
1904 |
+
State::STATE_START,
|
1905 |
State::STATE_ONBOARDED,
|
1906 |
),
|
1907 |
'requirements' => array(),
|
1908 |
'gateway' => 'paypal',
|
1909 |
),
|
1910 |
|
1911 |
+
'disable_cards' => array(
|
1912 |
'title' => __( 'Disable specific credit cards', 'woocommerce-paypal-payments' ),
|
1913 |
'type' => 'ppcp-multiselect',
|
1914 |
'class' => array(),
|
1936 |
),
|
1937 |
'gateway' => 'dcc',
|
1938 |
),
|
1939 |
+
'card_icons' => array(
|
1940 |
'title' => __( 'Show logo of the following credit cards', 'woocommerce-paypal-payments' ),
|
1941 |
'type' => 'ppcp-multiselect',
|
1942 |
'class' => array(),
|
1964 |
),
|
1965 |
'gateway' => 'dcc',
|
1966 |
),
|
1967 |
+
'3d_secure_heading' => array(
|
1968 |
'heading' => __( '3D Secure', 'woocommerce-paypal-payments' ),
|
1969 |
'type' => 'ppcp-heading',
|
1970 |
'description' => wp_kses_post(
|
1992 |
),
|
1993 |
'gateway' => 'dcc',
|
1994 |
),
|
1995 |
+
'3d_secure_contingency' => array(
|
1996 |
'title' => __( 'Contingency for 3D Secure', 'woocommerce-paypal-payments' ),
|
1997 |
'type' => 'select',
|
1998 |
'description' => sprintf(
|
2005 |
),
|
2006 |
'class' => array(),
|
2007 |
'input_class' => array( 'wc-enhanced-select' ),
|
2008 |
+
'default' => $container->get( 'api.shop.is-psd2-country' ) ? 'SCA_WHEN_REQUIRED' : 'NO_3D_SECURE',
|
2009 |
'desc_tip' => true,
|
2010 |
'options' => array(
|
2011 |
'NO_3D_SECURE' => __( 'No 3D Secure (transaction will be denied if 3D Secure is required)', 'woocommerce-paypal-payments' ),
|
2012 |
'SCA_WHEN_REQUIRED' => __( '3D Secure when required', 'woocommerce-paypal-payments' ),
|
2013 |
+
'SCA_ALWAYS' => __( 'Always trigger 3D Secure', 'woocommerce-paypal-payments' ),
|
2014 |
),
|
2015 |
'screens' => array(
|
2016 |
State::STATE_ONBOARDED,
|
2025 |
unset( $fields['vault_enabled'] );
|
2026 |
}
|
2027 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2028 |
/**
|
2029 |
* Depending on your store location, some credit cards can't be used.
|
2030 |
* Here, we filter them out.
|
|
|
|
|
|
|
|
|
2031 |
*/
|
|
|
2032 |
$card_options = $fields['disable_cards']['options'];
|
2033 |
foreach ( $card_options as $card => $label ) {
|
2034 |
if ( $dcc_applies->can_process_card( $card ) ) {
|
modules/ppcp-wc-gateway/src/Admin/FeesRenderer.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Renders the PayPal fees in the order details.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\WcGateway\Admin
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare( strict_types=1 );
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\WcGateway\Admin;
|
11 |
+
|
12 |
+
use WC_Order;
|
13 |
+
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Class FeesRenderer
|
17 |
+
*/
|
18 |
+
class FeesRenderer {
|
19 |
+
/**
|
20 |
+
* Renders the PayPal fees in the order details.
|
21 |
+
*
|
22 |
+
* @param WC_Order $wc_order The order for which to render the fees.
|
23 |
+
*
|
24 |
+
* @return string
|
25 |
+
*/
|
26 |
+
public function render( WC_Order $wc_order ) : string {
|
27 |
+
$breakdown = $wc_order->get_meta( PayPalGateway::FEES_META_KEY );
|
28 |
+
if ( ! is_array( $breakdown ) ) {
|
29 |
+
return '';
|
30 |
+
}
|
31 |
+
|
32 |
+
$html = '';
|
33 |
+
|
34 |
+
$fee = $breakdown['paypal_fee'] ?? null;
|
35 |
+
if ( is_array( $fee ) ) {
|
36 |
+
$html .= $this->render_money_row(
|
37 |
+
__( 'PayPal Fee:', 'woocommerce-paypal-payments' ),
|
38 |
+
__( 'The fee PayPal collects for the transaction.', 'woocommerce-paypal-payments' ),
|
39 |
+
$fee['value'],
|
40 |
+
$fee['currency_code'],
|
41 |
+
true
|
42 |
+
);
|
43 |
+
}
|
44 |
+
|
45 |
+
$net = $breakdown['net_amount'] ?? null;
|
46 |
+
if ( is_array( $net ) ) {
|
47 |
+
$html .= $this->render_money_row(
|
48 |
+
__( 'PayPal Payout:', 'woocommerce-paypal-payments' ),
|
49 |
+
__( 'The net total that will be credited to your PayPal account.', 'woocommerce-paypal-payments' ),
|
50 |
+
$net['value'],
|
51 |
+
$net['currency_code']
|
52 |
+
);
|
53 |
+
}
|
54 |
+
|
55 |
+
return $html;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Renders a row in the order price breakdown table.
|
60 |
+
*
|
61 |
+
* @param string $title The row title.
|
62 |
+
* @param string $tooltip The title tooltip.
|
63 |
+
* @param string|float $value The money value.
|
64 |
+
* @param string $currency The currency code.
|
65 |
+
* @param bool $negative Whether to add the minus sign.
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
private function render_money_row( string $title, string $tooltip, $value, string $currency, bool $negative = false ): string {
|
69 |
+
/**
|
70 |
+
* Bad type hint in WC phpdoc.
|
71 |
+
*
|
72 |
+
* @psalm-suppress InvalidScalarArgument
|
73 |
+
*/
|
74 |
+
return '
|
75 |
+
<tr>
|
76 |
+
<td class="label">' . wc_help_tip( $tooltip ) . ' ' . esc_html( $title ) . '
|
77 |
+
</td>
|
78 |
+
<td width="1%"></td>
|
79 |
+
<td class="total">
|
80 |
+
' .
|
81 |
+
( $negative ? ' - ' : '' ) .
|
82 |
+
wc_price( $value, array( 'currency' => $currency ) ) . '
|
83 |
+
</td>
|
84 |
+
</tr>';
|
85 |
+
}
|
86 |
+
}
|
modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php
CHANGED
@@ -25,11 +25,11 @@ class SettingsPageAssets {
|
|
25 |
private $module_url;
|
26 |
|
27 |
/**
|
28 |
-
* The
|
29 |
*
|
30 |
* @var string
|
31 |
*/
|
32 |
-
private $
|
33 |
|
34 |
/**
|
35 |
* The bearer.
|
@@ -42,13 +42,13 @@ class SettingsPageAssets {
|
|
42 |
* Assets constructor.
|
43 |
*
|
44 |
* @param string $module_url The url of this module.
|
45 |
-
* @param string $
|
46 |
* @param Bearer $bearer The bearer.
|
47 |
*/
|
48 |
-
public function __construct( string $module_url, string $
|
49 |
-
$this->module_url
|
50 |
-
$this->
|
51 |
-
$this->bearer
|
52 |
}
|
53 |
|
54 |
/**
|
@@ -102,13 +102,11 @@ class SettingsPageAssets {
|
|
102 |
* @param Bearer $bearer The bearer.
|
103 |
*/
|
104 |
private function register_admin_assets( Bearer $bearer ) {
|
105 |
-
$gateway_settings_script_path = trailingslashit( $this->module_path ) . 'assets/js/gateway-settings.js';
|
106 |
-
|
107 |
wp_enqueue_script(
|
108 |
'ppcp-gateway-settings',
|
109 |
trailingslashit( $this->module_url ) . 'assets/js/gateway-settings.js',
|
110 |
array(),
|
111 |
-
|
112 |
true
|
113 |
);
|
114 |
|
25 |
private $module_url;
|
26 |
|
27 |
/**
|
28 |
+
* The assets version.
|
29 |
*
|
30 |
* @var string
|
31 |
*/
|
32 |
+
private $version;
|
33 |
|
34 |
/**
|
35 |
* The bearer.
|
42 |
* Assets constructor.
|
43 |
*
|
44 |
* @param string $module_url The url of this module.
|
45 |
+
* @param string $version The assets version.
|
46 |
* @param Bearer $bearer The bearer.
|
47 |
*/
|
48 |
+
public function __construct( string $module_url, string $version, Bearer $bearer ) {
|
49 |
+
$this->module_url = $module_url;
|
50 |
+
$this->version = $version;
|
51 |
+
$this->bearer = $bearer;
|
52 |
}
|
53 |
|
54 |
/**
|
102 |
* @param Bearer $bearer The bearer.
|
103 |
*/
|
104 |
private function register_admin_assets( Bearer $bearer ) {
|
|
|
|
|
105 |
wp_enqueue_script(
|
106 |
'ppcp-gateway-settings',
|
107 |
trailingslashit( $this->module_url ) . 'assets/js/gateway-settings.js',
|
108 |
array(),
|
109 |
+
$this->version,
|
110 |
true
|
111 |
);
|
112 |
|
modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php
CHANGED
@@ -37,6 +37,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|
37 |
const INTENT_META_KEY = '_ppcp_paypal_intent';
|
38 |
const ORDER_ID_META_KEY = '_ppcp_paypal_order_id';
|
39 |
const ORDER_PAYMENT_MODE_META_KEY = '_ppcp_paypal_payment_mode';
|
|
|
40 |
|
41 |
/**
|
42 |
* The Settings Renderer.
|
37 |
const INTENT_META_KEY = '_ppcp_paypal_intent';
|
38 |
const ORDER_ID_META_KEY = '_ppcp_paypal_order_id';
|
39 |
const ORDER_PAYMENT_MODE_META_KEY = '_ppcp_paypal_payment_mode';
|
40 |
+
const FEES_META_KEY = '_ppcp_paypal_fees';
|
41 |
|
42 |
/**
|
43 |
* The Settings Renderer.
|
modules/ppcp-wc-gateway/src/Gateway/ProcessPaymentTrait.php
CHANGED
@@ -277,7 +277,7 @@ trait ProcessPaymentTrait {
|
|
277 |
if ( $error->has_detail( 'INSTRUMENT_DECLINED' ) ) {
|
278 |
$wc_order->update_status(
|
279 |
'failed',
|
280 |
-
__( 'Instrument declined.', 'woocommerce-paypal-payments' )
|
281 |
);
|
282 |
|
283 |
$this->session_handler->increment_insufficient_funding_tries();
|
@@ -298,6 +298,19 @@ trait ProcessPaymentTrait {
|
|
298 |
);
|
299 |
}
|
300 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
$this->session_handler->destroy_session_data();
|
302 |
} catch ( RuntimeException $error ) {
|
303 |
$this->handle_failure( $wc_order, $error );
|
@@ -308,9 +321,10 @@ trait ProcessPaymentTrait {
|
|
308 |
$this->order_processor->last_error(),
|
309 |
'error'
|
310 |
);
|
|
|
311 |
$wc_order->update_status(
|
312 |
'failed',
|
313 |
-
__( 'Could not process order.', 'woocommerce-paypal-payments' )
|
314 |
);
|
315 |
|
316 |
return $failure_data;
|
@@ -355,7 +369,7 @@ trait ProcessPaymentTrait {
|
|
355 |
|
356 |
$wc_order->update_status(
|
357 |
'failed',
|
358 |
-
__( 'Could not process order.', 'woocommerce-paypal-payments' )
|
359 |
);
|
360 |
|
361 |
$this->session_handler->destroy_session_data();
|
277 |
if ( $error->has_detail( 'INSTRUMENT_DECLINED' ) ) {
|
278 |
$wc_order->update_status(
|
279 |
'failed',
|
280 |
+
__( 'Instrument declined. ', 'woocommerce-paypal-payments' ) . $error->details()[0]->description ?? ''
|
281 |
);
|
282 |
|
283 |
$this->session_handler->increment_insufficient_funding_tries();
|
298 |
);
|
299 |
}
|
300 |
|
301 |
+
$error_message = $error->getMessage();
|
302 |
+
if ( $error->issues() ) {
|
303 |
+
$error_message = implode(
|
304 |
+
array_map(
|
305 |
+
function( $issue ) {
|
306 |
+
return $issue->issue . ' ' . $issue->description . '<br/>';
|
307 |
+
},
|
308 |
+
$error->issues()
|
309 |
+
)
|
310 |
+
);
|
311 |
+
}
|
312 |
+
wc_add_notice( $error_message, 'error' );
|
313 |
+
|
314 |
$this->session_handler->destroy_session_data();
|
315 |
} catch ( RuntimeException $error ) {
|
316 |
$this->handle_failure( $wc_order, $error );
|
321 |
$this->order_processor->last_error(),
|
322 |
'error'
|
323 |
);
|
324 |
+
|
325 |
$wc_order->update_status(
|
326 |
'failed',
|
327 |
+
__( 'Could not process order. ', 'woocommerce-paypal-payments' ) . $this->order_processor->last_error()
|
328 |
);
|
329 |
|
330 |
return $failure_data;
|
369 |
|
370 |
$wc_order->update_status(
|
371 |
'failed',
|
372 |
+
__( 'Could not process order. ', 'woocommerce-paypal-payments' ) . $error->getMessage()
|
373 |
);
|
374 |
|
375 |
$this->session_handler->destroy_session_data();
|
modules/ppcp-wc-gateway/src/Notice/ConnectAdminNotice.php
CHANGED
@@ -57,7 +57,7 @@ class ConnectAdminNotice {
|
|
57 |
$message = sprintf(
|
58 |
/* translators: %1$s the gateway name. */
|
59 |
__(
|
60 |
-
'PayPal
|
61 |
'woocommerce-paypal-payments'
|
62 |
),
|
63 |
admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' )
|
@@ -71,6 +71,6 @@ class ConnectAdminNotice {
|
|
71 |
* @return bool
|
72 |
*/
|
73 |
protected function should_display(): bool {
|
74 |
-
return $this->state->current_state()
|
75 |
}
|
76 |
}
|
57 |
$message = sprintf(
|
58 |
/* translators: %1$s the gateway name. */
|
59 |
__(
|
60 |
+
'PayPal Payments is almost ready. To get started, <a href="%1$s">connect your account</a>.',
|
61 |
'woocommerce-paypal-payments'
|
62 |
),
|
63 |
admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' )
|
71 |
* @return bool
|
72 |
*/
|
73 |
protected function should_display(): bool {
|
74 |
+
return $this->state->current_state() !== State::STATE_ONBOARDED;
|
75 |
}
|
76 |
}
|
modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php
CHANGED
@@ -11,12 +11,14 @@ namespace WooCommerce\PayPalCommerce\WcGateway\Processor;
|
|
11 |
|
12 |
use Exception;
|
13 |
use Psr\Log\LoggerInterface;
|
|
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
|
15 |
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PaymentsEndpoint;
|
16 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Authorization;
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\AuthorizationStatus;
|
18 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Capture;
|
19 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\CaptureStatus;
|
|
|
20 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Order;
|
21 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
22 |
use WooCommerce\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice;
|
@@ -96,11 +98,11 @@ class AuthorizedPaymentsProcessor {
|
|
96 |
/**
|
97 |
* Process a WooCommerce order.
|
98 |
*
|
99 |
-
* @param
|
100 |
*
|
101 |
* @return string One of the AuthorizedPaymentsProcessor status constants.
|
102 |
*/
|
103 |
-
public function process(
|
104 |
$this->captures = array();
|
105 |
|
106 |
try {
|
@@ -123,7 +125,7 @@ class AuthorizedPaymentsProcessor {
|
|
123 |
}
|
124 |
|
125 |
try {
|
126 |
-
$this->
|
127 |
} catch ( Exception $exception ) {
|
128 |
$this->logger->error( 'Failed to capture authorization: ' . $exception->getMessage() );
|
129 |
return self::FAILED;
|
@@ -144,11 +146,11 @@ class AuthorizedPaymentsProcessor {
|
|
144 |
/**
|
145 |
* Captures an authorized payment for an WooCommerce order.
|
146 |
*
|
147 |
-
* @param
|
148 |
*
|
149 |
* @return bool
|
150 |
*/
|
151 |
-
public function capture_authorized_payment(
|
152 |
$result_status = $this->process( $wc_order );
|
153 |
$this->render_authorization_message_for_status( $result_status );
|
154 |
|
@@ -211,11 +213,11 @@ class AuthorizedPaymentsProcessor {
|
|
211 |
/**
|
212 |
* Returns the PayPal order from a given WooCommerce order.
|
213 |
*
|
214 |
-
* @param
|
215 |
*
|
216 |
* @return Order
|
217 |
*/
|
218 |
-
private function paypal_order_from_wc_order(
|
219 |
$order_id = $wc_order->get_meta( PayPalGateway::ORDER_ID_META_KEY );
|
220 |
return $this->order_endpoint->order( $order_id );
|
221 |
}
|
@@ -239,15 +241,21 @@ class AuthorizedPaymentsProcessor {
|
|
239 |
}
|
240 |
|
241 |
/**
|
242 |
-
* Captures the
|
243 |
*
|
|
|
244 |
* @param Authorization ...$authorizations All authorizations.
|
|
|
245 |
*/
|
246 |
-
private function
|
247 |
$uncaptured_authorizations = $this->authorizations_to_capture( ...$authorizations );
|
248 |
-
|
249 |
-
|
250 |
}
|
|
|
|
|
|
|
|
|
251 |
}
|
252 |
|
253 |
/**
|
11 |
|
12 |
use Exception;
|
13 |
use Psr\Log\LoggerInterface;
|
14 |
+
use WC_Order;
|
15 |
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
|
16 |
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PaymentsEndpoint;
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Authorization;
|
18 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\AuthorizationStatus;
|
19 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Capture;
|
20 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\CaptureStatus;
|
21 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\Money;
|
22 |
use WooCommerce\PayPalCommerce\ApiClient\Entity\Order;
|
23 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
24 |
use WooCommerce\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice;
|
98 |
/**
|
99 |
* Process a WooCommerce order.
|
100 |
*
|
101 |
+
* @param WC_Order $wc_order The WooCommerce order.
|
102 |
*
|
103 |
* @return string One of the AuthorizedPaymentsProcessor status constants.
|
104 |
*/
|
105 |
+
public function process( WC_Order $wc_order ): string {
|
106 |
$this->captures = array();
|
107 |
|
108 |
try {
|
125 |
}
|
126 |
|
127 |
try {
|
128 |
+
$this->captures[] = $this->capture_authorization( $wc_order, ...$authorizations );
|
129 |
} catch ( Exception $exception ) {
|
130 |
$this->logger->error( 'Failed to capture authorization: ' . $exception->getMessage() );
|
131 |
return self::FAILED;
|
146 |
/**
|
147 |
* Captures an authorized payment for an WooCommerce order.
|
148 |
*
|
149 |
+
* @param WC_Order $wc_order The WooCommerce order.
|
150 |
*
|
151 |
* @return bool
|
152 |
*/
|
153 |
+
public function capture_authorized_payment( WC_Order $wc_order ): bool {
|
154 |
$result_status = $this->process( $wc_order );
|
155 |
$this->render_authorization_message_for_status( $result_status );
|
156 |
|
213 |
/**
|
214 |
* Returns the PayPal order from a given WooCommerce order.
|
215 |
*
|
216 |
+
* @param WC_Order $wc_order The WooCommerce order.
|
217 |
*
|
218 |
* @return Order
|
219 |
*/
|
220 |
+
private function paypal_order_from_wc_order( WC_Order $wc_order ): Order {
|
221 |
$order_id = $wc_order->get_meta( PayPalGateway::ORDER_ID_META_KEY );
|
222 |
return $this->order_endpoint->order( $order_id );
|
223 |
}
|
241 |
}
|
242 |
|
243 |
/**
|
244 |
+
* Captures the authorization.
|
245 |
*
|
246 |
+
* @param WC_Order $order The order.
|
247 |
* @param Authorization ...$authorizations All authorizations.
|
248 |
+
* @throws Exception If capture failed.
|
249 |
*/
|
250 |
+
private function capture_authorization( WC_Order $order, Authorization ...$authorizations ): Capture {
|
251 |
$uncaptured_authorizations = $this->authorizations_to_capture( ...$authorizations );
|
252 |
+
if ( ! $uncaptured_authorizations ) {
|
253 |
+
throw new Exception( 'No authorizations to capture.' );
|
254 |
}
|
255 |
+
|
256 |
+
$authorization = end( $uncaptured_authorizations );
|
257 |
+
|
258 |
+
return $this->payments_endpoint->capture( $authorization->id(), new Money( (float) $order->get_total(), $order->get_currency() ) );
|
259 |
}
|
260 |
|
261 |
/**
|
modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php
CHANGED
@@ -141,6 +141,7 @@ class OrderProcessor {
|
|
141 |
public function process( \WC_Order $wc_order ): bool {
|
142 |
$order = $this->session_handler->order();
|
143 |
if ( ! $order ) {
|
|
|
144 |
return false;
|
145 |
}
|
146 |
|
141 |
public function process( \WC_Order $wc_order ): bool {
|
142 |
$order = $this->session_handler->order();
|
143 |
if ( ! $order ) {
|
144 |
+
$this->last_error = __( 'No PayPal order found in the current WooCommerce session.', 'woocommerce-paypal-payments' );
|
145 |
return false;
|
146 |
}
|
147 |
|
modules/ppcp-wc-gateway/src/Processor/PaymentsStatusHandlingTrait.php
CHANGED
@@ -63,6 +63,10 @@ trait PaymentsStatusHandlingTrait {
|
|
63 |
switch ( $status->name() ) {
|
64 |
case CaptureStatus::COMPLETED:
|
65 |
$wc_order->payment_complete();
|
|
|
|
|
|
|
|
|
66 |
break;
|
67 |
// It is checked in the capture endpoint already, but there are other ways to capture,
|
68 |
// such as when paid via saved card.
|
63 |
switch ( $status->name() ) {
|
64 |
case CaptureStatus::COMPLETED:
|
65 |
$wc_order->payment_complete();
|
66 |
+
/**
|
67 |
+
* Fired when PayPal order is captured.
|
68 |
+
*/
|
69 |
+
do_action( 'woocommerce_paypal_payments_order_captured', $wc_order, $capture );
|
70 |
break;
|
71 |
// It is checked in the capture endpoint already, but there are other ways to capture,
|
72 |
// such as when paid via saved card.
|
modules/ppcp-wc-gateway/src/Processor/TransactionIdHandlingTrait.php
CHANGED
@@ -36,6 +36,15 @@ trait TransactionIdHandlingTrait {
|
|
36 |
try {
|
37 |
$wc_order->set_transaction_id( $transaction_id );
|
38 |
$wc_order->save();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
return true;
|
40 |
} catch ( Exception $exception ) {
|
41 |
if ( $logger ) {
|
36 |
try {
|
37 |
$wc_order->set_transaction_id( $transaction_id );
|
38 |
$wc_order->save();
|
39 |
+
|
40 |
+
$wc_order->add_order_note(
|
41 |
+
sprintf(
|
42 |
+
/* translators: %s is the PayPal transaction ID */
|
43 |
+
__( 'PayPal transaction ID: %s', 'woocommerce-paypal-payments' ),
|
44 |
+
$transaction_id
|
45 |
+
)
|
46 |
+
);
|
47 |
+
|
48 |
return true;
|
49 |
} catch ( Exception $exception ) {
|
50 |
if ( $logger ) {
|
modules/ppcp-wc-gateway/src/Settings/SettingsListener.php
CHANGED
@@ -14,9 +14,9 @@ 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;
|
18 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
19 |
use WooCommerce\PayPalCommerce\Webhooks\WebhookRegistrar;
|
|
|
20 |
|
21 |
/**
|
22 |
* Class SettingsListener
|
@@ -146,8 +146,14 @@ class SettingsListener {
|
|
146 |
}
|
147 |
$this->settings->persist();
|
148 |
|
|
|
|
|
|
|
149 |
do_action( 'woocommerce_paypal_payments_onboarding_before_redirect' );
|
150 |
|
|
|
|
|
|
|
151 |
$redirect_url = apply_filters( 'woocommerce_paypal_payments_onboarding_redirect_url', admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' ) );
|
152 |
if ( ! $this->settings->has( 'client_id' ) || ! $this->settings->get( 'client_id' ) ) {
|
153 |
$redirect_url = add_query_arg( 'ppcp-onboarding-error', '1', $redirect_url );
|
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\PayPalGateway;
|
18 |
use WooCommerce\PayPalCommerce\Webhooks\WebhookRegistrar;
|
19 |
+
use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException;
|
20 |
|
21 |
/**
|
22 |
* Class SettingsListener
|
146 |
}
|
147 |
$this->settings->persist();
|
148 |
|
149 |
+
/**
|
150 |
+
* The hook fired before performing the redirect at the end of onboarding after saving the merchant ID/email.
|
151 |
+
*/
|
152 |
do_action( 'woocommerce_paypal_payments_onboarding_before_redirect' );
|
153 |
|
154 |
+
/**
|
155 |
+
* The URL opened at the end of onboarding after saving the merchant ID/email.
|
156 |
+
*/
|
157 |
$redirect_url = apply_filters( 'woocommerce_paypal_payments_onboarding_redirect_url', admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' ) );
|
158 |
if ( ! $this->settings->has( 'client_id' ) || ! $this->settings->get( 'client_id' ) ) {
|
159 |
$redirect_url = add_query_arg( 'ppcp-onboarding-error', '1', $redirect_url );
|
modules/ppcp-wc-gateway/src/Settings/SettingsRenderer.php
CHANGED
@@ -377,8 +377,18 @@ $data_rows_html
|
|
377 |
?>
|
378 |
<input type="hidden" name="ppcp-nonce" value="<?php echo esc_attr( $nonce ); ?>">
|
379 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
foreach ( $this->fields as $field => $config ) :
|
381 |
-
if ( ! in_array( $this->state->
|
382 |
continue;
|
383 |
}
|
384 |
if ( ! $this->field_matches_page( $config, $this->page_id ) ) {
|
@@ -406,14 +416,18 @@ $data_rows_html
|
|
406 |
$key = 'ppcp[' . $field . ']';
|
407 |
$id = 'ppcp-' . $field;
|
408 |
$config['id'] = $id;
|
409 |
-
$colspan = 'ppcp-heading' !== $config['type'] ? 1 : 2;
|
410 |
$classes = isset( $config['classes'] ) ? $config['classes'] : array();
|
|
|
411 |
$classes[] = sprintf( 'ppcp-settings-field-%s', str_replace( 'ppcp-', '', $config['type'] ) );
|
412 |
-
|
|
|
|
|
|
|
413 |
unset( $config['description'] );
|
414 |
?>
|
415 |
<tr valign="top" id="<?php echo esc_attr( 'field-' . $field ); ?>" class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
416 |
-
<?php if ( 'ppcp-heading' !== $config['type'] ) : ?>
|
417 |
<th scope="row">
|
418 |
<label
|
419 |
for="<?php echo esc_attr( $id ); ?>"
|
@@ -462,7 +476,14 @@ $data_rows_html
|
|
462 |
* @param array $config The configuration array.
|
463 |
*/
|
464 |
private function render_text( array $config ) {
|
465 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
if ( isset( $config['hidden'] ) ) {
|
467 |
$value = $this->settings->has( $config['hidden'] ) ?
|
468 |
(string) $this->settings->get( $config['hidden'] )
|
377 |
?>
|
378 |
<input type="hidden" name="ppcp-nonce" value="<?php echo esc_attr( $nonce ); ?>">
|
379 |
<?php
|
380 |
+
|
381 |
+
// Create a hidden first row with 2 cells to avoid issues with table-layout: fixed
|
382 |
+
// when the first visible row needs to have one cell.
|
383 |
+
?>
|
384 |
+
<tr style="height: 1px; padding-top: 0; padding-bottom: 0;">
|
385 |
+
<th style="padding-top: 0; padding-bottom: 0;"></th>
|
386 |
+
<td style="padding-top: 0; padding-bottom: 0;"></td>
|
387 |
+
</tr>
|
388 |
+
<?php
|
389 |
+
|
390 |
foreach ( $this->fields as $field => $config ) :
|
391 |
+
if ( ! in_array( $this->state->environment_state( $config['state_from'] ?? null ), $config['screens'], true ) ) {
|
392 |
continue;
|
393 |
}
|
394 |
if ( ! $this->field_matches_page( $config, $this->page_id ) ) {
|
416 |
$key = 'ppcp[' . $field . ']';
|
417 |
$id = 'ppcp-' . $field;
|
418 |
$config['id'] = $id;
|
419 |
+
$colspan = ( 'ppcp-heading' !== $config['type'] && isset( $config['title'] ) ) ? 1 : 2;
|
420 |
$classes = isset( $config['classes'] ) ? $config['classes'] : array();
|
421 |
+
$classes[] = 'ppcp-settings-field';
|
422 |
$classes[] = sprintf( 'ppcp-settings-field-%s', str_replace( 'ppcp-', '', $config['type'] ) );
|
423 |
+
if ( 1 !== $colspan ) {
|
424 |
+
$classes[] = 'ppcp-settings-no-title-col';
|
425 |
+
}
|
426 |
+
$description = isset( $config['description'] ) ? $config['description'] : '';
|
427 |
unset( $config['description'] );
|
428 |
?>
|
429 |
<tr valign="top" id="<?php echo esc_attr( 'field-' . $field ); ?>" class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
430 |
+
<?php if ( 'ppcp-heading' !== $config['type'] && isset( $config['title'] ) ) : ?>
|
431 |
<th scope="row">
|
432 |
<label
|
433 |
for="<?php echo esc_attr( $id ); ?>"
|
476 |
* @param array $config The configuration array.
|
477 |
*/
|
478 |
private function render_text( array $config ) {
|
479 |
+
$raw = $config['raw'] ?? false;
|
480 |
+
if ( $raw ) {
|
481 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
482 |
+
echo $config['text'];
|
483 |
+
} else {
|
484 |
+
echo wp_kses_post( $config['text'] );
|
485 |
+
}
|
486 |
+
|
487 |
if ( isset( $config['hidden'] ) ) {
|
488 |
$value = $this->settings->has( $config['hidden'] ) ?
|
489 |
(string) $this->settings->get( $config['hidden'] )
|
modules/ppcp-wc-gateway/src/WCGatewayModule.php
CHANGED
@@ -11,9 +11,12 @@ namespace WooCommerce\PayPalCommerce\WcGateway;
|
|
11 |
|
12 |
use Dhii\Container\ServiceProvider;
|
13 |
use Dhii\Modular\Module\ModuleInterface;
|
|
|
14 |
use WooCommerce\PayPalCommerce\AdminNotices\Repository\Repository;
|
|
|
15 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
16 |
use WooCommerce\PayPalCommerce\ApiClient\Repository\PayPalRequestIdRepository;
|
|
|
17 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
|
18 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail;
|
19 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\RenderAuthorizeAction;
|
@@ -21,6 +24,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Assets\SettingsPageAssets;
|
|
21 |
use WooCommerce\PayPalCommerce\WcGateway\Checkout\CheckoutPayPalAddressPreset;
|
22 |
use WooCommerce\PayPalCommerce\WcGateway\Checkout\DisableGateways;
|
23 |
use WooCommerce\PayPalCommerce\WcGateway\Endpoint\ReturnUrlEndpoint;
|
|
|
24 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
25 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
26 |
use WooCommerce\PayPalCommerce\WcGateway\Notice\ConnectAdminNotice;
|
@@ -70,10 +74,39 @@ class WCGatewayModule implements ModuleInterface {
|
|
70 |
}
|
71 |
);
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
if ( $c->has( 'wcgateway.url' ) ) {
|
74 |
$assets = new SettingsPageAssets(
|
75 |
$c->get( 'wcgateway.url' ),
|
76 |
-
$c->get( '
|
77 |
$c->get( 'api.bearer' )
|
78 |
);
|
79 |
$assets->register_assets();
|
@@ -132,6 +165,23 @@ class WCGatewayModule implements ModuleInterface {
|
|
132 |
$endpoint->handle_request();
|
133 |
}
|
134 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
|
137 |
/**
|
@@ -231,7 +281,7 @@ class WCGatewayModule implements ModuleInterface {
|
|
231 |
static function ( $order_actions ) use ( $container ): array {
|
232 |
global $theorder;
|
233 |
|
234 |
-
if ( ! is_a( $theorder,
|
235 |
return $order_actions;
|
236 |
}
|
237 |
|
@@ -247,7 +297,7 @@ class WCGatewayModule implements ModuleInterface {
|
|
247 |
|
248 |
add_action(
|
249 |
'woocommerce_order_action_ppcp_authorize_order',
|
250 |
-
static function (
|
251 |
|
252 |
/**
|
253 |
* The authorized payments processor.
|
11 |
|
12 |
use Dhii\Container\ServiceProvider;
|
13 |
use Dhii\Modular\Module\ModuleInterface;
|
14 |
+
use WC_Order;
|
15 |
use WooCommerce\PayPalCommerce\AdminNotices\Repository\Repository;
|
16 |
+
use WooCommerce\PayPalCommerce\ApiClient\Entity\Capture;
|
17 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
18 |
use WooCommerce\PayPalCommerce\ApiClient\Repository\PayPalRequestIdRepository;
|
19 |
+
use WooCommerce\PayPalCommerce\WcGateway\Admin\FeesRenderer;
|
20 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
|
21 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail;
|
22 |
use WooCommerce\PayPalCommerce\WcGateway\Admin\RenderAuthorizeAction;
|
24 |
use WooCommerce\PayPalCommerce\WcGateway\Checkout\CheckoutPayPalAddressPreset;
|
25 |
use WooCommerce\PayPalCommerce\WcGateway\Checkout\DisableGateways;
|
26 |
use WooCommerce\PayPalCommerce\WcGateway\Endpoint\ReturnUrlEndpoint;
|
27 |
+
use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException;
|
28 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
29 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
30 |
use WooCommerce\PayPalCommerce\WcGateway\Notice\ConnectAdminNotice;
|
74 |
}
|
75 |
);
|
76 |
|
77 |
+
add_action(
|
78 |
+
'woocommerce_paypal_payments_order_captured',
|
79 |
+
function ( WC_Order $wc_order, Capture $capture ) {
|
80 |
+
$breakdown = $capture->seller_receivable_breakdown();
|
81 |
+
if ( $breakdown ) {
|
82 |
+
$wc_order->update_meta_data( PayPalGateway::FEES_META_KEY, $breakdown->to_array() );
|
83 |
+
$wc_order->save_meta_data();
|
84 |
+
}
|
85 |
+
},
|
86 |
+
10,
|
87 |
+
2
|
88 |
+
);
|
89 |
+
|
90 |
+
$fees_renderer = $c->get( 'wcgateway.admin.fees-renderer' );
|
91 |
+
assert( $fees_renderer instanceof FeesRenderer );
|
92 |
+
|
93 |
+
add_action(
|
94 |
+
'woocommerce_admin_order_totals_after_total',
|
95 |
+
function ( int $order_id ) use ( $fees_renderer ) {
|
96 |
+
$wc_order = wc_get_order( $order_id );
|
97 |
+
if ( ! $wc_order instanceof WC_Order ) {
|
98 |
+
return;
|
99 |
+
}
|
100 |
+
|
101 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
102 |
+
echo $fees_renderer->render( $wc_order );
|
103 |
+
}
|
104 |
+
);
|
105 |
+
|
106 |
if ( $c->has( 'wcgateway.url' ) ) {
|
107 |
$assets = new SettingsPageAssets(
|
108 |
$c->get( 'wcgateway.url' ),
|
109 |
+
$c->get( 'ppcp.asset-version' ),
|
110 |
$c->get( 'api.bearer' )
|
111 |
);
|
112 |
$assets->register_assets();
|
165 |
$endpoint->handle_request();
|
166 |
}
|
167 |
);
|
168 |
+
|
169 |
+
add_action(
|
170 |
+
'woocommerce_paypal_payments_gateway_migrate',
|
171 |
+
static function () use ( $c ) {
|
172 |
+
$settings = $c->get( 'wcgateway.settings' );
|
173 |
+
assert( $settings instanceof Settings );
|
174 |
+
|
175 |
+
try {
|
176 |
+
if ( $settings->get( '3d_secure_contingency' ) === '3D_SECURE' ) {
|
177 |
+
$settings->set( '3d_secure_contingency', 'SCA_ALWAYS' );
|
178 |
+
$settings->persist();
|
179 |
+
}
|
180 |
+
} catch ( NotFoundException $exception ) {
|
181 |
+
return;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
);
|
185 |
}
|
186 |
|
187 |
/**
|
281 |
static function ( $order_actions ) use ( $container ): array {
|
282 |
global $theorder;
|
283 |
|
284 |
+
if ( ! is_a( $theorder, WC_Order::class ) ) {
|
285 |
return $order_actions;
|
286 |
}
|
287 |
|
297 |
|
298 |
add_action(
|
299 |
'woocommerce_order_action_ppcp_authorize_order',
|
300 |
+
static function ( WC_Order $wc_order ) use ( $container ) {
|
301 |
|
302 |
/**
|
303 |
* The authorized payments processor.
|
modules/ppcp-webhooks/extensions.php
CHANGED
@@ -19,7 +19,6 @@ return array(
|
|
19 |
'title' => __( 'Subscribed webhooks', 'woocommerce-paypal-payments' ),
|
20 |
'type' => 'ppcp-table',
|
21 |
'screens' => array(
|
22 |
-
State::STATE_PROGRESSIVE,
|
23 |
State::STATE_ONBOARDED,
|
24 |
),
|
25 |
'requirements' => array(),
|
@@ -34,7 +33,6 @@ return array(
|
|
34 |
'type' => 'ppcp-text',
|
35 |
'text' => '<button type="button" class="button ppcp-webhooks-resubscribe">' . esc_html__( 'Resubscribe', 'woocommerce-paypal-payments' ) . '</button>',
|
36 |
'screens' => array(
|
37 |
-
State::STATE_PROGRESSIVE,
|
38 |
State::STATE_ONBOARDED,
|
39 |
),
|
40 |
'requirements' => array(),
|
@@ -53,7 +51,6 @@ return array(
|
|
53 |
'type' => 'ppcp-text',
|
54 |
'text' => '<button type="button" class="button ppcp-webhooks-simulate">' . esc_html__( 'Simulate', 'woocommerce-paypal-payments' ) . '</button>',
|
55 |
'screens' => array(
|
56 |
-
State::STATE_PROGRESSIVE,
|
57 |
State::STATE_ONBOARDED,
|
58 |
),
|
59 |
'requirements' => array(),
|
19 |
'title' => __( 'Subscribed webhooks', 'woocommerce-paypal-payments' ),
|
20 |
'type' => 'ppcp-table',
|
21 |
'screens' => array(
|
|
|
22 |
State::STATE_ONBOARDED,
|
23 |
),
|
24 |
'requirements' => array(),
|
33 |
'type' => 'ppcp-text',
|
34 |
'text' => '<button type="button" class="button ppcp-webhooks-resubscribe">' . esc_html__( 'Resubscribe', 'woocommerce-paypal-payments' ) . '</button>',
|
35 |
'screens' => array(
|
|
|
36 |
State::STATE_ONBOARDED,
|
37 |
),
|
38 |
'requirements' => array(),
|
51 |
'type' => 'ppcp-text',
|
52 |
'text' => '<button type="button" class="button ppcp-webhooks-simulate">' . esc_html__( 'Simulate', 'woocommerce-paypal-payments' ) . '</button>',
|
53 |
'screens' => array(
|
|
|
54 |
State::STATE_ONBOARDED,
|
55 |
),
|
56 |
'requirements' => array(),
|
modules/ppcp-webhooks/services.php
CHANGED
@@ -156,7 +156,8 @@ return array(
|
|
156 |
|
157 |
'webhook.status.assets' => function( ContainerInterface $container ) : WebhooksStatusPageAssets {
|
158 |
return new WebhooksStatusPageAssets(
|
159 |
-
$container->get( 'webhook.module-url' )
|
|
|
160 |
);
|
161 |
},
|
162 |
|
156 |
|
157 |
'webhook.status.assets' => function( ContainerInterface $container ) : WebhooksStatusPageAssets {
|
158 |
return new WebhooksStatusPageAssets(
|
159 |
+
$container->get( 'webhook.module-url' ),
|
160 |
+
$container->get( 'ppcp.asset-version' )
|
161 |
);
|
162 |
},
|
163 |
|
modules/ppcp-webhooks/src/Handler/PaymentCaptureRefunded.php
CHANGED
@@ -10,13 +10,14 @@ declare(strict_types=1);
|
|
10 |
namespace WooCommerce\PayPalCommerce\Webhooks\Handler;
|
11 |
|
12 |
use Psr\Log\LoggerInterface;
|
|
|
13 |
|
14 |
/**
|
15 |
* Class PaymentCaptureRefunded
|
16 |
*/
|
17 |
class PaymentCaptureRefunded implements RequestHandler {
|
18 |
|
19 |
-
use PrefixTrait;
|
20 |
|
21 |
/**
|
22 |
* The logger.
|
@@ -150,6 +151,11 @@ class PaymentCaptureRefunded implements RequestHandler {
|
|
150 |
'order' => $wc_order,
|
151 |
)
|
152 |
);
|
|
|
|
|
|
|
|
|
|
|
153 |
$response['success'] = true;
|
154 |
return rest_ensure_response( $response );
|
155 |
}
|
10 |
namespace WooCommerce\PayPalCommerce\Webhooks\Handler;
|
11 |
|
12 |
use Psr\Log\LoggerInterface;
|
13 |
+
use WooCommerce\PayPalCommerce\WcGateway\Processor\TransactionIdHandlingTrait;
|
14 |
|
15 |
/**
|
16 |
* Class PaymentCaptureRefunded
|
17 |
*/
|
18 |
class PaymentCaptureRefunded implements RequestHandler {
|
19 |
|
20 |
+
use PrefixTrait, TransactionIdHandlingTrait;
|
21 |
|
22 |
/**
|
23 |
* The logger.
|
151 |
'order' => $wc_order,
|
152 |
)
|
153 |
);
|
154 |
+
|
155 |
+
if ( is_array( $request['resource'] ) && isset( $request['resource']['id'] ) ) {
|
156 |
+
$this->update_transaction_id( $request['resource']['id'], $wc_order, $this->logger );
|
157 |
+
}
|
158 |
+
|
159 |
$response['success'] = true;
|
160 |
return rest_ensure_response( $response );
|
161 |
}
|
modules/ppcp-webhooks/src/Status/Assets/WebhooksStatusPageAssets.php
CHANGED
@@ -26,15 +26,25 @@ class WebhooksStatusPageAssets {
|
|
26 |
*/
|
27 |
private $module_url;
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
/**
|
30 |
* WebhooksStatusPageAssets constructor.
|
31 |
*
|
32 |
* @param string $module_url The URL to the module.
|
|
|
33 |
*/
|
34 |
public function __construct(
|
35 |
-
string $module_url
|
|
|
36 |
) {
|
37 |
$this->module_url = untrailingslashit( $module_url );
|
|
|
38 |
}
|
39 |
|
40 |
/**
|
@@ -47,14 +57,14 @@ class WebhooksStatusPageAssets {
|
|
47 |
'ppcp-webhooks-status-page-style',
|
48 |
untrailingslashit( $this->module_url ) . '/assets/css/status-page.css',
|
49 |
array(),
|
50 |
-
|
51 |
);
|
52 |
|
53 |
wp_register_script(
|
54 |
'ppcp-webhooks-status-page',
|
55 |
untrailingslashit( $this->module_url ) . '/assets/js/status-page.js',
|
56 |
array(),
|
57 |
-
|
58 |
true
|
59 |
);
|
60 |
|
26 |
*/
|
27 |
private $module_url;
|
28 |
|
29 |
+
/**
|
30 |
+
* The assets version.
|
31 |
+
*
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
private $version;
|
35 |
+
|
36 |
/**
|
37 |
* WebhooksStatusPageAssets constructor.
|
38 |
*
|
39 |
* @param string $module_url The URL to the module.
|
40 |
+
* @param string $version The assets version.
|
41 |
*/
|
42 |
public function __construct(
|
43 |
+
string $module_url,
|
44 |
+
string $version
|
45 |
) {
|
46 |
$this->module_url = untrailingslashit( $module_url );
|
47 |
+
$this->version = $version;
|
48 |
}
|
49 |
|
50 |
/**
|
57 |
'ppcp-webhooks-status-page-style',
|
58 |
untrailingslashit( $this->module_url ) . '/assets/css/status-page.css',
|
59 |
array(),
|
60 |
+
$this->version
|
61 |
);
|
62 |
|
63 |
wp_register_script(
|
64 |
'ppcp-webhooks-status-page',
|
65 |
untrailingslashit( $this->module_url ) . '/assets/js/status-page.js',
|
66 |
array(),
|
67 |
+
$this->version,
|
68 |
true
|
69 |
);
|
70 |
|
psalm-baseline.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<files psalm-version="4.
|
3 |
<file src="modules/ppcp-api-client/services.php">
|
4 |
<UndefinedConstant occurrences="2">
|
5 |
<code>PAYPAL_API_URL</code>
|
@@ -12,9 +12,6 @@
|
|
12 |
</UndefinedMethod>
|
13 |
</file>
|
14 |
<file src="modules/ppcp-api-client/src/Endpoint/IdentityToken.php">
|
15 |
-
<InvalidOperand occurrences="1">
|
16 |
-
<code>$customer_id</code>
|
17 |
-
</InvalidOperand>
|
18 |
<UndefinedMethod occurrences="1">
|
19 |
<code>$response</code>
|
20 |
</UndefinedMethod>
|
@@ -52,9 +49,6 @@
|
|
52 |
</UndefinedMethod>
|
53 |
</file>
|
54 |
<file src="modules/ppcp-api-client/src/Endpoint/PaymentTokenEndpoint.php">
|
55 |
-
<InvalidOperand occurrences="1">
|
56 |
-
<code>$id</code>
|
57 |
-
</InvalidOperand>
|
58 |
<UndefinedMethod occurrences="1">
|
59 |
<code>$response</code>
|
60 |
</UndefinedMethod>
|
@@ -212,9 +206,7 @@
|
|
212 |
<RedundantCast occurrences="1">
|
213 |
<code>(float) $item_total</code>
|
214 |
</RedundantCast>
|
215 |
-
<RedundantCastGivenDocblockType occurrences="
|
216 |
-
<code>(float) $cart->get_cart_contents_tax()</code>
|
217 |
-
<code>(float) $cart->get_discount_tax()</code>
|
218 |
<code>(float) $cart->get_discount_total()</code>
|
219 |
<code>(float) $cart->get_shipping_total()</code>
|
220 |
<code>(float) $cart->get_total( 'numeric' )</code>
|
@@ -288,6 +280,9 @@
|
|
288 |
</UndefinedConstant>
|
289 |
</file>
|
290 |
<file src="modules/ppcp-button/services.php">
|
|
|
|
|
|
|
291 |
<UndefinedConstant occurrences="2">
|
292 |
<code>CONNECT_WOO_CLIENT_ID</code>
|
293 |
<code>CONNECT_WOO_SANDBOX_CLIENT_ID</code>
|
@@ -297,13 +292,9 @@
|
|
297 |
<InvalidScalarArgument occurrences="1">
|
298 |
<code>1</code>
|
299 |
</InvalidScalarArgument>
|
300 |
-
<MissingClosureParamType occurrences="
|
301 |
-
<code>$default_fields</code>
|
302 |
<code>$id</code>
|
303 |
</MissingClosureParamType>
|
304 |
-
<MissingClosureReturnType occurrences="1">
|
305 |
-
<code>function ( $default_fields, $id ) {</code>
|
306 |
-
</MissingClosureReturnType>
|
307 |
<MissingReturnType occurrences="3">
|
308 |
<code>button_renderer</code>
|
309 |
<code>dcc_renderer</code>
|
@@ -440,6 +431,9 @@
|
|
440 |
<MissingClosureParamType occurrences="1">
|
441 |
<code>$container</code>
|
442 |
</MissingClosureParamType>
|
|
|
|
|
|
|
443 |
<UndefinedConstant occurrences="10">
|
444 |
<code>CONNECT_WOO_MERCHANT_ID</code>
|
445 |
<code>CONNECT_WOO_SANDBOX_MERCHANT_ID</code>
|
@@ -532,18 +526,13 @@
|
|
532 |
<FalsableReturnStatement occurrences="1">
|
533 |
<code>current( $tokens )</code>
|
534 |
</FalsableReturnStatement>
|
535 |
-
<MissingReturnType occurrences="
|
536 |
-
<code>capture_order</code>
|
537 |
<code>process_order</code>
|
538 |
<code>renew</code>
|
539 |
</MissingReturnType>
|
540 |
-
<RedundantCastGivenDocblockType occurrences="
|
541 |
-
<code>(int) $customer->get_id()</code>
|
542 |
<code>(int) $customer->get_id()</code>
|
543 |
<code>(int) $wc_order->get_customer_id()</code>
|
544 |
-
<code>(int) $wc_order->get_id()</code>
|
545 |
-
<code>(int) $wc_order->get_id()</code>
|
546 |
-
<code>(int) $wc_order->get_id()</code>
|
547 |
</RedundantCastGivenDocblockType>
|
548 |
<TooManyArguments occurrences="1">
|
549 |
<code>apply_filters( 'woocommerce_paypal_payments_subscriptions_get_token_for_customer', null, $customer, $wc_order )</code>
|
@@ -571,6 +560,11 @@
|
|
571 |
<code>\WC_Subscription</code>
|
572 |
</UndefinedClass>
|
573 |
</file>
|
|
|
|
|
|
|
|
|
|
|
574 |
<file src="modules/ppcp-vaulting/src/Assets/MyAccountPaymentsAssets.php">
|
575 |
<MissingReturnType occurrences="1">
|
576 |
<code>localize</code>
|
@@ -603,6 +597,13 @@
|
|
603 |
</MissingReturnType>
|
604 |
</file>
|
605 |
<file src="modules/ppcp-wc-gateway/services.php">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
<PossiblyInvalidArgument occurrences="5">
|
607 |
<code>wp_unslash( $_GET[ SectionsRenderer::KEY ] )</code>
|
608 |
<code>wp_unslash( $_GET['page'] )</code>
|
@@ -637,7 +638,6 @@
|
|
637 |
</file>
|
638 |
<file src="modules/ppcp-wc-gateway/src/Checkout/CheckoutPayPalAddressPreset.php">
|
639 |
<PossiblyNullReference occurrences="3">
|
640 |
-
<code>phone</code>
|
641 |
<code>phone</code>
|
642 |
<code>phone</code>
|
643 |
<code>purchase_units</code>
|
@@ -764,7 +764,7 @@
|
|
764 |
</RedundantCast>
|
765 |
</file>
|
766 |
<file src="modules/ppcp-wc-gateway/src/WCGatewayModule.php">
|
767 |
-
<MissingClosureParamType occurrences="
|
768 |
<code>$args</code>
|
769 |
<code>$args</code>
|
770 |
<code>$column</code>
|
@@ -774,9 +774,7 @@
|
|
774 |
<code>$methods</code>
|
775 |
<code>$methods</code>
|
776 |
<code>$notices</code>
|
777 |
-
<code>$order</code>
|
778 |
<code>$order_actions</code>
|
779 |
-
<code>$recipient</code>
|
780 |
<code>$value</code>
|
781 |
<code>$wc_order_id</code>
|
782 |
<code>$wc_order_id</code>
|
@@ -793,6 +791,11 @@
|
|
793 |
<code>$container</code>
|
794 |
</MissingClosureParamType>
|
795 |
</file>
|
|
|
|
|
|
|
|
|
|
|
796 |
<file src="modules/ppcp-webhooks/src/Endpoint/ResubscribeEndpoint.php">
|
797 |
<MissingReturnType occurrences="1">
|
798 |
<code>handle_request</code>
|
@@ -918,4 +921,9 @@
|
|
918 |
</PossiblyNullArgument>
|
919 |
<RedundantCastGivenDocblockType occurrences="1"/>
|
920 |
</file>
|
|
|
|
|
|
|
|
|
|
|
921 |
</files>
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<files psalm-version="4.20.0@f82a70e7edfc6cf2705e9374c8a0b6a974a779ed">
|
3 |
<file src="modules/ppcp-api-client/services.php">
|
4 |
<UndefinedConstant occurrences="2">
|
5 |
<code>PAYPAL_API_URL</code>
|
12 |
</UndefinedMethod>
|
13 |
</file>
|
14 |
<file src="modules/ppcp-api-client/src/Endpoint/IdentityToken.php">
|
|
|
|
|
|
|
15 |
<UndefinedMethod occurrences="1">
|
16 |
<code>$response</code>
|
17 |
</UndefinedMethod>
|
49 |
</UndefinedMethod>
|
50 |
</file>
|
51 |
<file src="modules/ppcp-api-client/src/Endpoint/PaymentTokenEndpoint.php">
|
|
|
|
|
|
|
52 |
<UndefinedMethod occurrences="1">
|
53 |
<code>$response</code>
|
54 |
</UndefinedMethod>
|
206 |
<RedundantCast occurrences="1">
|
207 |
<code>(float) $item_total</code>
|
208 |
</RedundantCast>
|
209 |
+
<RedundantCastGivenDocblockType occurrences="6">
|
|
|
|
|
210 |
<code>(float) $cart->get_discount_total()</code>
|
211 |
<code>(float) $cart->get_shipping_total()</code>
|
212 |
<code>(float) $cart->get_total( 'numeric' )</code>
|
280 |
</UndefinedConstant>
|
281 |
</file>
|
282 |
<file src="modules/ppcp-button/services.php">
|
283 |
+
<PossiblyFalseArgument occurrences="1">
|
284 |
+
<code>realpath( __FILE__ )</code>
|
285 |
+
</PossiblyFalseArgument>
|
286 |
<UndefinedConstant occurrences="2">
|
287 |
<code>CONNECT_WOO_CLIENT_ID</code>
|
288 |
<code>CONNECT_WOO_SANDBOX_CLIENT_ID</code>
|
292 |
<InvalidScalarArgument occurrences="1">
|
293 |
<code>1</code>
|
294 |
</InvalidScalarArgument>
|
295 |
+
<MissingClosureParamType occurrences="1">
|
|
|
296 |
<code>$id</code>
|
297 |
</MissingClosureParamType>
|
|
|
|
|
|
|
298 |
<MissingReturnType occurrences="3">
|
299 |
<code>button_renderer</code>
|
300 |
<code>dcc_renderer</code>
|
431 |
<MissingClosureParamType occurrences="1">
|
432 |
<code>$container</code>
|
433 |
</MissingClosureParamType>
|
434 |
+
<PossiblyFalseArgument occurrences="1">
|
435 |
+
<code>realpath( __FILE__ )</code>
|
436 |
+
</PossiblyFalseArgument>
|
437 |
<UndefinedConstant occurrences="10">
|
438 |
<code>CONNECT_WOO_MERCHANT_ID</code>
|
439 |
<code>CONNECT_WOO_SANDBOX_MERCHANT_ID</code>
|
526 |
<FalsableReturnStatement occurrences="1">
|
527 |
<code>current( $tokens )</code>
|
528 |
</FalsableReturnStatement>
|
529 |
+
<MissingReturnType occurrences="2">
|
|
|
530 |
<code>process_order</code>
|
531 |
<code>renew</code>
|
532 |
</MissingReturnType>
|
533 |
+
<RedundantCastGivenDocblockType occurrences="2">
|
|
|
534 |
<code>(int) $customer->get_id()</code>
|
535 |
<code>(int) $wc_order->get_customer_id()</code>
|
|
|
|
|
|
|
536 |
</RedundantCastGivenDocblockType>
|
537 |
<TooManyArguments occurrences="1">
|
538 |
<code>apply_filters( 'woocommerce_paypal_payments_subscriptions_get_token_for_customer', null, $customer, $wc_order )</code>
|
560 |
<code>\WC_Subscription</code>
|
561 |
</UndefinedClass>
|
562 |
</file>
|
563 |
+
<file src="modules/ppcp-vaulting/services.php">
|
564 |
+
<PossiblyFalseArgument occurrences="1">
|
565 |
+
<code>realpath( __FILE__ )</code>
|
566 |
+
</PossiblyFalseArgument>
|
567 |
+
</file>
|
568 |
<file src="modules/ppcp-vaulting/src/Assets/MyAccountPaymentsAssets.php">
|
569 |
<MissingReturnType occurrences="1">
|
570 |
<code>localize</code>
|
597 |
</MissingReturnType>
|
598 |
</file>
|
599 |
<file src="modules/ppcp-wc-gateway/services.php">
|
600 |
+
<PossiblyFalseArgument occurrences="2">
|
601 |
+
<code>realpath( __FILE__ )</code>
|
602 |
+
<code>realpath( __FILE__ )</code>
|
603 |
+
</PossiblyFalseArgument>
|
604 |
+
<PossiblyFalseOperand occurrences="1">
|
605 |
+
<code>substr( $letters, 0, 6 )</code>
|
606 |
+
</PossiblyFalseOperand>
|
607 |
<PossiblyInvalidArgument occurrences="5">
|
608 |
<code>wp_unslash( $_GET[ SectionsRenderer::KEY ] )</code>
|
609 |
<code>wp_unslash( $_GET['page'] )</code>
|
638 |
</file>
|
639 |
<file src="modules/ppcp-wc-gateway/src/Checkout/CheckoutPayPalAddressPreset.php">
|
640 |
<PossiblyNullReference occurrences="3">
|
|
|
641 |
<code>phone</code>
|
642 |
<code>phone</code>
|
643 |
<code>purchase_units</code>
|
764 |
</RedundantCast>
|
765 |
</file>
|
766 |
<file src="modules/ppcp-wc-gateway/src/WCGatewayModule.php">
|
767 |
+
<MissingClosureParamType occurrences="13">
|
768 |
<code>$args</code>
|
769 |
<code>$args</code>
|
770 |
<code>$column</code>
|
774 |
<code>$methods</code>
|
775 |
<code>$methods</code>
|
776 |
<code>$notices</code>
|
|
|
777 |
<code>$order_actions</code>
|
|
|
778 |
<code>$value</code>
|
779 |
<code>$wc_order_id</code>
|
780 |
<code>$wc_order_id</code>
|
791 |
<code>$container</code>
|
792 |
</MissingClosureParamType>
|
793 |
</file>
|
794 |
+
<file src="modules/ppcp-webhooks/services.php">
|
795 |
+
<PossiblyFalseArgument occurrences="1">
|
796 |
+
<code>realpath( __FILE__ )</code>
|
797 |
+
</PossiblyFalseArgument>
|
798 |
+
</file>
|
799 |
<file src="modules/ppcp-webhooks/src/Endpoint/ResubscribeEndpoint.php">
|
800 |
<MissingReturnType occurrences="1">
|
801 |
<code>handle_request</code>
|
921 |
</PossiblyNullArgument>
|
922 |
<RedundantCastGivenDocblockType occurrences="1"/>
|
923 |
</file>
|
924 |
+
<file src="src/services.php">
|
925 |
+
<PossiblyFalseArgument occurrences="1">
|
926 |
+
<code>realpath( __FILE__ )</code>
|
927 |
+
</PossiblyFalseArgument>
|
928 |
+
</file>
|
929 |
</files>
|
psalm.xml.dist
CHANGED
@@ -4,12 +4,11 @@
|
|
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 |
-
|
8 |
useDocblockTypes="true"
|
9 |
usePhpDocMethodsWithoutMagicCall="false"
|
10 |
strictBinaryOperands="true"
|
11 |
rememberPropertyAssignmentsAfterCall="true"
|
12 |
-
allowPhpStormGenerics="true"
|
13 |
allowStringToStandInForClass="false"
|
14 |
memoizeMethodCallResults="false"
|
15 |
hoistConstants="false"
|
@@ -150,5 +149,6 @@
|
|
150 |
<MixedReturnTypeCoercion errorLevel="info"/>
|
151 |
<MixedStringOffsetAssignment errorLevel="info"/>
|
152 |
<ParamNameMismatch errorLevel="info"/>
|
|
|
153 |
</issueHandlers>
|
154 |
</psalm>
|
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 |
+
reportMixedIssues="false"
|
8 |
useDocblockTypes="true"
|
9 |
usePhpDocMethodsWithoutMagicCall="false"
|
10 |
strictBinaryOperands="true"
|
11 |
rememberPropertyAssignmentsAfterCall="true"
|
|
|
12 |
allowStringToStandInForClass="false"
|
13 |
memoizeMethodCallResults="false"
|
14 |
hoistConstants="false"
|
149 |
<MixedReturnTypeCoercion errorLevel="info"/>
|
150 |
<MixedStringOffsetAssignment errorLevel="info"/>
|
151 |
<ParamNameMismatch errorLevel="info"/>
|
152 |
+
<RedundantCastGivenDocblockType errorLevel="info"/>
|
153 |
</issueHandlers>
|
154 |
</psalm>
|
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 |
|
@@ -81,8 +81,28 @@ Follow the steps below to connect the plugin to your PayPal account:
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
= 1.6.5 =
|
85 |
-
* Fix - Allow guest users to purchase subscription products #422
|
86 |
* Fix - Transaction ID missing for renewal order #424
|
87 |
* Fix - Save your credit card checkbox should be removed in pay for order for subscriptions #420
|
88 |
* Fix - Null currency error when the Aelia currency switcher plugin is active #426
|
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.9
|
6 |
Requires PHP: 7.1
|
7 |
+
Stable tag: 1.7.0
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 1.7.0 =
|
85 |
+
* Fix - DCC orders randomly failing #503
|
86 |
+
* Fix - Multi-currency broke #481
|
87 |
+
* Fix - Address information from PayPal shortcut flow not loaded #451
|
88 |
+
* Fix - WooCommerce as mu-plugin is not detected as active #461
|
89 |
+
* Fix - Check if PayPal Payments is an available gateway before displaying it on Product/Cart pages #447
|
90 |
+
* Enhancement - Improve onboarding flow, allow no card processing #443 #508 #510
|
91 |
+
* Enhancement - Add Germany to supported ACDC countries #459
|
92 |
+
* Enhancement - Add filters to allow ACDC for countries #437
|
93 |
+
* Enhancement - Update 3D Secure #464
|
94 |
+
* Enhancement - Extend event, error logging & order notes #456
|
95 |
+
* Enhancement - Display API response errors in checkout page with user-friendly error message #457
|
96 |
+
* Enhancement - Pass address details to credit card fields #479
|
97 |
+
* Enhancement - Improve onboarding notice #465
|
98 |
+
* Enhancement - Add transaction ID to WC order and order note when refund is received #473
|
99 |
+
* Enhancement - Asset caching may cause bugs on upgrades #501
|
100 |
+
* Enhancement - Allow partial capture #483
|
101 |
+
* Enhancement - PayPal Payments doesn't set transaction fee metadata #467
|
102 |
+
* Enhancement - Show PayPal fee information in order #489
|
103 |
+
|
104 |
= 1.6.5 =
|
105 |
+
* Fix - Allow guest users to purchase subscription products from checkout page #422
|
106 |
* Fix - Transaction ID missing for renewal order #424
|
107 |
* Fix - Save your credit card checkbox should be removed in pay for order for subscriptions #420
|
108 |
* Fix - Null currency error when the Aelia currency switcher plugin is active #426
|
src/FilePathPluginFactory.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extracts plugin info from plugin file path.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce
|
6 |
+
*
|
7 |
+
* @phpcs:disable Squiz.Commenting.FunctionCommentThrowTag
|
8 |
+
* @phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
9 |
+
*/
|
10 |
+
|
11 |
+
declare(strict_types=1);
|
12 |
+
|
13 |
+
namespace WooCommerce\PayPalCommerce;
|
14 |
+
|
15 |
+
use Dhii\Package\Version\StringVersionFactoryInterface;
|
16 |
+
use Dhii\Package\Version\VersionInterface;
|
17 |
+
use Exception;
|
18 |
+
use RuntimeException;
|
19 |
+
use UnexpectedValueException;
|
20 |
+
use WpOop\WordPress\Plugin\FilePathPluginFactoryInterface;
|
21 |
+
use WpOop\WordPress\Plugin\PluginInterface;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Extracts plugin info from plugin file path.
|
25 |
+
*/
|
26 |
+
class FilePathPluginFactory implements FilePathPluginFactoryInterface {
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The version factory.
|
30 |
+
*
|
31 |
+
* @var StringVersionFactoryInterface
|
32 |
+
*/
|
33 |
+
protected $version_factory;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* FilePathPluginFactory constructor.
|
37 |
+
*
|
38 |
+
* @param StringVersionFactoryInterface $version_factory The version factory.
|
39 |
+
*/
|
40 |
+
public function __construct( StringVersionFactoryInterface $version_factory ) {
|
41 |
+
$this->version_factory = $version_factory;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Extracts plugin info from plugin file path.
|
46 |
+
*
|
47 |
+
* @param string $filePath The plugin file path.
|
48 |
+
*/
|
49 |
+
public function createPluginFromFilePath( string $filePath ): PluginInterface {
|
50 |
+
if ( ! is_readable( $filePath ) ) {
|
51 |
+
throw new RuntimeException(
|
52 |
+
sprintf(
|
53 |
+
'Plugin file "%1$s" does not exist or is not readable',
|
54 |
+
$filePath
|
55 |
+
)
|
56 |
+
);
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( ! function_exists( 'get_plugin_data' ) ) {
|
60 |
+
/**
|
61 |
+
* Skip check for WP files and constants.
|
62 |
+
*
|
63 |
+
* @psalm-suppress UnresolvableInclude
|
64 |
+
* @psalm-suppress UndefinedConstant
|
65 |
+
*/
|
66 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
67 |
+
}
|
68 |
+
|
69 |
+
$plugin_data = get_plugin_data( $filePath );
|
70 |
+
if ( empty( $plugin_data ) ) {
|
71 |
+
throw new UnexpectedValueException(
|
72 |
+
sprintf(
|
73 |
+
'Plugin file "%1$s" does not have a valid plugin header',
|
74 |
+
$filePath
|
75 |
+
)
|
76 |
+
);
|
77 |
+
}
|
78 |
+
|
79 |
+
$plugin_data = array_merge(
|
80 |
+
array(
|
81 |
+
'Name' => '',
|
82 |
+
'Version' => '0.1.0-alpha1+default',
|
83 |
+
'Title' => '',
|
84 |
+
'Description' => '',
|
85 |
+
'TextDomain' => '',
|
86 |
+
'RequiresWP' => '5.0',
|
87 |
+
'RequiresPHP' => '7.1',
|
88 |
+
),
|
89 |
+
$plugin_data
|
90 |
+
);
|
91 |
+
|
92 |
+
$base_dir = dirname( $filePath );
|
93 |
+
$base_name = plugin_basename( $filePath );
|
94 |
+
$slug = $this->get_plugin_slug( $base_name );
|
95 |
+
$text_domain = ! empty( $plugin_data['TextDomain'] ) ? $plugin_data['TextDomain'] : $slug;
|
96 |
+
|
97 |
+
return new Plugin(
|
98 |
+
$plugin_data['Name'],
|
99 |
+
$this->create_version( $plugin_data['Version'] ),
|
100 |
+
$base_dir,
|
101 |
+
$base_name,
|
102 |
+
$plugin_data['Title'],
|
103 |
+
$plugin_data['Description'],
|
104 |
+
$text_domain,
|
105 |
+
$this->create_version( $plugin_data['RequiresPHP'] ),
|
106 |
+
$this->create_version( $plugin_data['RequiresWP'] )
|
107 |
+
);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Creates a new version from a version string.
|
112 |
+
*
|
113 |
+
* @param string $version_string The SemVer-compliant version string.
|
114 |
+
*
|
115 |
+
* @return VersionInterface The new version.
|
116 |
+
*
|
117 |
+
* @throws Exception If version string is malformed.
|
118 |
+
*/
|
119 |
+
protected function create_version( string $version_string ): VersionInterface {
|
120 |
+
return $this->version_factory->createVersionFromString( $version_string );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Retrieves a plugin slug from its basename.
|
125 |
+
*
|
126 |
+
* @param string $base_name The plugin's basename.
|
127 |
+
*
|
128 |
+
* @return string The plugin's slug.
|
129 |
+
*/
|
130 |
+
protected function get_plugin_slug( string $base_name ): string {
|
131 |
+
$directory_separator = '/';
|
132 |
+
|
133 |
+
// If plugin is in a directory, use directory name.
|
134 |
+
if ( strstr( $base_name, $directory_separator ) !== false ) {
|
135 |
+
$parts = explode( $directory_separator, $base_name );
|
136 |
+
if ( $parts ) {
|
137 |
+
return $parts[0];
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
// If plugin is not in a directory, return plugin file basename.
|
142 |
+
return basename( $base_name );
|
143 |
+
}
|
144 |
+
}
|
src/Plugin.php
ADDED
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin properties.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce;
|
11 |
+
|
12 |
+
use Dhii\Package\Version\VersionInterface;
|
13 |
+
use WpOop\WordPress\Plugin\PluginInterface;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Plugin properties.
|
17 |
+
*/
|
18 |
+
class Plugin implements PluginInterface {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* The plugin name.
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
protected $name;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* The plugin version.
|
29 |
+
*
|
30 |
+
* @var VersionInterface
|
31 |
+
*/
|
32 |
+
protected $version;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The path to the plugin base directory.
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
protected $base_dir;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* The plugin base name.
|
43 |
+
*
|
44 |
+
* @var string
|
45 |
+
*/
|
46 |
+
protected $base_name;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* The plugin title.
|
50 |
+
*
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
protected $title;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* The plugin description.
|
57 |
+
*
|
58 |
+
* @var string
|
59 |
+
*/
|
60 |
+
protected $description;
|
61 |
+
|
62 |
+
/**
|
63 |
+
* The text domain of this plugin
|
64 |
+
*
|
65 |
+
* @var string
|
66 |
+
*/
|
67 |
+
protected $text_domain;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* The minimal version of PHP required by this plugin.
|
71 |
+
*
|
72 |
+
* @var VersionInterface
|
73 |
+
*/
|
74 |
+
protected $min_php_version;
|
75 |
+
|
76 |
+
/**
|
77 |
+
* The minimal version of WP required by this plugin.
|
78 |
+
*
|
79 |
+
* @var VersionInterface
|
80 |
+
*/
|
81 |
+
protected $min_wp_version;
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Plugin constructor.
|
85 |
+
*
|
86 |
+
* @param string $name The plugin name.
|
87 |
+
* @param VersionInterface $version The plugin version.
|
88 |
+
* @param string $base_dir The path to the plugin base directory.
|
89 |
+
* @param string $base_name The plugin base name.
|
90 |
+
* @param string $title The plugin title.
|
91 |
+
* @param string $description The plugin description.
|
92 |
+
* @param string $text_domain The text domain of this plugin.
|
93 |
+
* @param VersionInterface $min_php_version The minimal version of PHP required by this plugin.
|
94 |
+
* @param VersionInterface $min_wp_version The minimal version of WP required by this plugin.
|
95 |
+
*/
|
96 |
+
public function __construct(
|
97 |
+
string $name,
|
98 |
+
VersionInterface $version,
|
99 |
+
string $base_dir,
|
100 |
+
string $base_name,
|
101 |
+
string $title,
|
102 |
+
string $description,
|
103 |
+
string $text_domain,
|
104 |
+
VersionInterface $min_php_version,
|
105 |
+
VersionInterface $min_wp_version
|
106 |
+
) {
|
107 |
+
$this->name = $name;
|
108 |
+
$this->description = $description;
|
109 |
+
$this->version = $version;
|
110 |
+
$this->base_dir = $base_dir;
|
111 |
+
$this->base_name = $base_name;
|
112 |
+
$this->title = $title;
|
113 |
+
$this->text_domain = $text_domain;
|
114 |
+
$this->min_php_version = $min_php_version;
|
115 |
+
$this->min_wp_version = $min_wp_version;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* The plugin name.
|
120 |
+
*/
|
121 |
+
public function getName(): string {
|
122 |
+
return $this->name;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* The plugin description.
|
127 |
+
*/
|
128 |
+
public function getDescription(): string {
|
129 |
+
return $this->description;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* The plugin version.
|
134 |
+
*/
|
135 |
+
public function getVersion(): VersionInterface {
|
136 |
+
return $this->version;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* The path to the plugin base directory.
|
141 |
+
*/
|
142 |
+
public function getBaseDir(): string {
|
143 |
+
return $this->base_dir;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* The plugin base name.
|
148 |
+
*/
|
149 |
+
public function getBaseName(): string {
|
150 |
+
return $this->base_name;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* The text domain of this plugin.
|
155 |
+
*/
|
156 |
+
public function getTextDomain(): string {
|
157 |
+
return $this->text_domain;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* The plugin title.
|
162 |
+
*/
|
163 |
+
public function getTitle(): string {
|
164 |
+
return $this->title;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* The minimal version of PHP required by this plugin.
|
169 |
+
*/
|
170 |
+
public function getMinPhpVersion(): VersionInterface {
|
171 |
+
return $this->min_php_version;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* The minimal version of WP required by this plugin.
|
176 |
+
*/
|
177 |
+
public function getMinWpVersion(): VersionInterface {
|
178 |
+
return $this->min_wp_version;
|
179 |
+
}
|
180 |
+
}
|
src/PluginModule.php
CHANGED
@@ -23,7 +23,10 @@ class PluginModule implements ModuleInterface {
|
|
23 |
* {@inheritDoc}
|
24 |
*/
|
25 |
public function setup(): ServiceProviderInterface {
|
26 |
-
return new ServiceProvider(
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
/**
|
23 |
* {@inheritDoc}
|
24 |
*/
|
25 |
public function setup(): ServiceProviderInterface {
|
26 |
+
return new ServiceProvider(
|
27 |
+
require __DIR__ . '/services.php',
|
28 |
+
require __DIR__ . '/extensions.php'
|
29 |
+
);
|
30 |
}
|
31 |
|
32 |
/**
|
src/extensions.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The plugin module extensions.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce;
|
11 |
+
|
12 |
+
return array();
|
src/services.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The plugin module services.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce;
|
11 |
+
|
12 |
+
use Dhii\Versions\StringVersionFactory;
|
13 |
+
use Psr\Container\ContainerInterface;
|
14 |
+
use WpOop\WordPress\Plugin\PluginInterface;
|
15 |
+
|
16 |
+
return array(
|
17 |
+
'ppcp.plugin' => function( ContainerInterface $container ) : PluginInterface {
|
18 |
+
$factory = new FilePathPluginFactory( new StringVersionFactory() );
|
19 |
+
return $factory->createPluginFromFilePath( dirname( realpath( __FILE__ ), 2 ) . '/woocommerce-paypal-payments.php' );
|
20 |
+
},
|
21 |
+
'ppcp.asset-version' => function( ContainerInterface $container ) : string {
|
22 |
+
$plugin = $container->get( 'ppcp.plugin' );
|
23 |
+
assert( $plugin instanceof PluginInterface );
|
24 |
+
|
25 |
+
return (string) $plugin->getVersion();
|
26 |
+
},
|
27 |
+
);
|
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 ComposerAutoloaderInit67b44fe7c35a8c302b78e218a0018012::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -6,4 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
|
|
|
|
|
|
9 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
|
10 |
+
'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
|
11 |
+
'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
|
12 |
+
'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
|
13 |
);
|
vendor/composer/autoload_files.php
CHANGED
@@ -6,5 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
10 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
11 |
);
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
'WooCommerce\\WooCommerce\\Logging\\' => array($baseDir . '/modules/woocommerce-logging/src'),
|
10 |
'WooCommerce\\PayPalCommerce\\Webhooks\\' => array($baseDir . '/modules/ppcp-webhooks/src'),
|
11 |
'WooCommerce\\PayPalCommerce\\WcGateway\\' => array($baseDir . '/modules/ppcp-wc-gateway/src'),
|
@@ -20,9 +21,14 @@ return array(
|
|
20 |
'WooCommerce\\PayPalCommerce\\AdminNotices\\' => array($baseDir . '/modules/ppcp-admin-notices/src'),
|
21 |
'WooCommerce\\PayPalCommerce\\' => array($baseDir . '/src'),
|
22 |
'Wikimedia\\Composer\\' => array($vendorDir . '/wikimedia/composer-merge-plugin/src'),
|
|
|
23 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
24 |
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
25 |
'Interop\\Container\\' => array($vendorDir . '/container-interop/service-provider/src'),
|
|
|
|
|
|
|
|
|
26 |
'Dhii\\Modular\\Module\\' => array($vendorDir . '/dhii/module-interface/src'),
|
27 |
'Dhii\\Container\\' => array($vendorDir . '/dhii/containers/src'),
|
28 |
'Dhii\\Collection\\' => array($vendorDir . '/dhii/collections-interface/src'),
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'WpOop\\WordPress\\' => array($vendorDir . '/wp-oop/wordpress-interface/src'),
|
10 |
'WooCommerce\\WooCommerce\\Logging\\' => array($baseDir . '/modules/woocommerce-logging/src'),
|
11 |
'WooCommerce\\PayPalCommerce\\Webhooks\\' => array($baseDir . '/modules/ppcp-webhooks/src'),
|
12 |
'WooCommerce\\PayPalCommerce\\WcGateway\\' => array($baseDir . '/modules/ppcp-wc-gateway/src'),
|
21 |
'WooCommerce\\PayPalCommerce\\AdminNotices\\' => array($baseDir . '/modules/ppcp-admin-notices/src'),
|
22 |
'WooCommerce\\PayPalCommerce\\' => array($baseDir . '/src'),
|
23 |
'Wikimedia\\Composer\\' => array($vendorDir . '/wikimedia/composer-merge-plugin/src'),
|
24 |
+
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
|
25 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
26 |
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
27 |
'Interop\\Container\\' => array($vendorDir . '/container-interop/service-provider/src'),
|
28 |
+
'Dhii\\Versions\\' => array($vendorDir . '/dhii/versions/src'),
|
29 |
+
'Dhii\\Validation\\' => array($vendorDir . '/dhii/validation-interface/src'),
|
30 |
+
'Dhii\\Util\\String\\' => array($vendorDir . '/dhii/human-readable-interface/src'),
|
31 |
+
'Dhii\\Package\\' => array($vendorDir . '/dhii/package-interface/src'),
|
32 |
'Dhii\\Modular\\Module\\' => array($vendorDir . '/dhii/module-interface/src'),
|
33 |
'Dhii\\Container\\' => array($vendorDir . '/dhii/containers/src'),
|
34 |
'Dhii\\Collection\\' => array($vendorDir . '/dhii/collections-interface/src'),
|
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 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit5f8a535cab56f9307bff46d869d583bc
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit5f8a535cab56f9307bff46d869d583bc
|
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
-
$includeFiles = Composer\Autoload\
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
function
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit67b44fe7c35a8c302b78e218a0018012
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit67b44fe7c35a8c302b78e218a0018012', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit67b44fe7c35a8c302b78e218a0018012', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit67b44fe7c35a8c302b78e218a0018012::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit67b44fe7c35a8c302b78e218a0018012::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequire67b44fe7c35a8c302b78e218a0018012($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequire67b44fe7c35a8c302b78e218a0018012($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,15 +4,17 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
|
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
11 |
);
|
12 |
|
13 |
public static $prefixLengthsPsr4 = array (
|
14 |
'W' =>
|
15 |
array (
|
|
|
16 |
'WooCommerce\\WooCommerce\\Logging\\' => 32,
|
17 |
'WooCommerce\\PayPalCommerce\\Webhooks\\' => 36,
|
18 |
'WooCommerce\\PayPalCommerce\\WcGateway\\' => 37,
|
@@ -28,6 +30,10 @@ class ComposerStaticInit5f8a535cab56f9307bff46d869d583bc
|
|
28 |
'WooCommerce\\PayPalCommerce\\' => 27,
|
29 |
'Wikimedia\\Composer\\' => 19,
|
30 |
),
|
|
|
|
|
|
|
|
|
31 |
'P' =>
|
32 |
array (
|
33 |
'Psr\\Log\\' => 8,
|
@@ -39,6 +45,10 @@ class ComposerStaticInit5f8a535cab56f9307bff46d869d583bc
|
|
39 |
),
|
40 |
'D' =>
|
41 |
array (
|
|
|
|
|
|
|
|
|
42 |
'Dhii\\Modular\\Module\\' => 20,
|
43 |
'Dhii\\Container\\' => 15,
|
44 |
'Dhii\\Collection\\' => 16,
|
@@ -46,6 +56,10 @@ class ComposerStaticInit5f8a535cab56f9307bff46d869d583bc
|
|
46 |
);
|
47 |
|
48 |
public static $prefixDirsPsr4 = array (
|
|
|
|
|
|
|
|
|
49 |
'WooCommerce\\WooCommerce\\Logging\\' =>
|
50 |
array (
|
51 |
0 => __DIR__ . '/../..' . '/modules/woocommerce-logging/src',
|
@@ -102,6 +116,10 @@ class ComposerStaticInit5f8a535cab56f9307bff46d869d583bc
|
|
102 |
array (
|
103 |
0 => __DIR__ . '/..' . '/wikimedia/composer-merge-plugin/src',
|
104 |
),
|
|
|
|
|
|
|
|
|
105 |
'Psr\\Log\\' =>
|
106 |
array (
|
107 |
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
@@ -114,6 +132,22 @@ class ComposerStaticInit5f8a535cab56f9307bff46d869d583bc
|
|
114 |
array (
|
115 |
0 => __DIR__ . '/..' . '/container-interop/service-provider/src',
|
116 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
'Dhii\\Modular\\Module\\' =>
|
118 |
array (
|
119 |
0 => __DIR__ . '/..' . '/dhii/module-interface/src',
|
@@ -128,11 +162,19 @@ class ComposerStaticInit5f8a535cab56f9307bff46d869d583bc
|
|
128 |
),
|
129 |
);
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
public static function getInitializer(ClassLoader $loader)
|
132 |
{
|
133 |
return \Closure::bind(function () use ($loader) {
|
134 |
-
$loader->prefixLengthsPsr4 =
|
135 |
-
$loader->prefixDirsPsr4 =
|
|
|
136 |
|
137 |
}, null, ClassLoader::class);
|
138 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit67b44fe7c35a8c302b78e218a0018012
|
8 |
{
|
9 |
public static $files = array (
|
10 |
+
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
11 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
12 |
);
|
13 |
|
14 |
public static $prefixLengthsPsr4 = array (
|
15 |
'W' =>
|
16 |
array (
|
17 |
+
'WpOop\\WordPress\\' => 16,
|
18 |
'WooCommerce\\WooCommerce\\Logging\\' => 32,
|
19 |
'WooCommerce\\PayPalCommerce\\Webhooks\\' => 36,
|
20 |
'WooCommerce\\PayPalCommerce\\WcGateway\\' => 37,
|
30 |
'WooCommerce\\PayPalCommerce\\' => 27,
|
31 |
'Wikimedia\\Composer\\' => 19,
|
32 |
),
|
33 |
+
'S' =>
|
34 |
+
array (
|
35 |
+
'Symfony\\Polyfill\\Php80\\' => 23,
|
36 |
+
),
|
37 |
'P' =>
|
38 |
array (
|
39 |
'Psr\\Log\\' => 8,
|
45 |
),
|
46 |
'D' =>
|
47 |
array (
|
48 |
+
'Dhii\\Versions\\' => 14,
|
49 |
+
'Dhii\\Validation\\' => 16,
|
50 |
+
'Dhii\\Util\\String\\' => 17,
|
51 |
+
'Dhii\\Package\\' => 13,
|
52 |
'Dhii\\Modular\\Module\\' => 20,
|
53 |
'Dhii\\Container\\' => 15,
|
54 |
'Dhii\\Collection\\' => 16,
|
56 |
);
|
57 |
|
58 |
public static $prefixDirsPsr4 = array (
|
59 |
+
'WpOop\\WordPress\\' =>
|
60 |
+
array (
|
61 |
+
0 => __DIR__ . '/..' . '/wp-oop/wordpress-interface/src',
|
62 |
+
),
|
63 |
'WooCommerce\\WooCommerce\\Logging\\' =>
|
64 |
array (
|
65 |
0 => __DIR__ . '/../..' . '/modules/woocommerce-logging/src',
|
116 |
array (
|
117 |
0 => __DIR__ . '/..' . '/wikimedia/composer-merge-plugin/src',
|
118 |
),
|
119 |
+
'Symfony\\Polyfill\\Php80\\' =>
|
120 |
+
array (
|
121 |
+
0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
|
122 |
+
),
|
123 |
'Psr\\Log\\' =>
|
124 |
array (
|
125 |
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
132 |
array (
|
133 |
0 => __DIR__ . '/..' . '/container-interop/service-provider/src',
|
134 |
),
|
135 |
+
'Dhii\\Versions\\' =>
|
136 |
+
array (
|
137 |
+
0 => __DIR__ . '/..' . '/dhii/versions/src',
|
138 |
+
),
|
139 |
+
'Dhii\\Validation\\' =>
|
140 |
+
array (
|
141 |
+
0 => __DIR__ . '/..' . '/dhii/validation-interface/src',
|
142 |
+
),
|
143 |
+
'Dhii\\Util\\String\\' =>
|
144 |
+
array (
|
145 |
+
0 => __DIR__ . '/..' . '/dhii/human-readable-interface/src',
|
146 |
+
),
|
147 |
+
'Dhii\\Package\\' =>
|
148 |
+
array (
|
149 |
+
0 => __DIR__ . '/..' . '/dhii/package-interface/src',
|
150 |
+
),
|
151 |
'Dhii\\Modular\\Module\\' =>
|
152 |
array (
|
153 |
0 => __DIR__ . '/..' . '/dhii/module-interface/src',
|
162 |
),
|
163 |
);
|
164 |
|
165 |
+
public static $classMap = array (
|
166 |
+
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
|
167 |
+
'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
|
168 |
+
'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
|
169 |
+
'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
|
170 |
+
);
|
171 |
+
|
172 |
public static function getInitializer(ClassLoader $loader)
|
173 |
{
|
174 |
return \Closure::bind(function () use ($loader) {
|
175 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit67b44fe7c35a8c302b78e218a0018012::$prefixLengthsPsr4;
|
176 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit67b44fe7c35a8c302b78e218a0018012::$prefixDirsPsr4;
|
177 |
+
$loader->classMap = ComposerStaticInit67b44fe7c35a8c302b78e218a0018012::$classMap;
|
178 |
|
179 |
}, null, ClassLoader::class);
|
180 |
}
|
vendor/composer/installed.json
CHANGED
@@ -30,11 +30,7 @@
|
|
30 |
"MIT"
|
31 |
],
|
32 |
"description": "Promoting container interoperability through standard service providers",
|
33 |
-
"homepage": "https://github.com/container-interop/service-provider"
|
34 |
-
"support": {
|
35 |
-
"issues": "https://github.com/container-interop/service-provider/issues",
|
36 |
-
"source": "https://github.com/container-interop/service-provider/tree/master"
|
37 |
-
}
|
38 |
},
|
39 |
{
|
40 |
"name": "dhii/collections-interface",
|
@@ -147,6 +143,59 @@
|
|
147 |
"container"
|
148 |
]
|
149 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
{
|
151 |
"name": "dhii/module-interface",
|
152 |
"version": "v0.3.0-alpha2",
|
@@ -195,11 +244,147 @@
|
|
195 |
"email": "development@dhii.co"
|
196 |
}
|
197 |
],
|
198 |
-
"description": "Interfaces for modules"
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
},
|
204 |
{
|
205 |
"name": "psr/container",
|
@@ -250,11 +435,7 @@
|
|
250 |
"container-interface",
|
251 |
"container-interop",
|
252 |
"psr"
|
253 |
-
]
|
254 |
-
"support": {
|
255 |
-
"issues": "https://github.com/php-fig/container/issues",
|
256 |
-
"source": "https://github.com/php-fig/container/tree/master"
|
257 |
-
}
|
258 |
},
|
259 |
{
|
260 |
"name": "psr/log",
|
@@ -303,10 +484,7 @@
|
|
303 |
"log",
|
304 |
"psr",
|
305 |
"psr-3"
|
306 |
-
]
|
307 |
-
"support": {
|
308 |
-
"source": "https://github.com/php-fig/log/tree/1.1.4"
|
309 |
-
}
|
310 |
},
|
311 |
{
|
312 |
"name": "ralouphie/getallheaders",
|
@@ -348,11 +526,89 @@
|
|
348 |
"email": "ralph.khattar@gmail.com"
|
349 |
}
|
350 |
],
|
351 |
-
"description": "A polyfill for getallheaders."
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
},
|
357 |
{
|
358 |
"name": "wikimedia/composer-merge-plugin",
|
@@ -404,5 +660,55 @@
|
|
404 |
}
|
405 |
],
|
406 |
"description": "Composer plugin to merge multiple composer.json files"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
}
|
408 |
]
|
30 |
"MIT"
|
31 |
],
|
32 |
"description": "Promoting container interoperability through standard service providers",
|
33 |
+
"homepage": "https://github.com/container-interop/service-provider"
|
|
|
|
|
|
|
|
|
34 |
},
|
35 |
{
|
36 |
"name": "dhii/collections-interface",
|
143 |
"container"
|
144 |
]
|
145 |
},
|
146 |
+
{
|
147 |
+
"name": "dhii/human-readable-interface",
|
148 |
+
"version": "v0.2.0-alpha1",
|
149 |
+
"version_normalized": "0.2.0.0-alpha1",
|
150 |
+
"source": {
|
151 |
+
"type": "git",
|
152 |
+
"url": "https://github.com/Dhii/human-readable-interface.git",
|
153 |
+
"reference": "2b49d664f117faf72fb7af402ad21c0c27c62b6b"
|
154 |
+
},
|
155 |
+
"dist": {
|
156 |
+
"type": "zip",
|
157 |
+
"url": "https://api.github.com/repos/Dhii/human-readable-interface/zipball/2b49d664f117faf72fb7af402ad21c0c27c62b6b",
|
158 |
+
"reference": "2b49d664f117faf72fb7af402ad21c0c27c62b6b",
|
159 |
+
"shasum": ""
|
160 |
+
},
|
161 |
+
"require": {
|
162 |
+
"php": "^7.1 | ^8.0"
|
163 |
+
},
|
164 |
+
"require-dev": {
|
165 |
+
"phpunit/phpunit": "^6.0 | ^7.0 | ^8.0 | ^9.0",
|
166 |
+
"slevomat/coding-standard": "^6.0",
|
167 |
+
"symfony/polyfill-php80": "^1.19",
|
168 |
+
"vimeo/psalm": "^3.11.7 | ^4.0"
|
169 |
+
},
|
170 |
+
"suggest": {
|
171 |
+
"dhii/i18n-interface": "For internationalizing and translating human readable strings.",
|
172 |
+
"symfony/polyfill-php80": "To add Stringable interface"
|
173 |
+
},
|
174 |
+
"time": "2021-03-05T00:36:01+00:00",
|
175 |
+
"type": "library",
|
176 |
+
"extra": {
|
177 |
+
"branch-alias": {
|
178 |
+
"dev-develop": "0.1.x-dev"
|
179 |
+
}
|
180 |
+
},
|
181 |
+
"installation-source": "dist",
|
182 |
+
"autoload": {
|
183 |
+
"psr-4": {
|
184 |
+
"Dhii\\Util\\String\\": "src"
|
185 |
+
}
|
186 |
+
},
|
187 |
+
"notification-url": "https://packagist.org/downloads/",
|
188 |
+
"license": [
|
189 |
+
"MIT"
|
190 |
+
],
|
191 |
+
"authors": [
|
192 |
+
{
|
193 |
+
"name": "Dhii Team",
|
194 |
+
"email": "development@dhii.co"
|
195 |
+
}
|
196 |
+
],
|
197 |
+
"description": "Interfaces for human readable string interoperation."
|
198 |
+
},
|
199 |
{
|
200 |
"name": "dhii/module-interface",
|
201 |
"version": "v0.3.0-alpha2",
|
244 |
"email": "development@dhii.co"
|
245 |
}
|
246 |
],
|
247 |
+
"description": "Interfaces for modules"
|
248 |
+
},
|
249 |
+
{
|
250 |
+
"name": "dhii/package-interface",
|
251 |
+
"version": "v0.1.0-alpha4",
|
252 |
+
"version_normalized": "0.1.0.0-alpha4",
|
253 |
+
"source": {
|
254 |
+
"type": "git",
|
255 |
+
"url": "https://github.com/Dhii/package-interface.git",
|
256 |
+
"reference": "bcc73f4285eead9b482dbb89662b723abf49298b"
|
257 |
+
},
|
258 |
+
"dist": {
|
259 |
+
"type": "zip",
|
260 |
+
"url": "https://api.github.com/repos/Dhii/package-interface/zipball/bcc73f4285eead9b482dbb89662b723abf49298b",
|
261 |
+
"reference": "bcc73f4285eead9b482dbb89662b723abf49298b",
|
262 |
+
"shasum": ""
|
263 |
+
},
|
264 |
+
"require": {
|
265 |
+
"dhii/validation-interface": "^0.3-alpha1",
|
266 |
+
"php": "^7.1 | ^8.0"
|
267 |
+
},
|
268 |
+
"require-dev": {
|
269 |
+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
|
270 |
+
"slevomat/coding-standard": "^6.0",
|
271 |
+
"symfony/polyfill-php80": "^1.19",
|
272 |
+
"vimeo/psalm": "^4.4.0"
|
273 |
+
},
|
274 |
+
"time": "2021-12-08T15:57:36+00:00",
|
275 |
+
"type": "library",
|
276 |
+
"installation-source": "dist",
|
277 |
+
"autoload": {
|
278 |
+
"psr-4": {
|
279 |
+
"Dhii\\Package\\": "src"
|
280 |
+
}
|
281 |
+
},
|
282 |
+
"notification-url": "https://packagist.org/downloads/",
|
283 |
+
"license": [
|
284 |
+
"MIT"
|
285 |
+
],
|
286 |
+
"authors": [
|
287 |
+
{
|
288 |
+
"name": "Anton Ukhanev",
|
289 |
+
"email": "xedin.unknown@gmail.com"
|
290 |
+
}
|
291 |
+
],
|
292 |
+
"description": "Interfaces for package-related interop"
|
293 |
+
},
|
294 |
+
{
|
295 |
+
"name": "dhii/validation-interface",
|
296 |
+
"version": "v0.3.0-alpha3",
|
297 |
+
"version_normalized": "0.3.0.0-alpha3",
|
298 |
+
"source": {
|
299 |
+
"type": "git",
|
300 |
+
"url": "https://github.com/Dhii/validation-interface.git",
|
301 |
+
"reference": "0e73c7bf3d2421ceb79331c60a9bc1b1d5eb65a6"
|
302 |
+
},
|
303 |
+
"dist": {
|
304 |
+
"type": "zip",
|
305 |
+
"url": "https://api.github.com/repos/Dhii/validation-interface/zipball/0e73c7bf3d2421ceb79331c60a9bc1b1d5eb65a6",
|
306 |
+
"reference": "0e73c7bf3d2421ceb79331c60a9bc1b1d5eb65a6",
|
307 |
+
"shasum": ""
|
308 |
+
},
|
309 |
+
"require": {
|
310 |
+
"php": "^7.1 | ^8.0"
|
311 |
+
},
|
312 |
+
"require-dev": {
|
313 |
+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
|
314 |
+
"slevomat/coding-standard": "^6.0",
|
315 |
+
"symfony/polyfill-mbstring": "1.20",
|
316 |
+
"symfony/polyfill-php80": "^1.19",
|
317 |
+
"vimeo/psalm": "^3.11.7 | ^4.0"
|
318 |
+
},
|
319 |
+
"time": "2021-01-14T16:19:20+00:00",
|
320 |
+
"type": "library",
|
321 |
+
"extra": {
|
322 |
+
"branch-alias": {
|
323 |
+
"dev-develop": "0.3.x-dev"
|
324 |
+
}
|
325 |
+
},
|
326 |
+
"installation-source": "dist",
|
327 |
+
"autoload": {
|
328 |
+
"psr-4": {
|
329 |
+
"Dhii\\Validation\\": "src/"
|
330 |
+
}
|
331 |
+
},
|
332 |
+
"notification-url": "https://packagist.org/downloads/",
|
333 |
+
"license": [
|
334 |
+
"MIT"
|
335 |
+
],
|
336 |
+
"authors": [
|
337 |
+
{
|
338 |
+
"name": "Anton Ukhanev",
|
339 |
+
"email": "xedin.unknown@gmail.com"
|
340 |
+
}
|
341 |
+
],
|
342 |
+
"description": "A base interface for validators"
|
343 |
+
},
|
344 |
+
{
|
345 |
+
"name": "dhii/versions",
|
346 |
+
"version": "v0.1.0-alpha3",
|
347 |
+
"version_normalized": "0.1.0.0-alpha3",
|
348 |
+
"source": {
|
349 |
+
"type": "git",
|
350 |
+
"url": "https://github.com/Dhii/versions.git",
|
351 |
+
"reference": "120b22b248d0b46e41bac93bf3394516c9d55730"
|
352 |
+
},
|
353 |
+
"dist": {
|
354 |
+
"type": "zip",
|
355 |
+
"url": "https://api.github.com/repos/Dhii/versions/zipball/120b22b248d0b46e41bac93bf3394516c9d55730",
|
356 |
+
"reference": "120b22b248d0b46e41bac93bf3394516c9d55730",
|
357 |
+
"shasum": ""
|
358 |
+
},
|
359 |
+
"require": {
|
360 |
+
"dhii/package-interface": "^0.1.0-alpha3",
|
361 |
+
"php": "^7.1 | ^8.0"
|
362 |
+
},
|
363 |
+
"require-dev": {
|
364 |
+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
|
365 |
+
"slevomat/coding-standard": "^6.0",
|
366 |
+
"symfony/polyfill-php80": "^1.19",
|
367 |
+
"vimeo/psalm": "^4.4.0"
|
368 |
+
},
|
369 |
+
"time": "2021-12-08T16:54:50+00:00",
|
370 |
+
"type": "library",
|
371 |
+
"installation-source": "dist",
|
372 |
+
"autoload": {
|
373 |
+
"psr-4": {
|
374 |
+
"Dhii\\Versions\\": "src"
|
375 |
+
}
|
376 |
+
},
|
377 |
+
"notification-url": "https://packagist.org/downloads/",
|
378 |
+
"license": [
|
379 |
+
"MIT"
|
380 |
+
],
|
381 |
+
"authors": [
|
382 |
+
{
|
383 |
+
"name": "Anton Ukhanev",
|
384 |
+
"email": "xedin.unknown@gmail.com"
|
385 |
+
}
|
386 |
+
],
|
387 |
+
"description": "Implementation for dealing with SemVer-compliant versions"
|
388 |
},
|
389 |
{
|
390 |
"name": "psr/container",
|
435 |
"container-interface",
|
436 |
"container-interop",
|
437 |
"psr"
|
438 |
+
]
|
|
|
|
|
|
|
|
|
439 |
},
|
440 |
{
|
441 |
"name": "psr/log",
|
484 |
"log",
|
485 |
"psr",
|
486 |
"psr-3"
|
487 |
+
]
|
|
|
|
|
|
|
488 |
},
|
489 |
{
|
490 |
"name": "ralouphie/getallheaders",
|
526 |
"email": "ralph.khattar@gmail.com"
|
527 |
}
|
528 |
],
|
529 |
+
"description": "A polyfill for getallheaders."
|
530 |
+
},
|
531 |
+
{
|
532 |
+
"name": "symfony/polyfill-php80",
|
533 |
+
"version": "v1.24.0",
|
534 |
+
"version_normalized": "1.24.0.0",
|
535 |
+
"source": {
|
536 |
+
"type": "git",
|
537 |
+
"url": "https://github.com/symfony/polyfill-php80.git",
|
538 |
+
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
|
539 |
+
},
|
540 |
+
"dist": {
|
541 |
+
"type": "zip",
|
542 |
+
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
|
543 |
+
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
|
544 |
+
"shasum": ""
|
545 |
+
},
|
546 |
+
"require": {
|
547 |
+
"php": ">=7.1"
|
548 |
+
},
|
549 |
+
"time": "2021-09-13T13:58:33+00:00",
|
550 |
+
"type": "library",
|
551 |
+
"extra": {
|
552 |
+
"branch-alias": {
|
553 |
+
"dev-main": "1.23-dev"
|
554 |
+
},
|
555 |
+
"thanks": {
|
556 |
+
"name": "symfony/polyfill",
|
557 |
+
"url": "https://github.com/symfony/polyfill"
|
558 |
+
}
|
559 |
+
},
|
560 |
+
"installation-source": "dist",
|
561 |
+
"autoload": {
|
562 |
+
"files": [
|
563 |
+
"bootstrap.php"
|
564 |
+
],
|
565 |
+
"psr-4": {
|
566 |
+
"Symfony\\Polyfill\\Php80\\": ""
|
567 |
+
},
|
568 |
+
"classmap": [
|
569 |
+
"Resources/stubs"
|
570 |
+
]
|
571 |
+
},
|
572 |
+
"notification-url": "https://packagist.org/downloads/",
|
573 |
+
"license": [
|
574 |
+
"MIT"
|
575 |
+
],
|
576 |
+
"authors": [
|
577 |
+
{
|
578 |
+
"name": "Ion Bazan",
|
579 |
+
"email": "ion.bazan@gmail.com"
|
580 |
+
},
|
581 |
+
{
|
582 |
+
"name": "Nicolas Grekas",
|
583 |
+
"email": "p@tchwork.com"
|
584 |
+
},
|
585 |
+
{
|
586 |
+
"name": "Symfony Community",
|
587 |
+
"homepage": "https://symfony.com/contributors"
|
588 |
+
}
|
589 |
+
],
|
590 |
+
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
591 |
+
"homepage": "https://symfony.com",
|
592 |
+
"keywords": [
|
593 |
+
"compatibility",
|
594 |
+
"polyfill",
|
595 |
+
"portable",
|
596 |
+
"shim"
|
597 |
+
],
|
598 |
+
"funding": [
|
599 |
+
{
|
600 |
+
"url": "https://symfony.com/sponsor",
|
601 |
+
"type": "custom"
|
602 |
+
},
|
603 |
+
{
|
604 |
+
"url": "https://github.com/fabpot",
|
605 |
+
"type": "github"
|
606 |
+
},
|
607 |
+
{
|
608 |
+
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
609 |
+
"type": "tidelift"
|
610 |
+
}
|
611 |
+
]
|
612 |
},
|
613 |
{
|
614 |
"name": "wikimedia/composer-merge-plugin",
|
660 |
}
|
661 |
],
|
662 |
"description": "Composer plugin to merge multiple composer.json files"
|
663 |
+
},
|
664 |
+
{
|
665 |
+
"name": "wp-oop/wordpress-interface",
|
666 |
+
"version": "v0.1.0-alpha2",
|
667 |
+
"version_normalized": "0.1.0.0-alpha2",
|
668 |
+
"source": {
|
669 |
+
"type": "git",
|
670 |
+
"url": "https://github.com/wp-oop/wordpress-interface.git",
|
671 |
+
"reference": "5e40acb49b76702f409bb5bcd2ea5459c9b946f5"
|
672 |
+
},
|
673 |
+
"dist": {
|
674 |
+
"type": "zip",
|
675 |
+
"url": "https://api.github.com/repos/wp-oop/wordpress-interface/zipball/5e40acb49b76702f409bb5bcd2ea5459c9b946f5",
|
676 |
+
"reference": "5e40acb49b76702f409bb5bcd2ea5459c9b946f5",
|
677 |
+
"shasum": ""
|
678 |
+
},
|
679 |
+
"require": {
|
680 |
+
"dhii/human-readable-interface": "^0.2.0-alpha1",
|
681 |
+
"dhii/package-interface": "^0.1-alpha3",
|
682 |
+
"php": "^7.1 | ^8.0"
|
683 |
+
},
|
684 |
+
"require-dev": {
|
685 |
+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
|
686 |
+
"slevomat/coding-standard": "^6.0",
|
687 |
+
"vimeo/psalm": "^4.4.0"
|
688 |
+
},
|
689 |
+
"time": "2021-04-30T09:37:37+00:00",
|
690 |
+
"type": "library",
|
691 |
+
"extra": {
|
692 |
+
"branch-alias": {
|
693 |
+
"dev-task/initial-interfaces": "0.1.x-dev"
|
694 |
+
}
|
695 |
+
},
|
696 |
+
"installation-source": "dist",
|
697 |
+
"autoload": {
|
698 |
+
"psr-4": {
|
699 |
+
"WpOop\\WordPress\\": "src"
|
700 |
+
}
|
701 |
+
},
|
702 |
+
"notification-url": "https://packagist.org/downloads/",
|
703 |
+
"license": [
|
704 |
+
"MIT"
|
705 |
+
],
|
706 |
+
"authors": [
|
707 |
+
{
|
708 |
+
"name": "Anton Ukhanev",
|
709 |
+
"email": "xedin.unknown@gmail.com"
|
710 |
+
}
|
711 |
+
],
|
712 |
+
"description": "Interfaces for interop within WordPress"
|
713 |
}
|
714 |
]
|
vendor/dhii/human-readable-interface/.editorconfig
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
root = true
|
2 |
+
|
3 |
+
[*]
|
4 |
+
end_of_line = lf
|
5 |
+
insert_final_newline = true
|
6 |
+
indent_style = space
|
7 |
+
indent_size = 4
|
8 |
+
|
9 |
+
[*.js]
|
10 |
+
indent_size = 2
|
11 |
+
|
12 |
+
[*.json]
|
13 |
+
indent_size = 2
|
14 |
+
|
15 |
+
[*.yml]
|
16 |
+
indent_size = 2
|
vendor/dhii/human-readable-interface/.env
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
BASE_PATH=./
|
2 |
+
BUILD_ROOT_PATH=/app/
|
3 |
+
PROJECT_NAME=dhii_delimited-token-template
|
4 |
+
|
5 |
+
PHP_BUILD_VERSION=7.1
|
6 |
+
PHP_TEST_VERSION=7.1
|
7 |
+
|
8 |
+
HOST_IP_ADDRESS=127.0.0.1
|
vendor/dhii/human-readable-interface/.env.example
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
BASE_PATH=./
|
2 |
+
BUILD_ROOT_PATH=/app/
|
3 |
+
PROJECT_NAME=dhii_delimited-token-template
|
4 |
+
|
5 |
+
PHP_BUILD_VERSION=7.1
|
6 |
+
PHP_TEST_VERSION=7.1
|
7 |
+
|
8 |
+
HOST_IP_ADDRESS=127.0.0.1
|
vendor/dhii/human-readable-interface/CHANGELOG.md
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
## [[*next-version*]] - YYYY-MM-DD
|
8 |
+
|
9 |
+
## [0.2.0-alpha1] - 2021-05-03
|
10 |
+
### Removed
|
11 |
+
- Support for older PHP versions. Now requires at least PHP 7.1 (#2).
|
12 |
+
|
13 |
+
### Added
|
14 |
+
- Support for PHP 8.
|
15 |
+
|
16 |
+
### Changed
|
17 |
+
- Now using native `Stringable` rather than proprietary standard.
|
18 |
+
This requires pre-PHP-8 projects to use a polyfill.
|
19 |
+
|
20 |
+
## [0.1.0] - 2020-05-14
|
21 |
+
Initial version.
|
vendor/dhii/human-readable-interface/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) 2017 Dhii Team
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is
|
8 |
+
furnished to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in all
|
11 |
+
copies or substantial portions of the Software.
|
12 |
+
|
13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19 |
+
SOFTWARE.
|
vendor/dhii/human-readable-interface/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Human Readable Interface
|
2 |
+
[![Continuous Integration](https://github.com/Dhii/human-readable-interface/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/Dhii/human-readable-interface/actions/workflows/continuous-integration.yml)
|
3 |
+
[![Latest Stable Version](https://poser.pugx.org/dhii/human-readable-interface/version)](https://packagist.org/packages/dhii/human-readable-interface)
|
4 |
+
[![Latest Unstable Version](https://poser.pugx.org/dhii/human-readable-interface/v/unstable)](//packagist.org/packages/dhii/human-readable-interface)
|
5 |
+
|
6 |
+
Interfaces for human-readable string interoperation.
|
7 |
+
|
8 |
+
## Details
|
9 |
+
Use the interfaces in this package to represent things that expose
|
10 |
+
human-readable strings. Then perhaps base rendering logic on them.
|
11 |
+
|
12 |
+
## Interfaces
|
13 |
+
- [`CaptionAwareInterface`][] - Something that has a caption.
|
14 |
+
Usually a descriptive sub-heading. Perhaps for images.
|
15 |
+
- [`DescriptionAwareInterface`][] - Something that has a description.
|
16 |
+
Should describe the object. Settings fields usually use this.
|
17 |
+
- [`LabelAwareInterface`][] - Something that has a label.
|
18 |
+
This is something that visually names the object. Setting fields
|
19 |
+
usually use this, or maybe a tab or a menu item
|
20 |
+
- [`MessageAwareInterface`][] - Something that has a message.
|
21 |
+
Perhaps a notification object.
|
22 |
+
- [`TitleAwareInterface`][] - Something that has a title.
|
23 |
+
Could be page.
|
24 |
+
|
25 |
+
|
26 |
+
[`CaptionAwareInterface`]: src/CaptionAwareInterface.php
|
27 |
+
[`DescriptionAwareInterface`]: src/DescriptionAwareInterface.php
|
28 |
+
[`LabelAwareInterface`]: src/LabelAwareInterface.php
|
29 |
+
[`MessageAwareInterface`]: src/MessageAwareInterface.php
|
30 |
+
[`TitleAwareInterface`]: src/TitleAwareInterface.php
|
vendor/dhii/human-readable-interface/composer.json
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "dhii/human-readable-interface",
|
3 |
+
"description": "Interfaces for human readable string interoperation.",
|
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 |
+
"prefer-stable": true,
|
14 |
+
"require": {
|
15 |
+
"php": "^7.1 | ^8.0"
|
16 |
+
},
|
17 |
+
"require-dev": {
|
18 |
+
"phpunit/phpunit": "^6.0 | ^7.0 | ^8.0 | ^9.0",
|
19 |
+
"vimeo/psalm": "^3.11.7 | ^4.0",
|
20 |
+
"slevomat/coding-standard": "^6.0",
|
21 |
+
"symfony/polyfill-php80": "^1.19"
|
22 |
+
},
|
23 |
+
"suggest": {
|
24 |
+
"dhii/i18n-interface": "For internationalizing and translating human readable strings.",
|
25 |
+
"symfony/polyfill-php80": "To add Stringable interface"
|
26 |
+
},
|
27 |
+
"autoload": {
|
28 |
+
"psr-4": {
|
29 |
+
"Dhii\\Util\\String\\": "src"
|
30 |
+
}
|
31 |
+
},
|
32 |
+
"autoload-dev": {
|
33 |
+
"psr-4": {
|
34 |
+
"Dhii\\Util\\String\\FuncTest\\": "tests/functional"
|
35 |
+
}
|
36 |
+
},
|
37 |
+
"scripts": {
|
38 |
+
"test": "phpunit",
|
39 |
+
"csfix": "php-cs-fixer fix -vvv"
|
40 |
+
},
|
41 |
+
"extra": {
|
42 |
+
"branch-alias": {
|
43 |
+
"dev-develop": "0.1.x-dev"
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
vendor/dhii/human-readable-interface/docker-compose.yml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
extra_hosts:
|
19 |
+
- "host.docker.internal:${HOST_IP_ADDRESS}"
|
20 |
+
build:
|
21 |
+
context: ./
|
22 |
+
dockerfile: docker/Dockerfile
|
23 |
+
target: test
|
24 |
+
args:
|
25 |
+
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
|
26 |
+
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
|
27 |
+
PHP_TEST_VERSION: $PHP_TEST_VERSION
|
28 |
+
container_name: "${PROJECT_NAME}_test"
|
29 |
+
working_dir: ${BUILD_ROOT_PATH}
|
30 |
+
volumes:
|
31 |
+
- ${BASE_PATH}:${BUILD_ROOT_PATH}
|
vendor/dhii/human-readable-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.7.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/human-readable-interface/phpcs.xml.dist
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
<type>warning</type>
|
14 |
+
</rule>
|
15 |
+
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
|
16 |
+
<type>warning</type>
|
17 |
+
</rule>
|
18 |
+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
|
19 |
+
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
|
20 |
+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
21 |
+
<properties>
|
22 |
+
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
|
23 |
+
<property name="newlinesCountAfterDeclare" value="2"/>
|
24 |
+
<property name="spacesCountAroundEqualsSign" value="0"/>
|
25 |
+
</properties>
|
26 |
+
</rule>
|
27 |
+
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
|
28 |
+
<properties>
|
29 |
+
<property name="groups" type="array">
|
30 |
+
<element value="uses"/>
|
31 |
+
|
32 |
+
<!-- Public constants are first but you don't care about the order of protected or private constants -->
|
33 |
+
<element value="public constants"/>
|
34 |
+
<element value="constants"/>
|
35 |
+
|
36 |
+
<!-- You don't care about the order among the properties. The same can be done with "properties" shortcut -->
|
37 |
+
<element value="public properties, protected properties, private properties, properties"/>
|
38 |
+
|
39 |
+
<!-- Constructor is first, then all public methods, then protected/private methods and magic methods are last -->
|
40 |
+
<element value="constructor"/>
|
41 |
+
<element value="all public methods"/>
|
42 |
+
<element value="methods"/>
|
43 |
+
<element value="magic methods"/>
|
44 |
+
</property>
|
45 |
+
</properties>
|
46 |
+
</rule>
|
47 |
+
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch"/>
|
48 |
+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
|
49 |
+
<rule ref="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall"/>
|
50 |
+
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
|
51 |
+
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
|
52 |
+
</ruleset>
|
vendor/dhii/human-readable-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="functional">
|
12 |
+
<directory>tests/functional</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/human-readable-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/human-readable-interface/src/CaptionAwareInterface.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Util\String;
|
6 |
+
|
7 |
+
use Stringable;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Something that is aware of a caption.
|
11 |
+
*/
|
12 |
+
interface CaptionAwareInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Retrieves the caption related to this instance.
|
16 |
+
*
|
17 |
+
* A caption is a human-readable string that provides a brief description for some element.
|
18 |
+
* It typically accompanies some illustration or screen fragment.
|
19 |
+
*
|
20 |
+
* @return string|Stringable
|
21 |
+
*/
|
22 |
+
public function getCaption();
|
23 |
+
}
|
vendor/dhii/human-readable-interface/src/DescriptionAwareInterface.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Util\String;
|
6 |
+
|
7 |
+
use Stringable;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Something that is aware of a description.
|
11 |
+
*/
|
12 |
+
interface DescriptionAwareInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Retrieves the description related to this instance.
|
16 |
+
*
|
17 |
+
* A description is a human readable string that provides verbose explanation, additional information,
|
18 |
+
* instructions, and/or context.
|
19 |
+
*
|
20 |
+
* @return string|Stringable
|
21 |
+
*/
|
22 |
+
public function getDescription();
|
23 |
+
}
|
vendor/dhii/human-readable-interface/src/LabelAwareInterface.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Util\String;
|
6 |
+
|
7 |
+
use Stringable;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Something that is aware of a label.
|
11 |
+
*/
|
12 |
+
interface LabelAwareInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Retrieves the label related to this instance.
|
16 |
+
*
|
17 |
+
* A label is a relatively short human readable string that can be used to identify or refer to this instance.
|
18 |
+
*
|
19 |
+
* @return string|Stringable
|
20 |
+
*/
|
21 |
+
public function getLabel();
|
22 |
+
}
|
vendor/dhii/human-readable-interface/src/MessageAwareInterface.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Util\String;
|
6 |
+
|
7 |
+
use Stringable;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Something that is aware of a message.
|
11 |
+
*/
|
12 |
+
interface MessageAwareInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Retrieves the message related to this instance.
|
16 |
+
*
|
17 |
+
* A message is a human-readable string that provides information. It differs from a description in that it is more
|
18 |
+
* intrinsic to the instance. Example: exceptions, notifications, etc.
|
19 |
+
*
|
20 |
+
* @return string|Stringable
|
21 |
+
*/
|
22 |
+
public function getMessage();
|
23 |
+
}
|
vendor/dhii/human-readable-interface/src/TitleAwareInterface.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Util\String;
|
6 |
+
|
7 |
+
use Stringable;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Something that is aware of a title.
|
11 |
+
*/
|
12 |
+
interface TitleAwareInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Retrieves the title related to this instance.
|
16 |
+
*
|
17 |
+
* A title is a human-readable string that serves as a heading for some content.
|
18 |
+
*
|
19 |
+
* @return string|Stringable
|
20 |
+
*/
|
21 |
+
public function getTitle();
|
22 |
+
}
|
vendor/dhii/human-readable-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/human-readable-interface/tests/functional/CaptionAwareInterfaceTest.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Util\String\FuncTest;
|
4 |
+
|
5 |
+
use Dhii\Util\String\CaptionAwareInterface as Subject;
|
6 |
+
use PHPUnit\Framework\MockObject\MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
class CaptionAwareInterfaceTest extends TestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Creates a new instance of the test subject.
|
13 |
+
*
|
14 |
+
* @return Subject|MockObject
|
15 |
+
*/
|
16 |
+
public function createInstance()
|
17 |
+
{
|
18 |
+
$mock = $this->getMockBuilder(Subject::class)
|
19 |
+
->getMockForAbstractClass();
|
20 |
+
|
21 |
+
return $mock;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Tests whether a valid instance of the test subject can be created.
|
26 |
+
*/
|
27 |
+
public function testCanBeCreated()
|
28 |
+
{
|
29 |
+
$subject = $this->createInstance();
|
30 |
+
|
31 |
+
$this->assertInstanceOf(
|
32 |
+
Subject::class, $subject,
|
33 |
+
'Subject is not a valid instance'
|
34 |
+
);
|
35 |
+
}
|
36 |
+
}
|
vendor/dhii/human-readable-interface/tests/functional/DescriptionAwareInterfaceTest.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Util\String\FuncTest;
|
4 |
+
|
5 |
+
use Dhii\Util\String\DescriptionAwareInterface as Subject;
|
6 |
+
use PHPUnit\Framework\MockObject\MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
class DescriptionAwareInterfaceTest extends TestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Creates a new instance of the test subject.
|
13 |
+
*
|
14 |
+
* @return Subject|MockObject
|
15 |
+
*/
|
16 |
+
public function createInstance()
|
17 |
+
{
|
18 |
+
$mock = $this->getMockBuilder(Subject::class)
|
19 |
+
->getMockForAbstractClass();
|
20 |
+
|
21 |
+
return $mock;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Tests whether a valid instance of the test subject can be created.
|
26 |
+
*/
|
27 |
+
public function testCanBeCreated()
|
28 |
+
{
|
29 |
+
$subject = $this->createInstance();
|
30 |
+
|
31 |
+
$this->assertInstanceOf(
|
32 |
+
Subject::class, $subject,
|
33 |
+
'Subject is not a valid instance'
|
34 |
+
);
|
35 |
+
}
|
36 |
+
}
|
vendor/dhii/human-readable-interface/tests/functional/LabelAwareInterfaceTest.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Util\String\FuncTest;
|
4 |
+
|
5 |
+
use Dhii\Util\String\LabelAwareInterface as Subject;
|
6 |
+
use PHPUnit\Framework\MockObject\MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
class LabelAwareInterfaceTest extends TestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Creates a new instance of the test subject.
|
13 |
+
*
|
14 |
+
* @return Subject|MockObject
|
15 |
+
*/
|
16 |
+
public function createInstance()
|
17 |
+
{
|
18 |
+
$mock = $this->getMockBuilder(Subject::class)
|
19 |
+
->getMockForAbstractClass();
|
20 |
+
|
21 |
+
return $mock;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Tests whether a valid instance of the test subject can be created.
|
26 |
+
*/
|
27 |
+
public function testCanBeCreated()
|
28 |
+
{
|
29 |
+
$subject = $this->createInstance();
|
30 |
+
|
31 |
+
$this->assertInstanceOf(
|
32 |
+
Subject::class, $subject,
|
33 |
+
'Subject is not a valid instance'
|
34 |
+
);
|
35 |
+
}
|
36 |
+
}
|
vendor/dhii/human-readable-interface/tests/functional/MessageAwareInterfaceTest.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Util\String\FuncTest;
|
4 |
+
|
5 |
+
use Dhii\Util\String\MessageAwareInterface as Subject;
|
6 |
+
use PHPUnit\Framework\MockObject\MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
class MessageAwareInterfaceTest extends TestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Creates a new instance of the test subject.
|
13 |
+
*
|
14 |
+
* @return Subject|MockObject
|
15 |
+
*/
|
16 |
+
public function createInstance()
|
17 |
+
{
|
18 |
+
$mock = $this->getMockBuilder(Subject::class)
|
19 |
+
->getMockForAbstractClass();
|
20 |
+
|
21 |
+
return $mock;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Tests whether a valid instance of the test subject can be created.
|
26 |
+
*/
|
27 |
+
public function testCanBeCreated()
|
28 |
+
{
|
29 |
+
$subject = $this->createInstance();
|
30 |
+
|
31 |
+
$this->assertInstanceOf(
|
32 |
+
Subject::class, $subject,
|
33 |
+
'Subject is not a valid instance'
|
34 |
+
);
|
35 |
+
}
|
36 |
+
}
|
vendor/dhii/human-readable-interface/tests/functional/TitleAwareInterfaceTest.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Util\String\FuncTest;
|
4 |
+
|
5 |
+
use Dhii\Util\String\TitleAwareInterface as Subject;
|
6 |
+
use PHPUnit\Framework\MockObject\MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
class TitleAwareInterfaceTest extends TestCase
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Creates a new instance of the test subject.
|
13 |
+
*
|
14 |
+
* @return Subject|MockObject
|
15 |
+
*/
|
16 |
+
public function createInstance()
|
17 |
+
{
|
18 |
+
$mock = $this->getMockBuilder(Subject::class)
|
19 |
+
->getMockForAbstractClass();
|
20 |
+
|
21 |
+
return $mock;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Tests whether a valid instance of the test subject can be created.
|
26 |
+
*
|
27 |
+
* @since [*next-version*]
|
28 |
+
*/
|
29 |
+
public function testCanBeCreated()
|
30 |
+
{
|
31 |
+
$subject = $this->createInstance();
|
32 |
+
|
33 |
+
$this->assertInstanceOf(
|
34 |
+
Subject::class, $subject,
|
35 |
+
'Subject is not a valid instance'
|
36 |
+
);
|
37 |
+
}
|
38 |
+
}
|
vendor/dhii/package-interface/src/PackageInterface.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Package;
|
6 |
+
|
7 |
+
use Exception;
|
8 |
+
use Dhii\Package\Version\VersionInterface;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Represents a software package.
|
12 |
+
*/
|
13 |
+
interface PackageInterface
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Retrieves the package name.
|
17 |
+
*
|
18 |
+
* @return string The unique package name.
|
19 |
+
* All lowercase alphanumeric characters, '.', '_', '-'. Also, a '/' is used to separate the vendor.
|
20 |
+
*
|
21 |
+
* @throws Exception If problem retrieving.
|
22 |
+
*/
|
23 |
+
public function getName(): string;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Retrieves the package version.
|
27 |
+
*
|
28 |
+
* @return VersionInterface The SemVer-compliant package version.
|
29 |
+
*
|
30 |
+
* @throws Exception If problem retrieving.
|
31 |
+
*/
|
32 |
+
public function getVersion(): VersionInterface;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Retrieves the path to the package base directory.
|
36 |
+
*
|
37 |
+
* @return string The absolute path to the base directory of the package.
|
38 |
+
*
|
39 |
+
* @throws Exception If problem retrieving.
|
40 |
+
*/
|
41 |
+
public function getBaseDir(): string;
|
42 |
+
}
|
vendor/dhii/package-interface/src/Version/Constraint/Exception/ConstraintFailedExceptionInterface.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Package\Version\Constraint\Exception;
|
6 |
+
|
7 |
+
use Dhii\Validation\Exception\ValidationFailedExceptionInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Represents a case when a version does not match a constraint.
|
11 |
+
*/
|
12 |
+
interface ConstraintFailedExceptionInterface extends ValidationFailedExceptionInterface
|
13 |
+
{
|
14 |
+
}
|
vendor/dhii/package-interface/src/Version/Constraint/VersionConstraintInterface.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Package\Version\Constraint;
|
6 |
+
|
7 |
+
use Dhii\Package\Version\Constraint\Exception\ConstraintFailedExceptionInterface;
|
8 |
+
use Dhii\Package\Version\VersionInterface;
|
9 |
+
use Dhii\Validation\ValidatorInterface;
|
10 |
+
use Exception;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Represents a version constraint.
|
14 |
+
*/
|
15 |
+
interface VersionConstraintInterface extends ValidatorInterface
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Validates a package version.
|
19 |
+
*
|
20 |
+
* @param VersionInterface|mixed $version The version to validate.
|
21 |
+
*
|
22 |
+
* @throws ConstraintFailedExceptionInterface If version does not match this constraint.
|
23 |
+
* @throws Exception If problem validating.
|
24 |
+
*/
|
25 |
+
public function validate($version): void;
|
26 |
+
}
|
vendor/dhii/package-interface/src/Version/StringVersionFactoryInterface.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Package\Version;
|
6 |
+
|
7 |
+
use DomainException;
|
8 |
+
use Exception;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Represents a factory that can create a version from a version string.
|
12 |
+
*/
|
13 |
+
interface StringVersionFactoryInterface
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Creates a new version from a version string.
|
17 |
+
*
|
18 |
+
* @param string $version The SemVer compatible version string.
|
19 |
+
*
|
20 |
+
* @return VersionInterface The new version.
|
21 |
+
*
|
22 |
+
* @throws DomainException If version string is malformed.
|
23 |
+
* @throws Exception If problem creating.
|
24 |
+
*/
|
25 |
+
public function createVersionFromString(string $version): VersionInterface;
|
26 |
+
}
|
vendor/dhii/package-interface/src/Version/VersionInterface.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Package\Version;
|
6 |
+
|
7 |
+
use Exception;
|
8 |
+
use Stringable;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Represents a SemVer-compliant version.
|
12 |
+
*/
|
13 |
+
interface VersionInterface extends Stringable
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Retrieves the version's major number.
|
17 |
+
*
|
18 |
+
* @return int The major number.
|
19 |
+
*
|
20 |
+
* @throws Exception If problem retrieving.
|
21 |
+
*/
|
22 |
+
public function getMajor(): int;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Retrieves the version's minor number.
|
26 |
+
*
|
27 |
+
* @return int The minor number.
|
28 |
+
*
|
29 |
+
* @throws Exception If problem retrieving.
|
30 |
+
*/
|
31 |
+
public function getMinor(): int;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Retrieves the version's patch number.
|
35 |
+
*
|
36 |
+
* @return int The patch number.
|
37 |
+
*
|
38 |
+
* @throws Exception If problem retrieving.
|
39 |
+
*/
|
40 |
+
public function getPatch(): int;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Retrieves the version's pre-release identifier.
|
44 |
+
*
|
45 |
+
* @return string[] A list of identifiers.
|
46 |
+
* Each is a non-empty alphanumeric+hyphen string.
|
47 |
+
* If numeric, has no leading zeroes.
|
48 |
+
*
|
49 |
+
* @throws Exception If problem retrieving.
|
50 |
+
*/
|
51 |
+
public function getPreRelease(): array;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Retrieves the version's build metadata.
|
55 |
+
*
|
56 |
+
* @return string[] A series of identifiers.
|
57 |
+
* Each is a non-empty alphanumeric+hyphen string.
|
58 |
+
*
|
59 |
+
* @throws Exception If problem retrieving.
|
60 |
+
*/
|
61 |
+
public function getBuild(): array;
|
62 |
+
}
|
vendor/dhii/validation-interface/.env.example
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
BASE_PATH=./
|
2 |
+
BUILD_ROOT_PATH=/app/
|
3 |
+
PROJECT_NAME=dhii_validation-interface
|
4 |
+
|
5 |
+
PHP_BUILD_VERSION=7.0
|
6 |
+
PHP_TEST_VERSION=7.0
|
vendor/dhii/validation-interface/CHANGELOG.md
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
## [[*next-version*]] - YYYY-MM-DD
|
8 |
+
|
9 |
+
## [0.3.0-alpha3] - 2021-01-14
|
10 |
+
### Removed
|
11 |
+
- `ValidationExceptionInterface` was redundant, and burdened implementations.
|
12 |
+
- `ValidatorInterface#validate()` must now throw `RuntimeException` instead of `ValidationExceptionInterface`.
|
13 |
+
|
14 |
+
## [0.3.0-alpha2] - 2021-01-14
|
15 |
+
### Added
|
16 |
+
- `ValidatorInterface#validate()` now has explicit `void` return type.
|
17 |
+
|
18 |
+
### Changed
|
19 |
+
- Updated and added missing configs.
|
20 |
+
- Allowing PHP 8.
|
21 |
+
- Now _updating_ composer deps in CI, proving that this package is in fact installable on all target versions.
|
22 |
+
- Using newer Psalm.
|
23 |
+
|
24 |
+
### Removed
|
25 |
+
- No longer depends on Dhii `Stringable` interface. Instead, using Symfony Polyfill for testing.
|
26 |
+
This is recommended for use by consuming projects in cases when working PHP lower than 8.
|
27 |
+
|
28 |
+
## [0.3.0-alpha1] - 2020-05-14
|
29 |
+
### Removed
|
30 |
+
- `SpecAwareInterface`.
|
31 |
+
- `ValidatorFactoryInterface`.
|
32 |
+
- `SubjectAwareInterface`.
|
33 |
+
- `ValidatorAwareInterface`.
|
34 |
+
- `@since` tags everywhere.
|
35 |
+
- Support for PHP < 7.1.
|
36 |
+
|
37 |
+
### Changed
|
38 |
+
- `ValidationFailedExceptionInterface::getSubject()` is now `getValidationSubject().
|
39 |
+
|
40 |
+
## [0.2] - 2018-08-29
|
41 |
+
Stable release. No code changed.
|
42 |
+
|
43 |
+
## [0.2-alpha2] - 2018-03-07
|
44 |
+
### Added
|
45 |
+
- `ValidatorFactoryInterface`
|
46 |
+
|
47 |
+
### Changed
|
48 |
+
- Using newer version of `dhii/exception-interface`
|
49 |
+
|
50 |
+
### Removed
|
51 |
+
- `SpecValidatorInterface`
|
52 |
+
|
53 |
+
### Fixed
|
54 |
+
- Added missing import for `Traversable` in `SpecAwareInterface`
|
55 |
+
|
56 |
+
## [0.2-alpha1] - 2018-03-06
|
57 |
+
### Added
|
58 |
+
- `SpecValidatorInterface`.
|
59 |
+
- `SpecAwareInterface`.
|
60 |
+
- `SubjectAwareInterface`.
|
61 |
+
- `ValidatorAwareInterface`.
|
62 |
+
|
63 |
+
## [0.1] - 2017-03-09
|
64 |
+
Initial release, containing validator and exception interfaces.
|
vendor/dhii/validation-interface/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2016-2017 Dhii
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
vendor/dhii/validation-interface/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Dhii - Validation - Interface
|
2 |
+
|
3 |
+
[![Build Status](https://travis-ci.org/Dhii/validation-interface.svg?branch=develop)](https://travis-ci.org/Dhii/validation-interface)
|
4 |
+
[![Code Climate](https://codeclimate.com/github/Dhii/validation-interface/badges/gpa.svg)](https://codeclimate.com/github/Dhii/validation-interface)
|
5 |
+
[![Latest Stable Version](https://poser.pugx.org/dhii/validation-interface/version)](https://packagist.org/packages/dhii/validation-interface)
|
6 |
+
|
7 |
+
Simple interface for most basic validator implementations.
|
8 |
+
|
9 |
+
## Details
|
10 |
+
This package aims to standardize validators, so as to make consuming code
|
11 |
+
compatible with a wide variety of validator implementations. Validation is such
|
12 |
+
a common task that being able to validate in an interoperable way is extremely
|
13 |
+
useful. Interfaces in this package aim to fix that by providing a common
|
14 |
+
validation entry point on one side, and standards-compliant validation error
|
15 |
+
exceptions on the other. This allow developers to take advantage of exception
|
16 |
+
"bubbling" and handle validation errors where they think best, as well as
|
17 |
+
to retrieve a list of human-readable validation error messages without knowledge
|
18 |
+
of the validator internals, or prior reference to the validator object. Also,
|
19 |
+
reporting validation failure as an exception is very convenient for cases where
|
20 |
+
it is only possible to continue if a validation subject is valid.
|
21 |
+
|
22 |
+
### Interfaces
|
23 |
+
- [`ValidatorInterface`] - The central interface of the standard. Provides
|
24 |
+
validation entry point (trigger) as `validate()`. Validators MUST implement
|
25 |
+
this interface.
|
26 |
+
- [`ValidationFailedExceptionInterface`] - Occurs when subject fails validation,
|
27 |
+
and reports the failed subject, and the validator that validated the subject,
|
28 |
+
as well as a list of validation error messages.
|
29 |
+
- [`ValidationExceptionInterface`] - Represents an error related to a validator.
|
30 |
+
|
31 |
+
|
32 |
+
[`ValidatorInterface`]: src/ValidatorInterface.php
|
33 |
+
[`ValidationFailedExceptionInterface`]: src/Exception/ValidationFailedExceptionInterface.php
|
34 |
+
[`ValidationExceptionInterface`]: src/Exception/ValidationExceptionInterface.php
|
vendor/dhii/validation-interface/composer.json
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "dhii/validation-interface",
|
3 |
+
"description": "A base interface for validators",
|
4 |
+
"type": "library",
|
5 |
+
"license": "MIT",
|
6 |
+
"authors": [
|
7 |
+
{
|
8 |
+
"name": "Anton Ukhanev",
|
9 |
+
"email": "xedin.unknown@gmail.com"
|
10 |
+
}
|
11 |
+
],
|
12 |
+
"minimum-stability": "dev",
|
13 |
+
"prefer-stable": true,
|
14 |
+
"require": {
|
15 |
+
"php": "^7.1 | ^8.0"
|
16 |
+
},
|
17 |
+
"require-dev": {
|
18 |
+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
|
19 |
+
"vimeo/psalm": "^3.11.7 | ^4.0",
|
20 |
+
"slevomat/coding-standard": "^6.0",
|
21 |
+
"symfony/polyfill-mbstring": "1.20",
|
22 |
+
"symfony/polyfill-php80": "^1.19"
|
23 |
+
},
|
24 |
+
"autoload": {
|
25 |
+
"psr-4": {
|
26 |
+
"Dhii\\Validation\\": "src/"
|
27 |
+
}
|
28 |
+
},
|
29 |
+
"autoload-dev": {
|
30 |
+
"psr-4": {
|
31 |
+
"Dhii\\Validation\\UnitTest\\": "tests/unit"
|
32 |
+
}
|
33 |
+
},
|
34 |
+
"scripts": {
|
35 |
+
"test": "phpunit"
|
36 |
+
},
|
37 |
+
"extra": {
|
38 |
+
"branch-alias": {
|
39 |
+
"dev-develop": "0.3.x-dev"
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
vendor/dhii/validation-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/validation-interface/psalm.xml.dist
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
<ignoreFiles>
|
29 |
+
<directory name="vendor"/>
|
30 |
+
</ignoreFiles>
|
31 |
+
</projectFiles>
|
32 |
+
|
33 |
+
<extraFiles>
|
34 |
+
<ignoreFiles>
|
35 |
+
<directory name="vendor/phpunit/php-code-coverage"/>
|
36 |
+
<directory name="vendor/phpspec/prophecy"/>
|
37 |
+
</ignoreFiles>
|
38 |
+
<directory name="vendor" />
|
39 |
+
</extraFiles>
|
40 |
+
|
41 |
+
|
42 |
+
<issueHandlers>
|
43 |
+
<ConflictingReferenceConstraint errorLevel="error"/>
|
44 |
+
<ContinueOutsideLoop errorLevel="error"/>
|
45 |
+
<DuplicateArrayKey errorLevel="error"/>
|
46 |
+
<DuplicateClass errorLevel="error"/>
|
47 |
+
<DuplicateFunction errorLevel="error"/>
|
48 |
+
<DuplicateMethod errorLevel="error"/>
|
49 |
+
<DuplicateParam errorLevel="error"/>
|
50 |
+
<EmptyArrayAccess errorLevel="error"/>
|
51 |
+
<FalsableReturnStatement errorLevel="error"/>
|
52 |
+
<FalseOperand errorLevel="error"/>
|
53 |
+
<ForbiddenCode errorLevel="error"/>
|
54 |
+
<ForbiddenEcho errorLevel="error"/>
|
55 |
+
<InaccessibleClassConstant errorLevel="error"/>
|
56 |
+
<InaccessibleMethod errorLevel="error"/>
|
57 |
+
<InterfaceInstantiation errorLevel="error"/>
|
58 |
+
<InaccessibleProperty errorLevel="error"/>
|
59 |
+
<InternalClass errorLevel="error"/>
|
60 |
+
<InternalMethod errorLevel="error"/>
|
61 |
+
<InternalProperty errorLevel="error"/>
|
62 |
+
<InvalidArgument errorLevel="error"/>
|
63 |
+
<InvalidArrayAccess errorLevel="error"/>
|
64 |
+
<InvalidArrayAssignment errorLevel="error"/>
|
65 |
+
<InvalidArrayOffset errorLevel="error"/>
|
66 |
+
<InvalidCast errorLevel="error"/>
|
67 |
+
<InvalidCatch errorLevel="error"/>
|
68 |
+
<InvalidClass errorLevel="error"/>
|
69 |
+
<InvalidClone errorLevel="error"/>
|
70 |
+
<InvalidFalsableReturnType errorLevel="error"/>
|
71 |
+
<InvalidThrow errorLevel="error"/>
|
72 |
+
<InvalidToString errorLevel="error"/>
|
73 |
+
<LoopInvalidation errorLevel="error"/>
|
74 |
+
<InvalidNullableReturnType errorLevel="error"/>
|
75 |
+
<LessSpecificReturnType errorLevel="error"/>
|
76 |
+
<InvalidGlobal errorLevel="error"/>
|
77 |
+
<InvalidIterator errorLevel="error"/>
|
78 |
+
<InvalidMethodCall errorLevel="error"/>
|
79 |
+
<InvalidFunctionCall errorLevel="error"/>
|
80 |
+
<ImplicitToStringCast errorLevel="error"/>
|
81 |
+
<ImplementedReturnTypeMismatch errorLevel="error"/>
|
82 |
+
<InvalidParamDefault errorLevel="error"/>
|
83 |
+
<InvalidPassByReference errorLevel="error"/>
|
84 |
+
<InvalidPropertyAssignment errorLevel="error"/>
|
85 |
+
<InvalidPropertyAssignmentValue errorLevel="error"/>
|
86 |
+
<InvalidPropertyFetch errorLevel="error"/>
|
87 |
+
<InvalidReturnStatement errorLevel="error"/>
|
88 |
+
<InvalidReturnType errorLevel="error"/>
|
89 |
+
<InvalidScalarArgument errorLevel="error"/>
|
90 |
+
<InvalidScope errorLevel="error"/>
|
91 |
+
<InvalidStaticInvocation errorLevel="error"/>
|
92 |
+
<MissingConstructor errorLevel="error"/>
|
93 |
+
<MissingDependency errorLevel="error"/>
|
94 |
+
<MissingFile errorLevel="error"/>
|
95 |
+
<MixedArgument errorLevel="error"/>
|
96 |
+
<MoreSpecificImplementedParamType errorLevel="error"/>
|
97 |
+
<MoreSpecificReturnType errorLevel="error"/>
|
98 |
+
<NoValue errorLevel="error"/>
|
99 |
+
<NoInterfaceProperties errorLevel="error"/>
|
100 |
+
<NonStaticSelfCall errorLevel="error"/>
|
101 |
+
<NullableReturnStatement errorLevel="error"/>
|
102 |
+
<NullArgument errorLevel="error"/>
|
103 |
+
<NullArrayAccess errorLevel="error"/>
|
104 |
+
<NullArrayOffset errorLevel="error"/>
|
105 |
+
<NullFunctionCall errorLevel="error"/>
|
106 |
+
<NullIterator errorLevel="error"/>
|
107 |
+
<NullOperand errorLevel="error"/>
|
108 |
+
<NullPropertyAssignment errorLevel="error"/>
|
109 |
+
<NullPropertyFetch errorLevel="error"/>
|
110 |
+
<NullReference errorLevel="error"/>
|
111 |
+
<OverriddenMethodAccess errorLevel="error"/>
|
112 |
+
<OverriddenPropertyAccess errorLevel="error"/>
|
113 |
+
<ParadoxicalCondition errorLevel="error"/>
|
114 |
+
<ParentNotFound errorLevel="error"/>
|
115 |
+
<LessSpecificImplementedReturnType errorLevel="error"/>
|
116 |
+
<MissingParamType errorLevel="error"/>
|
117 |
+
<MissingClosureParamType errorLevel="error"/>
|
118 |
+
<MissingClosureReturnType errorLevel="error"/>
|
119 |
+
<MissingPropertyType errorLevel="error"/>
|
120 |
+
<UndefinedConstant errorLevel="error"/>
|
121 |
+
|
122 |
+
<AssignmentToVoid errorLevel="info"/>
|
123 |
+
<DeprecatedClass errorLevel="info"/>
|
124 |
+
<DeprecatedConstant errorLevel="info"/>
|
125 |
+
<DeprecatedTrait errorLevel="info"/>
|
126 |
+
<DocblockTypeContradiction errorLevel="info"/>
|
127 |
+
<InvalidDocblock errorLevel="info"/>
|
128 |
+
<InvalidDocblockParamName errorLevel="info"/>
|
129 |
+
<InvalidTemplateParam errorLevel="info"/>
|
130 |
+
<DeprecatedInterface errorLevel="info"/>
|
131 |
+
<DeprecatedMethod errorLevel="info"/>
|
132 |
+
<DeprecatedProperty errorLevel="info"/>
|
133 |
+
<MethodSignatureMustOmitReturnType errorLevel="info"/>
|
134 |
+
<MismatchingDocblockParamType errorLevel="info"/>
|
135 |
+
<MismatchingDocblockReturnType errorLevel="info"/>
|
136 |
+
<MissingDocblockType errorLevel="info"/>
|
137 |
+
<MissingParamType errorLevel="info"/>
|
138 |
+
<MissingTemplateParam errorLevel="info"/>
|
139 |
+
<MissingThrowsDocblock errorLevel="info"/>
|
140 |
+
<MixedArgumentTypeCoercion errorLevel="info"/>
|
141 |
+
<MixedArrayAccess errorLevel="info"/>
|
142 |
+
<MixedArrayAssignment errorLevel="info"/>
|
143 |
+
<MixedArrayOffset errorLevel="info"/>
|
144 |
+
<MixedArrayTypeCoercion errorLevel="info"/>
|
145 |
+
<MixedAssignment errorLevel="info"/>
|
146 |
+
<MixedFunctionCall errorLevel="info"/>
|
147 |
+
<MixedInferredReturnType errorLevel="info"/>
|
148 |
+
<MixedMethodCall errorLevel="info"/>
|
149 |
+
<MixedOperand errorLevel="info"/>
|
150 |
+
<MixedPropertyAssignment errorLevel="info"/>
|
151 |
+
<MixedPropertyFetch errorLevel="info"/>
|
152 |
+
<MixedPropertyTypeCoercion errorLevel="info"/>
|
153 |
+
<MixedReturnStatement errorLevel="info"/>
|
154 |
+
<MixedReturnTypeCoercion errorLevel="info"/>
|
155 |
+
<MixedStringOffsetAssignment errorLevel="info"/>
|
156 |
+
</issueHandlers>
|
157 |
+
</psalm>
|
vendor/dhii/validation-interface/src/Exception/ValidationFailedExceptionInterface.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Validation\Exception;
|
6 |
+
|
7 |
+
use Stringable;
|
8 |
+
use Exception;
|
9 |
+
use Throwable;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Something that can represent an exception which occurs if a validation
|
13 |
+
* fails.
|
14 |
+
*/
|
15 |
+
interface ValidationFailedExceptionInterface extends Throwable
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Retrieves validation errors that are associated with this instance.
|
19 |
+
*
|
20 |
+
* @return string[]|Stringable[]|iterable A list of errors.
|
21 |
+
* Each error is something that can be treated as a string, and represents
|
22 |
+
* a description of why a validation subject is invalid.
|
23 |
+
*
|
24 |
+
* @throws Exception If problem retrieving.
|
25 |
+
*/
|
26 |
+
public function getValidationErrors(): iterable;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Returns the subject, the validation for which failed.
|
30 |
+
*
|
31 |
+
* @return mixed The subject that was being validated.
|
32 |
+
*
|
33 |
+
* @throws Exception If problem retrieving.
|
34 |
+
*/
|
35 |
+
public function getValidationSubject();
|
36 |
+
}
|
vendor/dhii/validation-interface/src/ValidatorInterface.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Validation;
|
6 |
+
|
7 |
+
use Dhii\Validation\Exception\ValidationFailedExceptionInterface;
|
8 |
+
use RuntimeException;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Something that can validate a value.
|
12 |
+
*/
|
13 |
+
interface ValidatorInterface
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Validates a value.
|
17 |
+
*
|
18 |
+
* @param mixed $value The subject of validation.
|
19 |
+
*
|
20 |
+
* @throws RuntimeException If problem validating.
|
21 |
+
* @throws ValidationFailedExceptionInterface If validation failed. Must extend {@see RuntimeException}.
|
22 |
+
*/
|
23 |
+
public function validate($value): void;
|
24 |
+
}
|
vendor/dhii/validation-interface/tests/bootstrap.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
(function (string $basePath) {
|
4 |
+
$baseDir = dirname($basePath, 2);
|
5 |
+
define('ROOT_DIR', $baseDir);
|
6 |
+
|
7 |
+
/** @noinspection PhpIncludeInspection */
|
8 |
+
require_once "$baseDir/vendor/autoload.php";
|
9 |
+
})(__FILE__);
|
vendor/dhii/validation-interface/tests/unit/Exception/ValidationFailedExceptionInterfaceTest.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Validation\UnitTest\Exception;
|
4 |
+
|
5 |
+
use Dhii\Validation\Exception\ValidationFailedExceptionInterface as Subject;
|
6 |
+
use PHPUnit\Framework\MockObject\MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
use Throwable;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Tests {@see Subject}.
|
12 |
+
*/
|
13 |
+
class ValidationFailedExceptionInterfaceTest extends TestCase
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Creates a new instance of the test subject.
|
17 |
+
*
|
18 |
+
* @return Subject|MockObject
|
19 |
+
*/
|
20 |
+
protected function createSubject(): Subject
|
21 |
+
{
|
22 |
+
$mock = $this->getMockBuilder(Subject::class)
|
23 |
+
->getMock();
|
24 |
+
|
25 |
+
return $mock;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function testInstantiation()
|
29 |
+
{
|
30 |
+
{
|
31 |
+
$subject = $this->createSubject();
|
32 |
+
}
|
33 |
+
|
34 |
+
{
|
35 |
+
$this->assertInstanceOf(Subject::class, $subject);
|
36 |
+
$this->assertInstanceOf(Throwable::class, $subject);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
vendor/dhii/validation-interface/tests/unit/ValidatorInterfaceTest.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Validation\UnitTest;
|
4 |
+
|
5 |
+
use Dhii\Validation\ValidatorInterface as Subject;
|
6 |
+
use PHPUnit\Framework\MockObject\MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Tests {@see Subject}.
|
11 |
+
*/
|
12 |
+
class ValidatorInterfaceTest extends TestCase
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Creates a new instance of the test subject.
|
16 |
+
*
|
17 |
+
* @return Subject|MockObject
|
18 |
+
*/
|
19 |
+
protected function createSubject(): Subject
|
20 |
+
{
|
21 |
+
$mock = $this->getMockBuilder(Subject::class)
|
22 |
+
->getMock();
|
23 |
+
|
24 |
+
return $mock;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function testInstantiation()
|
28 |
+
{
|
29 |
+
{
|
30 |
+
$subject = $this->createSubject();
|
31 |
+
}
|
32 |
+
|
33 |
+
{
|
34 |
+
$this->assertInstanceOf(Subject::class, $subject);
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
vendor/dhii/versions/.editorconfig
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
root = true
|
2 |
+
|
3 |
+
[*]
|
4 |
+
end_of_line = lf
|
5 |
+
insert_final_newline = true
|
6 |
+
indent_style = space
|
7 |
+
indent_size = 4
|
8 |
+
|
9 |
+
[*.js]
|
10 |
+
indent_size = 2
|
11 |
+
|
12 |
+
[*.json]
|
13 |
+
indent_size = 2
|
14 |
+
|
15 |
+
[*.yml]
|
16 |
+
indent_size = 2
|
vendor/dhii/versions/src/StringVersionFactory.php
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Versions;
|
6 |
+
|
7 |
+
use Dhii\Package\Version\StringVersionFactoryInterface;
|
8 |
+
use Dhii\Package\Version\VersionInterface;
|
9 |
+
use DomainException;
|
10 |
+
use Exception;
|
11 |
+
use RangeException;
|
12 |
+
use RuntimeException;
|
13 |
+
use UnexpectedValueException;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @inheritDoc
|
17 |
+
*/
|
18 |
+
class StringVersionFactory implements StringVersionFactoryInterface
|
19 |
+
{
|
20 |
+
protected const SEP_PRERELEASE = '-';
|
21 |
+
protected const SEP_BUILD = '+';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @inheritDoc
|
25 |
+
*/
|
26 |
+
public function createVersionFromString(string $versionString): VersionInterface
|
27 |
+
{
|
28 |
+
try {
|
29 |
+
$components = $this->parseVersion($versionString);
|
30 |
+
$version = new Version(
|
31 |
+
$components['major'],
|
32 |
+
$components['minor'],
|
33 |
+
$components['patch'],
|
34 |
+
$components['pre_release'],
|
35 |
+
$components['build']
|
36 |
+
);
|
37 |
+
} catch (RangeException $e) {
|
38 |
+
throw new DomainException(sprintf('Version string "%1$s" is malformed', $versionString), 0, $e);
|
39 |
+
}
|
40 |
+
|
41 |
+
return $version;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Parses a SemVer-compliant version string into components.
|
46 |
+
*
|
47 |
+
* @param string $version The version string.
|
48 |
+
*
|
49 |
+
* @return array{
|
50 |
+
* major: int,
|
51 |
+
* minor: int,
|
52 |
+
* patch: int,
|
53 |
+
* pre_release: string[],
|
54 |
+
* build: string[]
|
55 |
+
* }
|
56 |
+
*
|
57 |
+
* @throws DomainException If version string is malformed.
|
58 |
+
* @throws Exception If problem parsing.
|
59 |
+
*/
|
60 |
+
protected function parseVersion(string $version): array
|
61 |
+
{
|
62 |
+
$preReleaseSepPos = ($preReleaseSepPos = strpos($version, static::SEP_PRERELEASE)) !== false
|
63 |
+
? $preReleaseSepPos
|
64 |
+
: null;
|
65 |
+
$buildSepPos = ($buildSepPos = strpos($version, static::SEP_BUILD)) !== false
|
66 |
+
? $buildSepPos
|
67 |
+
: null;
|
68 |
+
|
69 |
+
if ($preReleaseSepPos === 0 || $buildSepPos === 0) {
|
70 |
+
throw new DomainException(sprintf('Pre-release or build information in version string "%1$s" must be preceded by at least one version number', $version));
|
71 |
+
}
|
72 |
+
|
73 |
+
$preRelease = '';
|
74 |
+
$build = '';
|
75 |
+
|
76 |
+
$numbers = $this->getSubstring($version, 0, $preReleaseSepPos ?? $buildSepPos);
|
77 |
+
|
78 |
+
if ($preReleaseSepPos) {
|
79 |
+
$preRelease = $this->getSubstring($version, $preReleaseSepPos + 1, $buildSepPos ? $buildSepPos - strlen($numbers) - 1 : $buildSepPos);
|
80 |
+
}
|
81 |
+
|
82 |
+
if ($buildSepPos) {
|
83 |
+
$build = $this->getSubstring($version, $buildSepPos + 1, null);
|
84 |
+
}
|
85 |
+
|
86 |
+
$numbers = strlen($numbers)
|
87 |
+
? explode('.', $numbers, 3)
|
88 |
+
: [];
|
89 |
+
$preRelease = strlen($preRelease)
|
90 |
+
? explode('.', $preRelease)
|
91 |
+
: [];
|
92 |
+
$build = strlen($build)
|
93 |
+
? explode('.', $build)
|
94 |
+
: [];
|
95 |
+
|
96 |
+
$major = $numbers[0] ?? 0;
|
97 |
+
$minor = $numbers[1] ?? 0;
|
98 |
+
$patch = $numbers[2] ?? 0;
|
99 |
+
|
100 |
+
if (!is_numeric($major) || !is_numeric($minor) || !is_numeric($patch)) {
|
101 |
+
throw new DomainException(sprintf('Major, minor, and patch numbers in version string "%1$s" must be numeric', $version));
|
102 |
+
}
|
103 |
+
|
104 |
+
return [
|
105 |
+
'major' => (int) $major,
|
106 |
+
'minor' => (int) $minor,
|
107 |
+
'patch' => (int) $patch,
|
108 |
+
'pre_release' => $preRelease,
|
109 |
+
'build' => $build,
|
110 |
+
];
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Retrieves a string from withing a string.
|
115 |
+
*
|
116 |
+
* @see substr()
|
117 |
+
*
|
118 |
+
* @param string $string The string to get a substring from.
|
119 |
+
* @param int $start The index of the character from which to start the substring, inclusive.
|
120 |
+
* @param int|null $length The length of the substring, or `null` to get the remaining characters.
|
121 |
+
*
|
122 |
+
* @return string The substring.
|
123 |
+
*
|
124 |
+
* @throws RuntimeException If problem retrieving.
|
125 |
+
*/
|
126 |
+
protected function getSubstring(string $string, int $start, ?int $length): string
|
127 |
+
{
|
128 |
+
$substring = is_null($length)
|
129 |
+
? substr($string, $start)
|
130 |
+
: substr($string, $start, $length);
|
131 |
+
|
132 |
+
if (!is_string($substring)) {
|
133 |
+
throw new UnexpectedValueException(
|
134 |
+
sprintf(
|
135 |
+
'Could not extract a substring of a string "%1$d" chars long, starting from "%2$d" for "%3$d" chars',
|
136 |
+
$string,
|
137 |
+
$start,
|
138 |
+
$length ?? 'null'
|
139 |
+
)
|
140 |
+
);
|
141 |
+
}
|
142 |
+
|
143 |
+
return $substring;
|
144 |
+
}
|
145 |
+
}
|
vendor/dhii/versions/src/Version.php
ADDED
@@ -0,0 +1,240 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace Dhii\Versions;
|
6 |
+
|
7 |
+
use Dhii\Package\Version\VersionInterface;
|
8 |
+
use DomainException;
|
9 |
+
use Exception;
|
10 |
+
use RangeException;
|
11 |
+
use RuntimeException;
|
12 |
+
use Stringable;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* A value object containing information about a SemVer-compliant version.
|
16 |
+
*/
|
17 |
+
class Version implements VersionInterface
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* @var int
|
21 |
+
*/
|
22 |
+
protected $major;
|
23 |
+
/**
|
24 |
+
* @var int
|
25 |
+
*/
|
26 |
+
protected $minor;
|
27 |
+
/**
|
28 |
+
* @var int
|
29 |
+
*/
|
30 |
+
protected $patch;
|
31 |
+
/**
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
protected $preRelease;
|
35 |
+
/**
|
36 |
+
* @var string[]
|
37 |
+
*/
|
38 |
+
protected $build;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @param int $major The major version number. See {@see getMajor()}.
|
42 |
+
* @param int $minor The minor version number See {@see getMinor()}.
|
43 |
+
* @param int $patch The patch version number. See {@see getPatch()}.
|
44 |
+
* @param array<string|Stringable> $preRelease A list of pre-release identifiers. See {@see getPreRelease()}.
|
45 |
+
* @param array<string|Stringable> $build A list of build identifiers. See {@see getBuild()}.
|
46 |
+
*
|
47 |
+
* @throws RangeException If an identifier is malformed
|
48 |
+
* @throws Exception If problem creating.
|
49 |
+
*/
|
50 |
+
public function __construct(
|
51 |
+
int $major,
|
52 |
+
int $minor,
|
53 |
+
int $patch,
|
54 |
+
array $preRelease,
|
55 |
+
array $build
|
56 |
+
) {
|
57 |
+
$this->major = $major;
|
58 |
+
$this->minor = $minor;
|
59 |
+
$this->patch = $patch;
|
60 |
+
$this->preRelease = $this->normalizePreRelease($preRelease);
|
61 |
+
$this->build = $this->normalizeBuild($build);
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @inheritDoc
|
66 |
+
*/
|
67 |
+
public function getMajor(): int
|
68 |
+
{
|
69 |
+
return $this->major;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @inheritDoc
|
74 |
+
*/
|
75 |
+
public function getMinor(): int
|
76 |
+
{
|
77 |
+
return $this->minor;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @inheritDoc
|
82 |
+
*/
|
83 |
+
public function getPatch(): int
|
84 |
+
{
|
85 |
+
return $this->patch;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @inheritDoc
|
90 |
+
*/
|
91 |
+
public function getPreRelease(): array
|
92 |
+
{
|
93 |
+
return $this->preRelease;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* @inheritDoc
|
98 |
+
*/
|
99 |
+
public function getBuild(): array
|
100 |
+
{
|
101 |
+
return $this->build;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Normalizes an identifier.
|
106 |
+
*
|
107 |
+
* @param string $identifier The identifier to normalize.
|
108 |
+
* Must be a non-empty alphanumeric+hyphen string.
|
109 |
+
*
|
110 |
+
* @return string An identifier with all disallowed characters removed.
|
111 |
+
*
|
112 |
+
* @throws DomainException If identifier is malformed
|
113 |
+
* @throws Exception If problem normalizing.
|
114 |
+
*/
|
115 |
+
protected function normalizeIdentifier(string $identifier): string
|
116 |
+
{
|
117 |
+
$origIdentifier = $identifier;
|
118 |
+
|
119 |
+
$identifier = $this->replace('![^\d\w-]!', '', $identifier);
|
120 |
+
|
121 |
+
if (!strlen($identifier)) {
|
122 |
+
throw new DomainException(sprintf('Identifier "%1$s" normalized to "%2$s" is empty', $origIdentifier, $identifier));
|
123 |
+
}
|
124 |
+
|
125 |
+
return $identifier;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Normalizes a series of pre-release identifiers.
|
130 |
+
*
|
131 |
+
* Will remove all illegal characters.
|
132 |
+
*
|
133 |
+
* @param iterable|array<string|Stringable> $preRelease The series of identifiers to normalize.
|
134 |
+
* Each is a non-empty alphanumeric+hyphen string.
|
135 |
+
* If numeric, leading zeroes are not allowed.
|
136 |
+
*
|
137 |
+
* @return string[] A series of normalized pre-release identifiers.
|
138 |
+
*
|
139 |
+
* @throws RangeException If could not normalize.
|
140 |
+
* @throws Exception If problem normalizing.
|
141 |
+
*/
|
142 |
+
protected function normalizePreRelease(iterable $preRelease): array
|
143 |
+
{
|
144 |
+
$normalized = [];
|
145 |
+
|
146 |
+
foreach ($preRelease as $idx => $identifier) {
|
147 |
+
$identifier = (string) $identifier;
|
148 |
+
|
149 |
+
try {
|
150 |
+
$identifier = $this->normalizeIdentifier($identifier);
|
151 |
+
} catch (DomainException $e) {
|
152 |
+
throw new RangeException(sprintf('Pre-release identifier #%1$d "%2$s" cannot be normalized', $idx, $identifier), 0, $e);
|
153 |
+
}
|
154 |
+
if (is_numeric($identifier)) {
|
155 |
+
$identifier = (string) intval($identifier);
|
156 |
+
}
|
157 |
+
|
158 |
+
$normalized[] = $identifier;
|
159 |
+
}
|
160 |
+
|
161 |
+
return $normalized;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Normalizes a series of build identifiers.
|
166 |
+
*
|
167 |
+
* Will remove all illegal characters.
|
168 |
+
*
|
169 |
+
* @param iterable|array<string|Stringable> $build The series of identifiers to normalize.
|
170 |
+
* Each is a non-empty alphanumeric+hyphen string.
|
171 |
+
*
|
172 |
+
* @return string[] A series of normalized build identifiers.
|
173 |
+
*
|
174 |
+
* @throws RangeException If could not normalize.
|
175 |
+
* @throws Exception If problem normalizing.
|
176 |
+
*/
|
177 |
+
protected function normalizeBuild(iterable $build): array
|
178 |
+
{
|
179 |
+
$normalized = [];
|
180 |
+
|
181 |
+
foreach ($build as $idx => $identifier) {
|
182 |
+
$identifier = (string) $identifier;
|
183 |
+
|
184 |
+
try {
|
185 |
+
$identifier = $this->normalizeIdentifier($identifier);
|
186 |
+
} catch (DomainException $e) {
|
187 |
+
throw new RangeException(sprintf('Build identifier #%1$d "%2$s" cannot be normalized', $idx, $identifier), 0, $e);
|
188 |
+
}
|
189 |
+
|
190 |
+
$normalized[] = $identifier;
|
191 |
+
}
|
192 |
+
|
193 |
+
return $normalized;
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Replaces occurrences of $pattern in $subject.
|
198 |
+
*
|
199 |
+
* @param string $pattern The pattern to use for replacing.
|
200 |
+
* @param string $replacement The replacement.
|
201 |
+
* @param string $subject The subject.
|
202 |
+
*
|
203 |
+
* @return string The result of replacement.
|
204 |
+
*
|
205 |
+
* @throws Exception If problem replacing.
|
206 |
+
*/
|
207 |
+
protected function replace(string $pattern, string $replacement, string $subject): string
|
208 |
+
{
|
209 |
+
$result = preg_replace($pattern, $replacement, $subject);
|
210 |
+
|
211 |
+
if ($result === null) {
|
212 |
+
$code = preg_last_error();
|
213 |
+
$code = $code ? $code : 0;
|
214 |
+
$message = preg_last_error_msg();
|
215 |
+
$message = !empty($message) ? $message : 'Could not replace';
|
216 |
+
|
217 |
+
throw new RuntimeException($message, $code);
|
218 |
+
}
|
219 |
+
|
220 |
+
return $result;
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* @inheritDoc
|
225 |
+
*/
|
226 |
+
public function __toString()
|
227 |
+
{
|
228 |
+
$version = "{$this->major}.{$this->minor}.{$this->patch}";
|
229 |
+
|
230 |
+
if (count($this->preRelease)) {
|
231 |
+
$version .= '-' . implode('.', $this->preRelease);
|
232 |
+
}
|
233 |
+
|
234 |
+
if (count($this->build)) {
|
235 |
+
$version .= '+' . implode('.', $this->build);
|
236 |
+
}
|
237 |
+
|
238 |
+
return $version;
|
239 |
+
}
|
240 |
+
}
|
vendor/symfony/polyfill-php80/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) 2020 Fabien Potencier
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
8 |
+
to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in all
|
11 |
+
copies or substantial portions of the Software.
|
12 |
+
|
13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 |
+
THE SOFTWARE.
|
vendor/symfony/polyfill-php80/Php80.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of the Symfony package.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Symfony\Polyfill\Php80;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @author Ion Bazan <ion.bazan@gmail.com>
|
16 |
+
* @author Nico Oelgart <nicoswd@gmail.com>
|
17 |
+
* @author Nicolas Grekas <p@tchwork.com>
|
18 |
+
*
|
19 |
+
* @internal
|
20 |
+
*/
|
21 |
+
final class Php80
|
22 |
+
{
|
23 |
+
public static function fdiv(float $dividend, float $divisor): float
|
24 |
+
{
|
25 |
+
return @($dividend / $divisor);
|
26 |
+
}
|
27 |
+
|
28 |
+
public static function get_debug_type($value): string
|
29 |
+
{
|
30 |
+
switch (true) {
|
31 |
+
case null === $value: return 'null';
|
32 |
+
case \is_bool($value): return 'bool';
|
33 |
+
case \is_string($value): return 'string';
|
34 |
+
case \is_array($value): return 'array';
|
35 |
+
case \is_int($value): return 'int';
|
36 |
+
case \is_float($value): return 'float';
|
37 |
+
case \is_object($value): break;
|
38 |
+
case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class';
|
39 |
+
default:
|
40 |
+
if (null === $type = @get_resource_type($value)) {
|
41 |
+
return 'unknown';
|
42 |
+
}
|
43 |
+
|
44 |
+
if ('Unknown' === $type) {
|
45 |
+
$type = 'closed';
|
46 |
+
}
|
47 |
+
|
48 |
+
return "resource ($type)";
|
49 |
+
}
|
50 |
+
|
51 |
+
$class = \get_class($value);
|
52 |
+
|
53 |
+
if (false === strpos($class, '@')) {
|
54 |
+
return $class;
|
55 |
+
}
|
56 |
+
|
57 |
+
return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous';
|
58 |
+
}
|
59 |
+
|
60 |
+
public static function get_resource_id($res): int
|
61 |
+
{
|
62 |
+
if (!\is_resource($res) && null === @get_resource_type($res)) {
|
63 |
+
throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res)));
|
64 |
+
}
|
65 |
+
|
66 |
+
return (int) $res;
|
67 |
+
}
|
68 |
+
|
69 |
+
public static function preg_last_error_msg(): string
|
70 |
+
{
|
71 |
+
switch (preg_last_error()) {
|
72 |
+
case \PREG_INTERNAL_ERROR:
|
73 |
+
return 'Internal error';
|
74 |
+
case \PREG_BAD_UTF8_ERROR:
|
75 |
+
return 'Malformed UTF-8 characters, possibly incorrectly encoded';
|
76 |
+
case \PREG_BAD_UTF8_OFFSET_ERROR:
|
77 |
+
return 'The offset did not correspond to the beginning of a valid UTF-8 code point';
|
78 |
+
case \PREG_BACKTRACK_LIMIT_ERROR:
|
79 |
+
return 'Backtrack limit exhausted';
|
80 |
+
case \PREG_RECURSION_LIMIT_ERROR:
|
81 |
+
return 'Recursion limit exhausted';
|
82 |
+
case \PREG_JIT_STACKLIMIT_ERROR:
|
83 |
+
return 'JIT stack limit exhausted';
|
84 |
+
case \PREG_NO_ERROR:
|
85 |
+
return 'No error';
|
86 |
+
default:
|
87 |
+
return 'Unknown error';
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
public static function str_contains(string $haystack, string $needle): bool
|
92 |
+
{
|
93 |
+
return '' === $needle || false !== strpos($haystack, $needle);
|
94 |
+
}
|
95 |
+
|
96 |
+
public static function str_starts_with(string $haystack, string $needle): bool
|
97 |
+
{
|
98 |
+
return 0 === strncmp($haystack, $needle, \strlen($needle));
|
99 |
+
}
|
100 |
+
|
101 |
+
public static function str_ends_with(string $haystack, string $needle): bool
|
102 |
+
{
|
103 |
+
return '' === $needle || ('' !== $haystack && 0 === substr_compare($haystack, $needle, -\strlen($needle)));
|
104 |
+
}
|
105 |
+
}
|
vendor/symfony/polyfill-php80/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Symfony Polyfill / Php80
|
2 |
+
========================
|
3 |
+
|
4 |
+
This component provides features added to PHP 8.0 core:
|
5 |
+
|
6 |
+
- `Stringable` interface
|
7 |
+
- [`fdiv`](https://php.net/fdiv)
|
8 |
+
- `ValueError` class
|
9 |
+
- `UnhandledMatchError` class
|
10 |
+
- `FILTER_VALIDATE_BOOL` constant
|
11 |
+
- [`get_debug_type`](https://php.net/get_debug_type)
|
12 |
+
- [`preg_last_error_msg`](https://php.net/preg_last_error_msg)
|
13 |
+
- [`str_contains`](https://php.net/str_contains)
|
14 |
+
- [`str_starts_with`](https://php.net/str_starts_with)
|
15 |
+
- [`str_ends_with`](https://php.net/str_ends_with)
|
16 |
+
- [`get_resource_id`](https://php.net/get_resource_id)
|
17 |
+
|
18 |
+
More information can be found in the
|
19 |
+
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
|
20 |
+
|
21 |
+
License
|
22 |
+
=======
|
23 |
+
|
24 |
+
This library is released under the [MIT license](LICENSE).
|
vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
#[Attribute(Attribute::TARGET_CLASS)]
|
4 |
+
final class Attribute
|
5 |
+
{
|
6 |
+
public const TARGET_CLASS = 1;
|
7 |
+
public const TARGET_FUNCTION = 2;
|
8 |
+
public const TARGET_METHOD = 4;
|
9 |
+
public const TARGET_PROPERTY = 8;
|
10 |
+
public const TARGET_CLASS_CONSTANT = 16;
|
11 |
+
public const TARGET_PARAMETER = 32;
|
12 |
+
public const TARGET_ALL = 63;
|
13 |
+
public const IS_REPEATABLE = 64;
|
14 |
+
|
15 |
+
/** @var int */
|
16 |
+
public $flags;
|
17 |
+
|
18 |
+
public function __construct(int $flags = self::TARGET_ALL)
|
19 |
+
{
|
20 |
+
$this->flags = $flags;
|
21 |
+
}
|
22 |
+
}
|
vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (\PHP_VERSION_ID < 80000) {
|
4 |
+
interface Stringable
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* @return string
|
8 |
+
*/
|
9 |
+
public function __toString();
|
10 |
+
}
|
11 |
+
}
|
vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (\PHP_VERSION_ID < 80000) {
|
4 |
+
class UnhandledMatchError extends Error
|
5 |
+
{
|
6 |
+
}
|
7 |
+
}
|
vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (\PHP_VERSION_ID < 80000) {
|
4 |
+
class ValueError extends Error
|
5 |
+
{
|
6 |
+
}
|
7 |
+
}
|
vendor/symfony/polyfill-php80/bootstrap.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of the Symfony package.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Symfony\Polyfill\Php80 as p;
|
13 |
+
|
14 |
+
if (\PHP_VERSION_ID >= 80000) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
+
if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
|
19 |
+
define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
|
20 |
+
}
|
21 |
+
|
22 |
+
if (!function_exists('fdiv')) {
|
23 |
+
function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
|
24 |
+
}
|
25 |
+
if (!function_exists('preg_last_error_msg')) {
|
26 |
+
function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
|
27 |
+
}
|
28 |
+
if (!function_exists('str_contains')) {
|
29 |
+
function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
|
30 |
+
}
|
31 |
+
if (!function_exists('str_starts_with')) {
|
32 |
+
function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
|
33 |
+
}
|
34 |
+
if (!function_exists('str_ends_with')) {
|
35 |
+
function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
|
36 |
+
}
|
37 |
+
if (!function_exists('get_debug_type')) {
|
38 |
+
function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
|
39 |
+
}
|
40 |
+
if (!function_exists('get_resource_id')) {
|
41 |
+
function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
|
42 |
+
}
|
vendor/symfony/polyfill-php80/composer.json
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "symfony/polyfill-php80",
|
3 |
+
"type": "library",
|
4 |
+
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
5 |
+
"keywords": ["polyfill", "shim", "compatibility", "portable"],
|
6 |
+
"homepage": "https://symfony.com",
|
7 |
+
"license": "MIT",
|
8 |
+
"authors": [
|
9 |
+
{
|
10 |
+
"name": "Ion Bazan",
|
11 |
+
"email": "ion.bazan@gmail.com"
|
12 |
+
},
|
13 |
+
{
|
14 |
+
"name": "Nicolas Grekas",
|
15 |
+
"email": "p@tchwork.com"
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"name": "Symfony Community",
|
19 |
+
"homepage": "https://symfony.com/contributors"
|
20 |
+
}
|
21 |
+
],
|
22 |
+
"require": {
|
23 |
+
"php": ">=7.1"
|
24 |
+
},
|
25 |
+
"autoload": {
|
26 |
+
"psr-4": { "Symfony\\Polyfill\\Php80\\": "" },
|
27 |
+
"files": [ "bootstrap.php" ],
|
28 |
+
"classmap": [ "Resources/stubs" ]
|
29 |
+
},
|
30 |
+
"minimum-stability": "dev",
|
31 |
+
"extra": {
|
32 |
+
"branch-alias": {
|
33 |
+
"dev-main": "1.23-dev"
|
34 |
+
},
|
35 |
+
"thanks": {
|
36 |
+
"name": "symfony/polyfill",
|
37 |
+
"url": "https://github.com/symfony/polyfill"
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
vendor/wp-oop/wordpress-interface/.editorconfig
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
root = true
|
2 |
+
|
3 |
+
[*]
|
4 |
+
end_of_line = lf
|
5 |
+
insert_final_newline = true
|
6 |
+
indent_style = space
|
7 |
+
indent_size = 4
|
8 |
+
|
9 |
+
[*.js]
|
10 |
+
indent_size = 2
|
11 |
+
|
12 |
+
[*.json]
|
13 |
+
indent_size = 2
|
14 |
+
|
15 |
+
[*.yml]
|
16 |
+
indent_size = 2
|
vendor/wp-oop/wordpress-interface/CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
## [[*next-version*]] - YYYY-MM-DD
|
8 |
+
|
9 |
+
## [0.1.0-alpha2] - 2021-04-30
|
10 |
+
### Added
|
11 |
+
- Interfaces for Gutenberg blocks parsing (#4).
|
12 |
+
|
13 |
+
## [0.1.0-alpha1] - 2021-03-05
|
14 |
+
Initial version.
|
vendor/wp-oop/wordpress-interface/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Dhii - WordPress Interop
|
2 |
+
[![Continuous Integration](https://github.com/wp-oop/wordpress-interface/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/wp-oop/wordpress-interface/actions/workflows/continuous-integration.yml)
|
3 |
+
[![Latest Stable Version](https://poser.pugx.org/wp-oop/wordpress-interface/v)](http://packagist.org/packages/wp-oop/wordpress-interface)
|
4 |
+
[![Latest Unstable Version](https://poser.pugx.org/wp-oop/wordpress-interface/v/unstable)](http://packagist.org/packages/wp-oop/wordpress-interface)
|
5 |
+
|
6 |
+
Interfaces for interop within WordPress.
|
7 |
+
|
8 |
+
## Details
|
9 |
+
Often, multiple packages need to operate on the various aspects of WordPress,
|
10 |
+
while centralizing them. Unfortunately, many of these aspects are not represented
|
11 |
+
by any type in WordPress. An example of this is a modular plugin, where each
|
12 |
+
module needs to independently interface with such a part of WordPress that is centralized,
|
13 |
+
like a Plugin or Post entity.
|
14 |
+
|
15 |
+
Also, it can be useful to write code that addresses a specific aspect of WordPress,
|
16 |
+
and type-safety is desirable, but WordPress feels too bulky to include. While WordPress
|
17 |
+
can be added as a dev-dependency, the dependency graph will not reflect these hidden requirements.
|
18 |
+
For example, a Post type would be useful to represents a post.
|
19 |
+
|
20 |
+
In addition, some modules can be developed in a way to be usable in a variety of platforms.
|
21 |
+
In these cases it would be necessary to rely on a proprietary standard.
|
22 |
+
|
23 |
+
This interop standard aims to address the above concerns by providing types for common
|
24 |
+
aspects of WordPress.
|
vendor/wp-oop/wordpress-interface/composer.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "wp-oop/wordpress-interface",
|
3 |
+
"description": "Interfaces for interop within WordPress",
|
4 |
+
"minimum-stability": "dev",
|
5 |
+
"license": "MIT",
|
6 |
+
"authors": [
|
7 |
+
{
|
8 |
+
"name": "Anton Ukhanev",
|
9 |
+
"email": "xedin.unknown@gmail.com"
|
10 |
+
}
|
11 |
+
],
|
12 |
+
"require": {
|
13 |
+
"php": "^7.1 | ^8.0",
|
14 |
+
"dhii/package-interface": "^0.1-alpha3",
|
15 |
+
"dhii/human-readable-interface": "^0.2.0-alpha1"
|
16 |
+
},
|
17 |
+
"require-dev": {
|
18 |
+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
|
19 |
+
"vimeo/psalm": "^4.4.0",
|
20 |
+
"slevomat/coding-standard": "^6.0"
|
21 |
+
},
|
22 |
+
"autoload": {
|
23 |
+
"psr-4": {
|
24 |
+
"WpOop\\WordPress\\": "src"
|
25 |
+
}
|
26 |
+
},
|
27 |
+
"autoload-dev": {
|
28 |
+
"psr-4": {
|
29 |
+
"WpOop\\WordPress\\Test\\Unit\\": "tests/unit"
|
30 |
+
}
|
31 |
+
},
|
32 |
+
"extra": {
|
33 |
+
"branch-alias": {
|
34 |
+
"dev-task/initial-interfaces": "0.1.x-dev"
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
vendor/wp-oop/wordpress-interface/phpcs.xml.dist
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
<type>warning</type>
|
14 |
+
</rule>
|
15 |
+
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
|
16 |
+
<type>warning</type>
|
17 |
+
</rule>
|
18 |
+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
|
19 |
+
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
|
20 |
+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
21 |
+
<properties>
|
22 |
+
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
|
23 |
+
<property name="newlinesCountAfterDeclare" value="2"/>
|
24 |
+
<property name="spacesCountAroundEqualsSign" value="0"/>
|
25 |
+
</properties>
|
26 |
+
</rule>
|
27 |
+
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
|
28 |
+
<properties>
|
29 |
+
<property name="groups" type="array">
|
30 |
+
<element value="uses"/>
|
31 |
+
|
32 |
+
<!-- Public constants are first but you don't care about the order of protected or private constants -->
|
33 |
+
<element value="public constants"/>
|
34 |
+
<element value="constants"/>
|
35 |
+
|
36 |
+
<!-- You don't care about the order among the properties. The same can be done with "properties" shortcut -->
|
37 |
+
<element value="public properties, protected properties, private properties, properties"/>
|
38 |
+
|
39 |
+
<!-- Constructor is first, then all public methods, then protected/private methods and magic methods are last -->
|
40 |
+
<element value="constructor"/>
|
41 |
+
<element value="all public methods"/>
|
42 |
+
<element value="methods"/>
|
43 |
+
<element value="magic methods"/>
|
44 |
+
</property>
|
45 |
+
</properties>
|
46 |
+
</rule>
|
47 |
+
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch"/>
|
48 |
+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
|
49 |
+
<rule ref="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall"/>
|
50 |
+
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
|
51 |
+
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
|
52 |
+
</ruleset>
|
vendor/wp-oop/wordpress-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/wp-oop/wordpress-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/wp-oop/wordpress-interface/src/Gutenberg/BlockInterface.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace WpOop\WordPress\Gutenberg;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* The interface for Gutenberg block data.
|
9 |
+
*/
|
10 |
+
interface BlockInterface
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Returns name of the block, such as 'core/paragraph'.
|
14 |
+
*/
|
15 |
+
public function getBlockName(): string;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Returns block attributes.
|
19 |
+
* @return array<string, mixed>
|
20 |
+
*/
|
21 |
+
public function getAttributes(): array;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Returns inner blocks (for example, used in the Columns block).
|
25 |
+
* @return BlockInterface[]
|
26 |
+
*/
|
27 |
+
public function getInnerBlocks(): array;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Returns resultant HTML.
|
31 |
+
*/
|
32 |
+
public function getInnerHtml(): string;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Returns list of string fragments and null markers where inner blocks were found.
|
36 |
+
* @return array<?string>
|
37 |
+
*/
|
38 |
+
public function getInnerContent(): array;
|
39 |
+
}
|
vendor/wp-oop/wordpress-interface/src/Gutenberg/BlockParserInterface.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace WpOop\WordPress\Gutenberg;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* The interface for parsing Gutenberg blocks.
|
9 |
+
*/
|
10 |
+
interface BlockParserInterface
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @param string $postContent Content of a WP post (e.g. WP_Post post_content).
|
14 |
+
* @return BlockInterface[]
|
15 |
+
*/
|
16 |
+
public function parseBlocks(string $postContent): array;
|
17 |
+
}
|
vendor/wp-oop/wordpress-interface/src/Plugin/FilePathPluginFactoryInterface.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace WpOop\WordPress\Plugin;
|
6 |
+
|
7 |
+
use Exception;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Can create a plugin from a plugin file path.
|
11 |
+
*/
|
12 |
+
interface FilePathPluginFactoryInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Creates a plugin, given a plugin file path.
|
16 |
+
*
|
17 |
+
* @param string $filePath The path to the plugin's main file.
|
18 |
+
*
|
19 |
+
* @return PluginInterface The new plugin.
|
20 |
+
*
|
21 |
+
* @throws Exception If problem creating.
|
22 |
+
*/
|
23 |
+
public function createPluginFromFilePath(string $filePath): PluginInterface;
|
24 |
+
}
|
vendor/wp-oop/wordpress-interface/src/Plugin/PluginInterface.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
+
namespace WpOop\WordPress\Plugin;
|
6 |
+
|
7 |
+
use Dhii\Package\PackageInterface;
|
8 |
+
use Dhii\Package\Version\VersionInterface;
|
9 |
+
use Dhii\Util\String\DescriptionAwareInterface;
|
10 |
+
use Dhii\Util\String\TitleAwareInterface;
|
11 |
+
use Exception;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Represents a WordPress plugin.
|
15 |
+
*/
|
16 |
+
interface PluginInterface extends
|
17 |
+
PackageInterface,
|
18 |
+
TitleAwareInterface,
|
19 |
+
DescriptionAwareInterface
|
20 |
+
{
|
21 |
+
/**
|
22 |
+
* Retrieves the minimal version of PHP required by this plugin.
|
23 |
+
*
|
24 |
+
* @return VersionInterface The version.
|
25 |
+
*
|
26 |
+
* @throws Exception If problem retrieving.
|
27 |
+
*/
|
28 |
+
public function getMinPhpVersion(): VersionInterface;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Retrieves the minimal version of WP required by this plugin.
|
32 |
+
*
|
33 |
+
* @return VersionInterface The version.
|
34 |
+
*
|
35 |
+
* @throws Exception If problem retrieving.
|
36 |
+
*/
|
37 |
+
public function getMinWpVersion(): VersionInterface;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Retrieves the text domain of this plugin
|
41 |
+
*
|
42 |
+
* @return string The text domain.
|
43 |
+
*
|
44 |
+
* @throws Exception If problem retrieving.
|
45 |
+
*/
|
46 |
+
public function getTextDomain(): string;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Retrieves the basename of this plugin.
|
50 |
+
*
|
51 |
+
* @return string The basename.
|
52 |
+
* A path to the plugin main file, relative to plugins directory.
|
53 |
+
*
|
54 |
+
* @throws Exception If problem retrieving.
|
55 |
+
*/
|
56 |
+
public function getBaseName(): string;
|
57 |
+
}
|
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: 6.
|
13 |
* Text Domain: woocommerce-paypal-payments
|
14 |
*
|
15 |
* @package WooCommerce\PayPalCommerce
|
@@ -41,10 +41,7 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
|
|
41 |
function init() {
|
42 |
$root_dir = __DIR__;
|
43 |
|
44 |
-
if ( !
|
45 |
-
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
46 |
-
}
|
47 |
-
if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
48 |
add_action(
|
49 |
'admin_notices',
|
50 |
function() {
|
@@ -73,6 +70,9 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
|
|
73 |
$app_container = $bootstrap( $root_dir );
|
74 |
|
75 |
$initialized = true;
|
|
|
|
|
|
|
76 |
do_action( 'woocommerce_paypal_payments_built_container', $app_container );
|
77 |
}
|
78 |
}
|
@@ -88,6 +88,9 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
|
|
88 |
$plugin_data = get_plugin_data( __DIR__ . '/woocommerce-paypal-payments.php' );
|
89 |
$plugin_version = $plugin_data['Version'] ?? null;
|
90 |
if ( get_option( 'woocommerce-ppcp-version' ) !== $plugin_version ) {
|
|
|
|
|
|
|
91 |
do_action( 'woocommerce_paypal_payments_gateway_migrate' );
|
92 |
update_option( 'woocommerce-ppcp-version', $plugin_version );
|
93 |
}
|
@@ -97,6 +100,9 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
|
|
97 |
__FILE__,
|
98 |
function () {
|
99 |
init();
|
|
|
|
|
|
|
100 |
do_action( 'woocommerce_paypal_payments_gateway_activate' );
|
101 |
}
|
102 |
);
|
@@ -104,6 +110,9 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
|
|
104 |
__FILE__,
|
105 |
function () {
|
106 |
init();
|
|
|
|
|
|
|
107 |
do_action( 'woocommerce_paypal_payments_gateway_deactivate' );
|
108 |
}
|
109 |
);
|
@@ -112,10 +121,7 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
|
|
112 |
add_filter(
|
113 |
'plugin_action_links_' . plugin_basename( __FILE__ ),
|
114 |
function( $links ) {
|
115 |
-
if ( !
|
116 |
-
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
117 |
-
}
|
118 |
-
if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
119 |
return $links;
|
120 |
}
|
121 |
|
@@ -132,4 +138,13 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
|
|
132 |
}
|
133 |
);
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
} )();
|
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.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: 6.2
|
13 |
* Text Domain: woocommerce-paypal-payments
|
14 |
*
|
15 |
* @package WooCommerce\PayPalCommerce
|
41 |
function init() {
|
42 |
$root_dir = __DIR__;
|
43 |
|
44 |
+
if ( ! is_woocommerce_activated() ) {
|
|
|
|
|
|
|
45 |
add_action(
|
46 |
'admin_notices',
|
47 |
function() {
|
70 |
$app_container = $bootstrap( $root_dir );
|
71 |
|
72 |
$initialized = true;
|
73 |
+
/**
|
74 |
+
* The hook fired after the plugin bootstrap with the app services container as parameter.
|
75 |
+
*/
|
76 |
do_action( 'woocommerce_paypal_payments_built_container', $app_container );
|
77 |
}
|
78 |
}
|
88 |
$plugin_data = get_plugin_data( __DIR__ . '/woocommerce-paypal-payments.php' );
|
89 |
$plugin_version = $plugin_data['Version'] ?? null;
|
90 |
if ( get_option( 'woocommerce-ppcp-version' ) !== $plugin_version ) {
|
91 |
+
/**
|
92 |
+
* The hook fired when the plugin is installed or updated.
|
93 |
+
*/
|
94 |
do_action( 'woocommerce_paypal_payments_gateway_migrate' );
|
95 |
update_option( 'woocommerce-ppcp-version', $plugin_version );
|
96 |
}
|
100 |
__FILE__,
|
101 |
function () {
|
102 |
init();
|
103 |
+
/**
|
104 |
+
* The hook fired in register_activation_hook.
|
105 |
+
*/
|
106 |
do_action( 'woocommerce_paypal_payments_gateway_activate' );
|
107 |
}
|
108 |
);
|
110 |
__FILE__,
|
111 |
function () {
|
112 |
init();
|
113 |
+
/**
|
114 |
+
* The hook fired in register_deactivation_hook.
|
115 |
+
*/
|
116 |
do_action( 'woocommerce_paypal_payments_gateway_deactivate' );
|
117 |
}
|
118 |
);
|
121 |
add_filter(
|
122 |
'plugin_action_links_' . plugin_basename( __FILE__ ),
|
123 |
function( $links ) {
|
124 |
+
if ( ! is_woocommerce_activated() ) {
|
|
|
|
|
|
|
125 |
return $links;
|
126 |
}
|
127 |
|
138 |
}
|
139 |
);
|
140 |
|
141 |
+
/**
|
142 |
+
* Check if WooCommerce is active.
|
143 |
+
*
|
144 |
+
* @return bool true if WooCommerce is active, otherwise false.
|
145 |
+
*/
|
146 |
+
function is_woocommerce_activated(): bool {
|
147 |
+
return class_exists( 'woocommerce' );
|
148 |
+
}
|
149 |
+
|
150 |
} )();
|