Changeset 3321269
- Timestamp:
- 07/02/2025 02:05:46 PM (9 months ago)
- Location:
- payoneer-checkout/trunk
- Files:
-
- 37 added
- 96 edited
-
TODOS.md (modified) (1 diff)
-
changelog.txt (modified) (3 diffs)
-
inc/extensions.php (modified) (2 diffs)
-
inc/services.php (modified) (2 diffs)
-
languages/en_GB.pot (modified) (9 diffs)
-
modules/inpsyde/payment-gateway/CHANGELOG.md (modified) (1 diff)
-
modules/inpsyde/payment-gateway/assets/js/frontend/blocks.asset.php (modified) (1 diff)
-
modules/inpsyde/payment-gateway/assets/js/frontend/blocks.js (modified) (1 diff)
-
modules/inpsyde/payment-gateway/src/Fields/ContentField.php (modified) (2 diffs)
-
modules/inpsyde/payment-gateway/src/PaymentGateway.php (modified) (3 diffs)
-
modules/inpsyde/payment-gateway/src/PaymentGatewayModule.php (modified) (3 diffs)
-
modules/inpsyde/payoneer-embedded-payment/assets/payoneer-checkout.asset.php (modified) (1 diff)
-
modules/inpsyde/payoneer-embedded-payment/assets/payoneer-checkout.js (modified) (1 diff)
-
modules/inpsyde/payoneer-embedded-payment/assets/payoneer-checkout.js.map (modified) (1 diff)
-
modules/inpsyde/payoneer-embedded-payment/src/EmbeddedPaymentModule.php (modified) (6 diffs)
-
modules/inpsyde/payoneer-embedded-payment/src/EnvironmentProvider.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-embedded-payment/src/ListLongIdPaymentRequestValidator.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-embedded-payment/src/PaymentFieldsRenderer/ListDebugFieldRenderer.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php (modified) (3 diffs)
-
modules/inpsyde/payoneer-hosted-payment/inc/extensions.php (modified) (1 diff)
-
modules/inpsyde/payoneer-hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php (modified) (4 diffs)
-
modules/inpsyde/payoneer-list-session/inc/extensions.php (modified) (1 diff)
-
modules/inpsyde/payoneer-list-session/inc/factories.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-list-session/inc/services.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-list-session/src/Factory/RedirectInjectingListFactory.php (modified) (3 diffs)
-
modules/inpsyde/payoneer-list-session/src/ListSession/ApiListSessionProvider.php (modified) (4 diffs)
-
modules/inpsyde/payoneer-list-session/src/ListSession/ContextInterface.php (modified) (1 diff)
-
modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionManager.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionManagerProxy.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-list-session/src/ListSession/PaymentContext.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-list-session/src/ListSession/Runner.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-list-session/src/Middleware/FetchingMiddleware.php (added)
-
modules/inpsyde/payoneer-list-session/src/Middleware/IsProcessingTrait.php (added)
-
modules/inpsyde/payoneer-list-session/src/Middleware/ListCache.php (added)
-
modules/inpsyde/payoneer-list-session/src/Middleware/ListCacheInterface.php (added)
-
modules/inpsyde/payoneer-list-session/src/Middleware/UpdatingMiddleware.php (modified) (5 diffs)
-
modules/inpsyde/payoneer-payment-gateway-checkout/inc/services.php (modified) (1 diff)
-
modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php (modified) (8 diffs)
-
modules/inpsyde/payoneer-payment-gateway-checkout/src/PaymentProcessor/AbstractPaymentProcessor.php (modified) (4 diffs)
-
modules/inpsyde/payoneer-payment-methods/inc/services.php (modified) (3 diffs)
-
modules/inpsyde/payoneer-payment-methods/src/AvailabilityCallback/ListConditionAvailabilityCallback.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-payment-methods/src/GatewayIconsRenderer/DynamicIconProvider.php (modified) (3 diffs)
-
modules/inpsyde/payoneer-payment-methods/src/GatewayIconsRenderer/IconProviderFactory.php (modified) (3 diffs)
-
modules/inpsyde/payoneer-payment-methods/src/RefundProcessor.php (modified) (6 diffs)
-
modules/inpsyde/payoneer-sdk/LICENSE (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/README.md (modified) (2 diffs)
-
modules/inpsyde/payoneer-sdk/inc/services.php (modified) (6 diffs)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/Customer.php (modified) (3 diffs)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerDeserializer.php (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerDeserializerInterface.php (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerFactory.php (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerFactoryInterface.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerInterface.php (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerSerializer.php (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerSerializerInterface.php (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListDeserializer.php (modified) (5 diffs)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListDeserializerInterface.php (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListFactory.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListFactoryInterface.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListInterface.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListSerializer.php (modified) (5 diffs)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListSerializerInterface.php (modified) (1 diff)
-
modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListSession.php (modified) (5 diffs)
-
modules/inpsyde/payoneer-settings/assets/admin-payment-methods.asset.php (modified) (1 diff)
-
modules/inpsyde/payoneer-settings/assets/admin-payment-methods.js (modified) (1 diff)
-
modules/inpsyde/payoneer-settings/assets/admin-settings.asset.php (modified) (1 diff)
-
modules/inpsyde/payoneer-settings/assets/admin-settings.js (modified) (1 diff)
-
modules/inpsyde/payoneer-status-report/inc/email-message.php (added)
-
modules/inpsyde/payoneer-status-report/inc/fields.php (added)
-
modules/inpsyde/payoneer-status-report/inc/html-template.php (added)
-
modules/inpsyde/payoneer-status-report/inc/services.php (modified) (1 diff)
-
modules/inpsyde/payoneer-status-report/src/Data (added)
-
modules/inpsyde/payoneer-status-report/src/Data/LogCollector (added)
-
modules/inpsyde/payoneer-status-report/src/Data/LogCollector/DbLogCollector.php (added)
-
modules/inpsyde/payoneer-status-report/src/Data/LogCollector/FileLogCollector.php (added)
-
modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LegacyFileLogCollector.php (added)
-
modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LogCollectorFactory.php (added)
-
modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LogCollectorInterface.php (added)
-
modules/inpsyde/payoneer-status-report/src/Data/SystemReportCollector.php (added)
-
modules/inpsyde/payoneer-status-report/src/Data/SystemReportCollectorInterface.php (added)
-
modules/inpsyde/payoneer-status-report/src/Data/SystemReportDataDTO.php (added)
-
modules/inpsyde/payoneer-status-report/src/Data/SystemReportParamsDTO.php (added)
-
modules/inpsyde/payoneer-status-report/src/Email (added)
-
modules/inpsyde/payoneer-status-report/src/Email/SystemReportEmailSender.php (added)
-
modules/inpsyde/payoneer-status-report/src/Email/SystemReportEmailSenderInterface.php (added)
-
modules/inpsyde/payoneer-status-report/src/Email/SystemReportFormatter.php (added)
-
modules/inpsyde/payoneer-status-report/src/Email/SystemReportFormatterInterface.php (added)
-
modules/inpsyde/payoneer-status-report/src/Endpoint (added)
-
modules/inpsyde/payoneer-status-report/src/Endpoint/SystemReportEndpointController.php (added)
-
modules/inpsyde/payoneer-status-report/src/Permission (added)
-
modules/inpsyde/payoneer-status-report/src/Permission/SystemReportPermissionHandler.php (added)
-
modules/inpsyde/payoneer-status-report/src/Renderer.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-status-report/src/StatusReportModule.php (modified) (3 diffs)
-
modules/inpsyde/payoneer-webhooks/inc/services.php (modified) (4 diffs)
-
modules/inpsyde/payoneer-webhooks/src/Controller/PaymentWebhookController.php (modified) (2 diffs)
-
modules/inpsyde/payoneer-webhooks/src/OrderPaymentWebhookHandler/RefundedPaymentHandler.php (modified) (1 diff)
-
modules/inpsyde/payoneer-webhooks/src/WebhooksModule.php (modified) (1 diff)
-
modules/inpsyde/payoneer-wp/inc/factories.php (modified) (1 diff)
-
modules/inpsyde/payoneer-wp/inc/services.php (modified) (1 diff)
-
modules/inpsyde/payoneer-wp/src/OrderFinder (added)
-
modules/inpsyde/payoneer-wp/src/OrderFinder/AbstractOrderFinder.php (added)
-
modules/inpsyde/payoneer-wp/src/OrderFinder/AddTransactionIdFieldSupport.php (added)
-
modules/inpsyde/payoneer-wp/src/OrderFinder/HposOrderFinder.php (added)
-
modules/inpsyde/payoneer-wp/src/OrderFinder/OrderFinder.php (added)
-
modules/inpsyde/payoneer-wp/src/OrderFinder/OrderFinderInterface.php (added)
-
modules/inpsyde/payoneer-wp/src/RefundFinder (added)
-
modules/inpsyde/payoneer-wp/src/RefundFinder/AddPayoutIdFieldSupport.php (added)
-
modules/inpsyde/payoneer-wp/src/RefundFinder/RefundFinder.php (added)
-
modules/inpsyde/payoneer-wp/src/RefundFinder/RefundFinderInterface.php (added)
-
modules/inpsyde/payoneer-wp/src/WpModule.php (modified) (3 diffs)
-
payoneer-checkout.php (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/autoload_classmap.php (modified) (5 diffs)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (7 diffs)
-
vendor/composer/installed.json (modified) (31 diffs)
-
vendor/composer/installed.php (modified) (1 diff)
-
vendor/inpsyde/modularity/src/Container/ContainerConfigurator.php (modified) (2 diffs)
-
vendor/inpsyde/modularity/src/Container/PackageProxyContainer.php (modified) (2 diffs)
-
vendor/inpsyde/modularity/src/Container/ReadOnlyContainer.php (modified) (2 diffs)
-
vendor/inpsyde/modularity/src/Container/ServiceExtensions.php (modified) (10 diffs)
-
vendor/inpsyde/modularity/src/Module/ExtendingModule.php (modified) (1 diff)
-
vendor/inpsyde/modularity/src/Module/FactoryModule.php (modified) (1 diff)
-
vendor/inpsyde/modularity/src/Module/ServiceModule.php (modified) (1 diff)
-
vendor/inpsyde/modularity/src/Package.php (modified) (8 diffs)
-
vendor/inpsyde/modularity/src/Properties/BaseProperties.php (modified) (6 diffs)
-
vendor/inpsyde/modularity/src/Properties/LibraryProperties.php (modified) (8 diffs)
-
vendor/inpsyde/modularity/src/Properties/PluginProperties.php (modified) (1 diff)
-
vendor/inpsyde/modularity/src/Properties/Properties.php (modified) (2 diffs)
-
vendor/scoper-autoload.php (modified) (1 diff)
-
vendor/sniccowp/php-scoper-wordpress-excludes/generated/exclude-wordpress-classes.json (modified) (3 diffs)
-
vendor/sniccowp/php-scoper-wordpress-excludes/generated/exclude-wordpress-functions.json (modified) (20 diffs)
-
vendor/symfony/polyfill-php80/PhpToken.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
payoneer-checkout/trunk/TODOS.md
r3305047 r3321269 5 5 | [modules.local/analytics/inc/services.php](modules.local/analytics/inc/services.php#L309) | 309 | replace with production value | 6 6 | [modules.local/checkout/inc/services.php](modules.local/checkout/inc/services.php#L132) | 132 | use min.js when script debug is enabled | 7 | [modules.local/checkout/inc/services.php](modules.local/checkout/inc/services.php#L2 72) | 272| consider adding our own hidden block to checkout for our custom fields, |8 | [modules.local/checkout/src/CheckoutModule.php](modules.local/checkout/src/CheckoutModule.php#L 474) | 474| supply a proper css file for this. Rework markup into something more responsive |9 | [modules.local/embedded-payment/src/EmbeddedPaymentModule.php](modules.local/embedded-payment/src/EmbeddedPaymentModule.php#L22 5) | 225| Remove this check when support for these versions is dropped |10 | [modules.local/embedded-payment/src/EmbeddedPaymentModule.php](modules.local/embedded-payment/src/EmbeddedPaymentModule.php#L3 00) | 300 | Refactor the environment detection to use the current WP options. |11 | [modules.local/embedded-payment/src/EmbeddedPaymentModule.php](modules.local/embedded-payment/src/EmbeddedPaymentModule.php#L3 04) | 304 | Determine whether we can get SRI details (URL + hash) from the LIST response, and drop this service. |12 | [modules.local/embedded-payment/src/EmbeddedPaymentModule.php](modules.local/embedded-payment/src/EmbeddedPaymentModule.php#L3 11) | 311 | Consider returning the full SDK URL instead of only the environment. We could return the final `websdk.assets.umd.url.template` here. |7 | [modules.local/checkout/inc/services.php](modules.local/checkout/inc/services.php#L285) | 285 | consider adding our own hidden block to checkout for our custom fields, | 8 | [modules.local/checkout/src/CheckoutModule.php](modules.local/checkout/src/CheckoutModule.php#L339) | 339 | supply a proper css file for this. Rework markup into something more responsive | 9 | [modules.local/embedded-payment/src/EmbeddedPaymentModule.php](modules.local/embedded-payment/src/EmbeddedPaymentModule.php#L221) | 221 | Remove this check when support for these versions is dropped | 10 | [modules.local/embedded-payment/src/EmbeddedPaymentModule.php](modules.local/embedded-payment/src/EmbeddedPaymentModule.php#L310) | 310 | Refactor the environment detection to use the current WP options. | 11 | [modules.local/embedded-payment/src/EmbeddedPaymentModule.php](modules.local/embedded-payment/src/EmbeddedPaymentModule.php#L314) | 314 | Determine whether we can get SRI details (URL + hash) from the LIST response, and drop this service. | 12 | [modules.local/embedded-payment/src/EmbeddedPaymentModule.php](modules.local/embedded-payment/src/EmbeddedPaymentModule.php#L321) | 321 | Consider returning the full SDK URL instead of only the environment. We could return the final `websdk.assets.umd.url.template` here. | 13 13 | [modules.local/embedded-payment/src/ListLongIdPaymentRequestValidator.php](modules.local/embedded-payment/src/ListLongIdPaymentRequestValidator.php#L56) | 56 | Put this in a const/enum or make it a constructor argument | 14 | [modules.local/list-session/inc/services.php](modules.local/list-session/inc/services.php#L240) | 240 | consider doing the same with the WC_Session List provider |15 14 | [modules.local/list-session/src/ListSessionModule.php](modules.local/list-session/src/ListSessionModule.php#L62) | 62 | check if we still need this after Fetch command is implemented | 16 | [modules.local/payment-methods/inc/services.php](modules.local/payment-methods/inc/services.php#L364) | 364 | consider refactoring, these callbacks are almost the same. | 15 | [modules.local/payment-methods/inc/services.php](modules.local/payment-methods/inc/services.php#L311) | 311 | think about moving this to factories | 16 | [modules.local/payment-methods/inc/services.php](modules.local/payment-methods/inc/services.php#L359) | 359 | consider refactoring, these callbacks are almost the same. | 17 17 | [modules.local/settings/src/SettingsModule.php](modules.local/settings/src/SettingsModule.php#L758) | 758 | Remove/Refactor this when WC 9.7+ releases the revamped Payment Settings UX | 18 18 | [modules.local/wp/inc/factories.php](modules.local/wp/inc/factories.php#L18) | 18 | make our order_pay request be detected as a checkout in the same way as | 19 | [modules.local/wp/inc/services.php](modules.local/wp/inc/services.php#L345) | 345 | check if this can return false because called too early | 19 | [modules.local/wp/inc/services.php](modules.local/wp/inc/services.php#L288) | 288 | deal with the code duplication. Currently, we have the same logic | 20 | [modules.local/wp/inc/services.php](modules.local/wp/inc/services.php#L349) | 349 | check if this can return false because called too early | 20 21 | [modules.local/embedded-payment/src/PaymentFieldsRenderer/WidgetPlaceholderFieldRenderer.php](modules.local/embedded-payment/src/PaymentFieldsRenderer/WidgetPlaceholderFieldRenderer.php#L55) | 55 | Reuse another message here. The actual HPP flow uses a merchant-configurable string | 21 | [modules.local/list-session/src/ListSession/ListSessionManager.php](modules.local/list-session/src/ListSession/ListSessionManager.php#L45) | 45 | turn this global method into a service so that we can use proper dependencies from our container | 22 | [modules.local/list-session/src/Middleware/UpdatingMiddleware.php](modules.local/list-session/src/Middleware/UpdatingMiddleware.php#L110) | 110 | replace this with a better solution. | 23 | [modules.local/list-session/src/Middleware/UpdatingMiddleware.php](modules.local/list-session/src/Middleware/UpdatingMiddleware.php#L123) | 123 | Log errors during UPDATE | 22 24 | [modules.local/payment-methods/src/GatewayIconsRenderer/DynamicIconProvider.php](modules.local/payment-methods/src/GatewayIconsRenderer/DynamicIconProvider.php#L77) | 77 | logging | 23 25 | [modules.local/api/tests/php/Integration/Gateway/PaymentTestCase.php](modules.local/api/tests/php/Integration/Gateway/PaymentTestCase.php#L22) | 22 | replace 'inpsyde_payment_gateway.payoneer' with a mocked PaymentProcessor/ChargeCommand | -
payoneer-checkout/trunk/changelog.txt
r3305047 r3321269 3 3 = [next-version] - yyyy-mm-dd = 4 4 5 = [3.3.2] - 2025-06-02 = 5 = [3.4.0] - 2025-06-30 = 6 * Added 7 * Automated generation of System Status Reports and Logfiles to assist support processes. 8 9 * Fixed 10 * Resolved payment rejection issue caused by an incorrect Security header. 11 * Fixed compatibility issue with WordPress Multisite. 12 * Addressed an incompatibility with WooCommerce Multilingual & Multicurrency that caused the Pay for Order page to break. 13 * Ensured available payment methods in the LIST are correctly updated after changes to the total amount. 14 15 * Changed 16 * Adjust value handling to not include customer.number as a required value in SDK 17 * Removed the ProcessingModel entity for MoR from the SDK. 18 19 = [3.3.2] - 2025-05-26 = 6 20 * Fixed: 7 21 * Issue allowing checkout form to be submitted with invalid cards fields … … 9 23 * PHP 8+ errors caused during API calls after 3.3.0 release 10 24 * PHP 7.4 errors caused during API calls after 3.3.0 release 25 11 26 * Changed: 12 27 * Repeated payment attempts no longer generate new orders. The original order is now reused, with its status set to On hold after checkout and updated to Failed if the payment is declined. … … 14 29 = [3.3.1] - 2025-04-02 = 15 30 * Added 16 * SRI integrity hash (security enhancement for P SI/DSS 4.0 compatibility)31 * SRI integrity hash (security enhancement for PCI-DSS 4.0 compatibility) 17 32 18 33 = [3.3.0] - 2025-03-24 = -
payoneer-checkout/trunk/inc/extensions.php
r3260742 r3321269 39 39 $message = $exception->getMessage(); 40 40 return \sprintf('Failed to update LIST session: %1$s.', $message); 41 }], ['name' => 'payoneer-checkout.create_list_session_failed', 'log_level' => LogLevel::ERROR, 'message' => 'Failed to create LIST session. Exception caught: {exception}'], ['name' => 'payoneer-checkout.list_session_created', 'log_level' => LogLevel::INFO, 'message' => 'LIST session {longId} was successfully created.'], ['name' => 'payoneer-checkout.payment_processing_failure', 'log_level' => LogLevel::WARNING, 'message' => 'Failed to process checkout payment. Exception caught: {errorMessage}'], ['name' => $cardsGatewayId . '_payment_fields_failure', 'log_level' => LogLevel::ERROR, 'message' => 'Failed to render payment fields. Exception caught: {exception}'], ['name' => 'payoneer-checkout.before_create_list', 'log_level' => LogLevel::INFO, 'message' => 'Started creating list session.'], ['name' => 'payoneer-checkout.log_incoming_notification', 'log_level' => LogLevel::INFO, 'message' => 'Incoming webhook with HTTP method {method}.' . \PHP_EOL . 'Query params are {queryParams}.' . \PHP_EOL . 'Body content is {bodyContents}.' . \PHP_EOL . 'Headers are {headers}.'], ['name' => 'payoneer-checkout.webhook_request.order_not_found', 'log_level' => LogLevel::ERROR, 'message' => 'Order not found by transaction ID {transactionId}, longId is {longId}.'], ['name' => 'payoneer-checkout.webhook_request.order_auth_header_is_incorrect', 'log_level' => LogLevel::ERROR, 'message' => 'Order authorization header is incorrect. Order id is {orderId}, longId is {longId}.'], ['name' => 'payoneer-checkout.webhook_request.webhook_already_processed', 'log_level' => LogLevel::WARNING, 'message' => 'Incoming webhook was processed already, skipping. Order id is {orderId}, longId is {longId}.'], ['name' => ' woocommerce_create_order', 'log_level' => LogLevel::INFO, 'message' => 'Started creating order on checkout.'], ['name' => 'woocommerce_checkout_order_created', 'log_level' => LogLevel::INFO, 'message' => 'Order creating finished.'], ['name' => 'payoneer-checkout.before_update_order_metadata', 'log_level' => LogLevel::INFO, 'message' => 'Order meta update started.'], ['name' => 'payoneer-checkout.after_update_order_metadata', 'log_level' => LogLevel::INFO, 'message' => 'Order meta update finished.'], ['name' => 'payoneer-checkout.before_update_list', 'log_level' => LogLevel::INFO, 'message' => 'Started updating list session {longId}'], ['name' => 'payoneer-checkout.list_session_updated', 'log_level' => LogLevel::INFO, 'message' => 'List session {longId} was successfully updated'], ['name' => 'payoneer_checkout.invalid_country_after_final_update', 'log_level' => LogLevel::ERROR, 'message' => 'Final update without List.country set or List.country is different from customers billing country'], ['name' => 'payoneer-checkout.missing-headers-for-validation', 'log_level' => LogLevel::ERROR, 'message' => static function (array $args) {41 }], ['name' => 'payoneer-checkout.create_list_session_failed', 'log_level' => LogLevel::ERROR, 'message' => 'Failed to create LIST session. Exception caught: {exception}'], ['name' => 'payoneer-checkout.list_session_created', 'log_level' => LogLevel::INFO, 'message' => 'LIST session {longId} was successfully created.'], ['name' => 'payoneer-checkout.payment_processing_failure', 'log_level' => LogLevel::WARNING, 'message' => 'Failed to process checkout payment. Exception caught: {errorMessage}'], ['name' => $cardsGatewayId . '_payment_fields_failure', 'log_level' => LogLevel::ERROR, 'message' => 'Failed to render payment fields. Exception caught: {exception}'], ['name' => 'payoneer-checkout.before_create_list', 'log_level' => LogLevel::INFO, 'message' => 'Started creating list session.'], ['name' => 'payoneer-checkout.log_incoming_notification', 'log_level' => LogLevel::INFO, 'message' => 'Incoming webhook with HTTP method {method}.' . \PHP_EOL . 'Query params are {queryParams}.' . \PHP_EOL . 'Body content is {bodyContents}.' . \PHP_EOL . 'Headers are {headers}.'], ['name' => 'payoneer-checkout.webhook_request.order_not_found', 'log_level' => LogLevel::ERROR, 'message' => 'Order not found by transaction ID {transactionId}, longId is {longId}.'], ['name' => 'payoneer-checkout.webhook_request.order_auth_header_is_incorrect', 'log_level' => LogLevel::ERROR, 'message' => 'Order authorization header is incorrect. Order id is {orderId}, longId is {longId}.'], ['name' => 'payoneer-checkout.webhook_request.webhook_already_processed', 'log_level' => LogLevel::WARNING, 'message' => 'Incoming webhook was processed already, skipping. Order id is {orderId}, longId is {longId}.'], ['name' => 'payoneer-checkout.webhook_request.multiple_orders_found_for_transaction_id', 'log_level' => LogLevel::WARNING, 'message' => 'Found more than one order for transactionId in the incoming webhook'], ['name' => 'woocommerce_create_order', 'log_level' => LogLevel::INFO, 'message' => 'Started creating order on checkout.'], ['name' => 'woocommerce_checkout_order_created', 'log_level' => LogLevel::INFO, 'message' => 'Order creating finished.'], ['name' => 'payoneer-checkout.before_update_order_metadata', 'log_level' => LogLevel::INFO, 'message' => 'Order meta update started.'], ['name' => 'payoneer-checkout.after_update_order_metadata', 'log_level' => LogLevel::INFO, 'message' => 'Order meta update finished.'], ['name' => 'payoneer-checkout.before_update_list', 'log_level' => LogLevel::INFO, 'message' => 'Started updating list session {longId}'], ['name' => 'payoneer-checkout.list_session_updated', 'log_level' => LogLevel::INFO, 'message' => 'List session {longId} was successfully updated'], ['name' => 'payoneer_checkout.invalid_country_after_final_update', 'log_level' => LogLevel::ERROR, 'message' => 'Final update without List.country set or List.country is different from customers billing country'], ['name' => 'payoneer-checkout.missing-headers-for-validation', 'log_level' => LogLevel::ERROR, 'message' => static function (array $args) { 42 42 /** 43 43 * @var array $headers … … 45 45 $headers = $args['headers']; 46 46 return \sprintf('Missing required HTTP header for checkout validation. Headers received: %1$s.', (string) \wc_print_r(\array_keys($headers), \true)); 47 }] ];47 }], ['name' => 'payoneer-checkout.status-report.email-sent', 'log_level' => LogLevel::INFO, 'message' => 'System report - Successfully sent the email.'], ['name' => 'payoneer-checkout.status-report.email-failed', 'log_level' => LogLevel::ERROR, 'message' => 'System report - Failed to send the email.'], ['name' => 'payoneer-checkout.status-report.cannot-add-attachments', 'log_level' => LogLevel::ERROR, 'message' => 'System report - The PHPMailer instance cannot add string attachments.'], ['name' => 'payoneer-checkout.status-report.attachment-failed', 'log_level' => LogLevel::ERROR, 'message' => 'System report - Failed to attach "{filename}" to the email.']]; 48 48 return \array_merge($previous, $logEventsToAdd, $gatewaysProcessingSuccess); 49 49 }, -
payoneer-checkout/trunk/inc/services.php
r3206335 r3321269 286 286 # core.refund 287 287 # ================================================================= 288 'core.refund.refund_finder' => new Alias('w ebhooks.refund_finder'),288 'core.refund.refund_finder' => new Alias('wp.refund_finder'), 289 289 # core.data 290 290 # ================================================================= … … 614 614 'inpsyde_payment_gateway.address_factory' => new Alias('core.address_factory'), 615 615 'inpsyde_payment_gateway.name_factory' => new Alias('core.name_factory'), 616 'inpsyde_payment_gateway.order_finder' => new Alias('w ebhooks.order_finder'),616 'inpsyde_payment_gateway.order_finder' => new Alias('wp.order_finder'), 617 617 'inpsyde_payment_gateway.product_factory' => new Alias('core.product_factory'), 618 618 'inpsyde_payment_gateway.list_hash_container_id' => new Alias('core.list_hash_container_id'), -
payoneer-checkout/trunk/languages/en_GB.pot
r3305047 r3321269 18 18 #: payoneer-checkout.php 19 19 #: modules.local/settings/inc/services.php:568 20 #: modules.local/status-report/src/StatusReportModule.php: 5920 #: modules.local/status-report/src/StatusReportModule.php:68 21 21 #: modules/inpsyde/payoneer-settings/inc/services.php:568 22 #: modules/inpsyde/payoneer-status-report/src/StatusReportModule.php: 5922 #: modules/inpsyde/payoneer-status-report/src/StatusReportModule.php:68 23 23 msgid "Payoneer Checkout" 24 24 msgstr "" … … 45 45 46 46 #. translators: Used when encountering the ABORT interaction code 47 #: inc/extensions.php:2 1047 #: inc/extensions.php:240 48 48 msgid "The payment has been aborted" 49 49 msgstr "" 50 50 51 51 #. translators: Used when encountering the TRY_OTHER_NETWORK interaction code 52 #: inc/extensions.php:2 1252 #: inc/extensions.php:242 53 53 msgid "Please try another network" 54 54 msgstr "" 55 55 56 56 #. translators: Used when encountering the TRY_OTHER_ACCOUNT interaction code 57 #: inc/extensions.php:2 1457 #: inc/extensions.php:244 58 58 msgid "Please try another account" 59 59 msgstr "" 60 60 61 61 #. translators: Used when encountering the RETRY interaction code 62 #: inc/extensions.php:2 1662 #: inc/extensions.php:246 63 63 msgid "Please attempt the payment again" 64 64 msgstr "" 65 65 66 66 #. translators: Used when encountering the VERIFY interaction code 67 #: inc/extensions.php:2 1867 #: inc/extensions.php:248 68 68 msgid "Payment requires verification" 69 69 msgstr "" … … 118 118 119 119 #. translators: When detecting an ABORT interaction code upon redirecting to the cancelUrl 120 #: modules.local/checkout/src/CheckoutModule.php: 380121 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php: 380120 #: modules.local/checkout/src/CheckoutModule.php:253 121 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php:253 122 122 msgid "Payment has been aborted" 123 123 msgstr "" 124 124 125 #: modules.local/checkout/src/CheckoutModule.php: 399126 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php: 399125 #: modules.local/checkout/src/CheckoutModule.php:268 126 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php:268 127 127 msgid "Payment failed. Please try again" 128 128 msgstr "" 129 129 130 130 #. translators: Notice when redirecting to cancelUrl (after failed 3DS challenge or customer abort) 131 #: modules.local/checkout/src/CheckoutModule.php: 402132 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php: 402131 #: modules.local/checkout/src/CheckoutModule.php:271 132 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php:271 133 133 msgid "Payment canceled. Please try again or choose another payment method." 134 134 msgstr "" 135 135 136 136 #. translators: %1$s, %2$s and %3$s are replaced with the opening and closing 'a' tags 137 #: modules.local/checkout/src/CheckoutModule.php: 554138 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php: 554137 #: modules.local/checkout/src/CheckoutModule.php:419 138 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php:419 139 139 #, php-format 140 140 msgid "Enter valid Test credentials and Save settings to receive a payment notification and unlock Live mode checkbox. You can %1$srefresh%2$s the page to check if a payment notification has been already received and Live mode checkbox is unlocked." … … 142 142 143 143 #. translators: Transaction ID supplied by WooCommerce plugin 144 #: modules.local/checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:1 74145 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:1 74144 #: modules.local/checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:147 145 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:147 146 146 #, php-format 147 147 msgid "Initiating payment with transaction ID \"%1$s\"" 148 148 msgstr "" 149 149 150 #: modules.local/checkout/src/PaymentProcessor/AbstractPaymentProcessor.php: 215151 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/PaymentProcessor/AbstractPaymentProcessor.php: 215150 #: modules.local/checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:188 151 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:188 152 152 msgid "The payment was not processed. Please try again." 153 153 msgstr "" 154 154 155 155 #. translators: Used after checking for misconfigured merchant credentials, e.g. when we encounter 401/INVALID_CONFIGURATION 156 #: modules.local/checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:2 61157 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:2 61156 #: modules.local/checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:234 157 #: modules/inpsyde/payoneer-payment-gateway-checkout/src/PaymentProcessor/AbstractPaymentProcessor.php:234 158 158 msgid "Failed to initialize payment session. Payoneer Checkout is not configured properly." 159 159 msgstr "" … … 194 194 195 195 #. translators: An unexpected error during the final List UPDATE before the CHARGE 196 #: modules.local/embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php: 79197 #: modules.local/hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php: 90198 #: modules/inpsyde/payoneer-embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php: 79199 #: modules/inpsyde/payoneer-hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php: 90196 #: modules.local/embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php:69 197 #: modules.local/hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php:78 198 #: modules/inpsyde/payoneer-embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php:69 199 #: modules/inpsyde/payoneer-hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php:78 200 200 msgid "Payment failed. Please attempt the payment again or contact the shop admin. This issue has been logged." 201 201 msgstr "" 202 202 203 203 #. translators: Order note added when processing an order in embedded flow 204 #: modules.local/embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php: 109205 #: modules/inpsyde/payoneer-embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php: 109204 #: modules.local/embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php:99 205 #: modules/inpsyde/payoneer-embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php:99 206 206 msgid "Backend processing finished, frontend processing is about to start." 207 207 msgstr "" … … 219 219 220 220 #. translators: Order note added when processing an order in hosted flow 221 #: modules.local/hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php:1 22222 #: modules/inpsyde/payoneer-hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php:1 22221 #: modules.local/hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php:110 222 #: modules/inpsyde/payoneer-hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php:110 223 223 msgid "The customer is being redirected to the hosted payment page." 224 224 msgstr "" … … 326 326 327 327 #. translators: %1$s is replaced with transaction Long ID 328 #: modules.local/payment-methods/inc/services.php:58 9329 #: modules/inpsyde/payoneer-payment-methods/inc/services.php:58 9328 #: modules.local/payment-methods/inc/services.php:582 329 #: modules/inpsyde/payoneer-payment-methods/inc/services.php:582 330 330 #, php-format 331 331 msgid "Refunded by Payoneer Checkout - long ID: %1$s" … … 353 353 354 354 #: modules.local/settings/inc/fields.php:53 355 #: modules.local/status-report/inc/services.php:4 2355 #: modules.local/status-report/inc/services.php:49 356 356 #: modules/inpsyde/payoneer-settings/inc/fields.php:53 357 #: modules/inpsyde/payoneer-status-report/inc/services.php:4 2357 #: modules/inpsyde/payoneer-status-report/inc/services.php:49 358 358 msgid "API username" 359 359 msgstr "" … … 438 438 msgstr "" 439 439 440 #: modules.local/status-report/inc/services.php:33 441 #: modules/inpsyde/payoneer-status-report/inc/services.php:33 440 #. translators: Title of the settings section 441 #: modules.local/status-report/inc/fields.php:16 442 #: modules/inpsyde/payoneer-status-report/inc/fields.php:16 443 msgid "System Report" 444 msgstr "" 445 446 #. translators: Name of the opt-in setting (displayed on left side) 447 #: modules.local/status-report/inc/fields.php:22 448 #: modules/inpsyde/payoneer-status-report/inc/fields.php:22 449 msgid "Automated Troubleshooting" 450 msgstr "" 451 452 #. translators: Label of the opt-in field (displayed next to the checkbox) 453 #: modules.local/status-report/inc/fields.php:24 454 #: modules/inpsyde/payoneer-status-report/inc/fields.php:24 455 msgid "Enable" 456 msgstr "" 457 458 #. translators: Description of the opt-in setting (displayed below the checkbox) 459 #: modules.local/status-report/inc/fields.php:27 460 #: modules/inpsyde/payoneer-status-report/inc/fields.php:27 461 msgid "When \"Enable\" is checked, Payoneer support can remotely collect system information to help resolve issues, if they arise, without interrupting you.<br/>When \"Enable\" is unchecked, Payoneer support will need to request information manually from you, which could slow down the troubleshooting process and might delay problem resolution.<br/>We therefore recommend to keep \"Enable\" checked." 462 msgstr "" 463 464 #: modules.local/status-report/inc/services.php:40 465 #: modules/inpsyde/payoneer-status-report/inc/services.php:40 442 466 msgid "Shop country code" 443 467 msgstr "" 444 468 445 #: modules.local/status-report/inc/services.php: 35446 #: modules/inpsyde/payoneer-status-report/inc/services.php: 35469 #: modules.local/status-report/inc/services.php:42 470 #: modules/inpsyde/payoneer-status-report/inc/services.php:42 447 471 msgid "Country / State value on Settings / General / Store Address." 448 472 msgstr "" 449 473 450 #: modules.local/status-report/inc/services.php: 47451 #: modules/inpsyde/payoneer-status-report/inc/services.php: 47474 #: modules.local/status-report/inc/services.php:54 475 #: modules/inpsyde/payoneer-status-report/inc/services.php:54 452 476 msgid "Payment flow" 453 477 msgstr "" 454 478 455 #: modules.local/status-report/inc/services.php: 49456 #: modules/inpsyde/payoneer-status-report/inc/services.php: 49479 #: modules.local/status-report/inc/services.php:56 480 #: modules/inpsyde/payoneer-status-report/inc/services.php:56 457 481 msgid "Displays whether a plugin is using a hosted or an embedded payment flow" 458 482 msgstr "" -
payoneer-checkout/trunk/modules/inpsyde/payment-gateway/CHANGELOG.md
r3260742 r3321269 1 ## [2.7.1](https://github.com/inpsyde/payment-gateway/compare/2.7.0...2.7.1) (2025-06-20) 2 3 4 ### Bug Fixes 5 6 * 🔧 Change WooCommerce hook from `woocommerce_blocks_loaded` to `woocommerce_init` ([#50](https://github.com/inpsyde/payment-gateway/issues/50)) ([b9919e8](https://github.com/inpsyde/payment-gateway/commit/b9919e8f98dcf8cee99b2dfe0cdbdc89f47c641b)) 7 8 # [2.7.0](https://github.com/inpsyde/payment-gateway/compare/2.6.0...2.7.0) (2025-04-02) 9 10 11 ### Bug Fixes 12 13 * Add id in ContentField ([a3747d9](https://github.com/inpsyde/payment-gateway/commit/a3747d90f9b804598158289434f41a2f8b32ef1b)) 14 15 16 ### Features 17 18 * Add render_directly option in ContentField ([6becaaf](https://github.com/inpsyde/payment-gateway/commit/6becaaf304cbe676f648f40b769ceccdfb8b36a6)) 19 20 # [2.6.0](https://github.com/inpsyde/payment-gateway/compare/2.5.0...2.6.0) (2025-03-14) 21 22 23 ### Features 24 25 * Allow to override savedTokenComponent in blocks ([#48](https://github.com/inpsyde/payment-gateway/issues/48)) ([11d99eb](https://github.com/inpsyde/payment-gateway/commit/11d99ebf4fff9272884c87bac89055148d3b09a8)) 26 27 # [2.5.0](https://github.com/inpsyde/payment-gateway/compare/2.4.1...2.5.0) (2025-03-14) 28 29 30 ### Bug Fixes 31 32 * 📝 Remove redundant `get_form_fields` method and streamline form fields handling ([#47](https://github.com/inpsyde/payment-gateway/issues/47)) ([0b17b89](https://github.com/inpsyde/payment-gateway/commit/0b17b89e26460ba0e02e10fe559e61823f1e5051)), closes [#123](https://github.com/inpsyde/payment-gateway/issues/123) 33 34 35 ### Features 36 37 * Add support for plugin_slug property ([#45](https://github.com/inpsyde/payment-gateway/issues/45)) ([d7fd64c](https://github.com/inpsyde/payment-gateway/commit/d7fd64c96b649d14796368b76ca86fb4b7ece525)) 38 1 39 ## [2.4.1](https://github.com/inpsyde/payment-gateway/compare/2.4.0...2.4.1) (2025-02-26) 2 40 -
payoneer-checkout/trunk/modules/inpsyde/payment-gateway/assets/js/frontend/blocks.asset.php
r3260742 r3321269 3 3 namespace Syde\Vendor; 4 4 5 return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-hooks', 'wp-html-entities', 'wp-i18n'), 'version' => ' d2b7cb451e648fd13cd7');5 return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-hooks', 'wp-html-entities', 'wp-i18n'), 'version' => 'e765912913b16a921729'); -
payoneer-checkout/trunk/modules/inpsyde/payment-gateway/assets/js/frontend/blocks.js
r3260742 r3321269 1 (()=>{"use strict";const e=window.React,t=window.wp.i18n,n=window.wc.wcBlocksRegistry,a=window.wp.htmlEntities,l=window.wc.wcSettings, o=window.wp.hooks;inpsydeGateways.forEach((c=>{const r=(0,l.getSetting)(`${c}_data`,{}),s=`${c}_checkout_fields`,i=`${c}_payment_method_icons`,d=(0,t.__)("Syde Payment Gateway","syde-payment-gateway"),m=(0,a.decodeEntities)(r.title)||d,w=t=>{const[n,l]=(0,e.useState)([]);if((0,e.useEffect)((()=>{l(o.defaultHooks.applyFilters(s,[]))}),[]),!Array.isArray(n)||!n.length){const t=()=>(0,a.decodeEntities)(r.description||"");return(0,e.createElement)(t,null)}return(0,e.createElement)(e.Fragment,null,n.map((n=>(0,e.createElement)(n,{...t}))))},u={name:c,label:(0,e.createElement)((t=>{const{PaymentMethodLabel:n,PaymentMethodIcons:a}=t.components;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n,{text:m}),(0,e.createElement)(a,{icons:o.defaultHooks.applyFilters(i,r.icons)}))}),null),content:(0,e.createElement)(w,null),edit:(0,e.createElement)(w,null),icons:r.icons,canMakePayment:()=>!0,ariaLabel:m,supports:{features:r.supports}};r.placeOrderButtonLabel&&(u.placeOrderButtonLabel=r.placeOrderButtonLabel),(0,n.registerPaymentMethod)(u)}))})();1 (()=>{"use strict";const e=window.React,t=window.wp.i18n,n=window.wc.wcBlocksRegistry,a=window.wp.htmlEntities,l=window.wc.wcSettings,r=window.wp.hooks;inpsydeGateways.forEach(o=>{const s=(0,l.getSetting)(`${o}_data`,{}),c=`${o}_checkout_fields`,i=`${o}_saved_token_fields`,d=`${o}_payment_method_icons`,m=(0,t.__)("Syde Payment Gateway","syde-payment-gateway"),u=(0,a.decodeEntities)(s.title)||m,p=t=>{const[n,l]=(0,e.useState)([]);if((0,e.useEffect)(()=>{l(r.defaultHooks.applyFilters(c,[]))},[]),!Array.isArray(n)||!n.length){const t=()=>(0,a.decodeEntities)(s.description||"");return(0,e.createElement)(t,null)}return(0,e.createElement)(e.Fragment,null,n.map(n=>(0,e.createElement)(n,{...t})))},w={name:o,label:(0,e.createElement)(t=>{const{PaymentMethodLabel:n,PaymentMethodIcons:a}=t.components;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n,{text:u}),(0,e.createElement)(a,{icons:r.defaultHooks.applyFilters(d,s.icons)}))},null),content:(0,e.createElement)(p,null),edit:(0,e.createElement)(p,null),savedTokenComponent:(0,e.createElement)(t=>{const[n,a]=(0,e.useState)([]);return(0,e.useEffect)(()=>{a(r.defaultHooks.applyFilters(i,[]))},[]),Array.isArray(n)&&n.length?(0,e.createElement)(e.Fragment,null,n.map(n=>(0,e.createElement)(n,{...t}))):null},null),icons:s.icons,canMakePayment:()=>!0,ariaLabel:u,supports:{features:s.supports}};s.placeOrderButtonLabel&&(w.placeOrderButtonLabel=s.placeOrderButtonLabel),(0,n.registerPaymentMethod)(w)})})(); -
payoneer-checkout/trunk/modules/inpsyde/payment-gateway/src/Fields/ContentField.php
r3124685 r3321269 19 19 $data = array_merge(['title' => '', 'disabled' => \false, 'class' => '', 'css' => '', 'placeholder' => '', 'type' => 'text', 'desc_tip' => \false, 'description' => '', 'custom_attributes' => []], $fieldConfig); 20 20 $hasTitle = !empty($data['title']); 21 $renderDirectly = $data['render_directly'] ?? \false; 21 22 // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped 22 23 ob_start(); 23 24 ?> 24 <tr valign="top"> 25 <tr valign="top" id="<?php 26 echo $fieldKey; 27 ?>"> 25 28 <?php 26 29 if ($hasTitle) { … … 48 51 ?>"> 49 52 <?php 50 echo $ gateway->get_description_html($data);53 echo $renderDirectly ? wp_kses_post((string) $data['description']) : $gateway->get_description_html($data); 51 54 ?> 52 55 </td> -
payoneer-checkout/trunk/modules/inpsyde/payment-gateway/src/PaymentGateway.php
r3260742 r3321269 55 55 unset($this->method_description); 56 56 unset($this->icon); 57 unset($this->form_fields); 57 58 add_action('woocommerce_update_options_payment_gateways_' . $this->id, [$this, 'process_admin_options']); 58 59 add_action('woocommerce_settings_checkout', [$this, 'display_errors']); … … 380 381 * @inheritDoc 381 382 */ 382 public function get_form_fields()383 {384 if (!$this->form_fields) {385 $this->form_fields = $this->locate('form_fields');386 }387 return parent::get_form_fields();388 }389 /**390 * @inheritDoc391 */392 383 public function get_option_key() 393 384 { … … 474 465 return $this->locate($name); 475 466 } 467 if ($name === 'plugin_slug') { 468 return $this->locate($name); 469 } 476 470 if ($name === 'icon') { 477 471 return $this->locateWithFallback($name, null); 478 472 } 473 if ($name === 'form_fields') { 474 return $this->locate('form_fields'); 475 } 479 476 return $this->{$name}; 480 477 } -
payoneer-checkout/trunk/modules/inpsyde/payment-gateway/src/PaymentGatewayModule.php
r3260742 r3321269 12 12 use Syde\Vendor\Inpsyde\Modularity\Module\ModuleClassNameIdTrait; 13 13 use Syde\Vendor\Inpsyde\Modularity\Module\ServiceModule; 14 use Syde\Vendor\Inpsyde\Modularity\Package; 15 use Syde\Vendor\Inpsyde\Modularity\Properties\PluginProperties; 14 16 use Syde\Vendor\Inpsyde\PaymentGateway\Fields\ContentField; 15 17 use Syde\Vendor\Inpsyde\PaymentGateway\Method\PaymentMethodDefinition; … … 31 33 public function services(): array 32 34 { 33 return array_merge(['payment_gateways.assets_url' => function (): string { 34 return $this->getPluginFileUrlFromAbsolutePath(dirname(__DIR__) . '/assets'); 35 }, 'payment_gateways.assets_path' => static function (): string { 36 return dirname(__DIR__) . '/assets'; 37 }, 'payment_gateways.noop_payment_request_validator' => static function (): PaymentRequestValidatorInterface { 38 return new NoopPaymentRequestValidator(); 39 }, 'payment_gateways.noop_payment_processor' => static function (): PaymentProcessorInterface { 40 return new NoopPaymentProcessor(); 41 }, 'payment_gateways.noop_refund_processor' => static function (): RefundProcessorInterface { 42 return new NoopRefundProcessor(); 43 }, 'payment_gateways.settings_field_renderer.content' => static function (): SettingsFieldRendererInterface { 44 return new ContentField(); 45 }, 'payment_gateways' => function (): array { 46 $gateways = []; 47 foreach ($this->paymentMethods as $paymentMethod) { 48 $gateways[] = $paymentMethod->id(); 49 } 50 return $gateways; 51 }, 'payment_gateways.methods_supporting_blocks' => static function (ContainerInterface $container): array { 52 $supported = []; 53 $allMethods = $container->get('payment_gateways'); 54 foreach ($allMethods as $method) { 55 $registerBlocksKey = 'payment_gateway.' . $method . '.register_blocks'; 56 $shouldRegister = \true; 57 if ($container->has($registerBlocksKey)) { 58 $shouldRegister = (bool) $container->get($registerBlocksKey); 35 return array_merge([ 36 /** 37 * WooCommerce (>= 9.6) derives the payment gateway plugin slug via reflection 38 * (see \Automattic\WooCommerce\Internal\Admin\Settings\PaymentProviders\PaymentGateway::get_plugin_slug) 39 * but first checks if the plugin_slug property is set. By setting it explicitly here, we 40 * prevent potential namespace conflicts when multiple plugins use this payment gateway library. 41 */ 42 'payment_gateways.plugin_slug' => static function (ContainerInterface $container): string { 43 /** @var PluginProperties $properties */ 44 $pluginProperties = $container->get(Package::PROPERTIES); 45 return $pluginProperties->baseName(); 46 }, 47 'payment_gateways.assets_url' => function (): string { 48 return $this->getPluginFileUrlFromAbsolutePath(dirname(__DIR__) . '/assets'); 49 }, 50 'payment_gateways.assets_path' => static function (): string { 51 return dirname(__DIR__) . '/assets'; 52 }, 53 'payment_gateways.noop_payment_request_validator' => static function (): PaymentRequestValidatorInterface { 54 return new NoopPaymentRequestValidator(); 55 }, 56 'payment_gateways.noop_payment_processor' => static function (): PaymentProcessorInterface { 57 return new NoopPaymentProcessor(); 58 }, 59 'payment_gateways.noop_refund_processor' => static function (): RefundProcessorInterface { 60 return new NoopRefundProcessor(); 61 }, 62 'payment_gateways.settings_field_renderer.content' => static function (): SettingsFieldRendererInterface { 63 return new ContentField(); 64 }, 65 'payment_gateways' => function (): array { 66 $gateways = []; 67 foreach ($this->paymentMethods as $paymentMethod) { 68 $gateways[] = $paymentMethod->id(); 59 69 } 60 if ($shouldRegister) { 61 $supported[] = $method; 70 return $gateways; 71 }, 72 'payment_gateways.methods_supporting_blocks' => static function (ContainerInterface $container): array { 73 $supported = []; 74 $allMethods = $container->get('payment_gateways'); 75 foreach ($allMethods as $method) { 76 $registerBlocksKey = 'payment_gateway.' . $method . '.register_blocks'; 77 $shouldRegister = \true; 78 if ($container->has($registerBlocksKey)) { 79 $shouldRegister = (bool) $container->get($registerBlocksKey); 80 } 81 if ($shouldRegister) { 82 $supported[] = $method; 83 } 62 84 } 63 } 64 return $supported; 65 }, 'payment_gateways.required_services' => static function (): array { 66 return ['payment_gateway.%s.payment_request_validator', 'payment_gateway.%s.payment_processor']; 67 }, 'payment_gateways.validator' => static function (ContainerInterface $container): PaymentGatewayValidator { 68 $requiredServices = $container->get('payment_gateways.required_services'); 69 assert(is_array($requiredServices)); 70 return new PaymentGatewayValidator($container, $requiredServices); 71 }, 'payment_gateways.i18n' => static fn(ContainerInterface $container): I18n => new I18n($container), 'payment_gateways.i18n.messages' => static fn(): array => ['refund_order_not_found' => static fn(array $params): string => sprintf( 72 /* translators: %1$s is replaced with the actual order ID. */ 73 __('Failed to process the refund: the order with ID %1$s not found', 'syde-payment-gateway'), 74 (string) $params['orderId'] 75 ), 'refund_failed' => __('Failed to refund the order payment', 'syde-payment-gateway'), 'payment_method_not_available' => __('Payment method not available. Please select another payment method.', 'syde-payment-gateway')]], $this->providePaymentMethodServices(...$this->paymentMethods)); 85 return $supported; 86 }, 87 'payment_gateways.required_services' => static function (): array { 88 return ['payment_gateway.%s.payment_request_validator', 'payment_gateway.%s.payment_processor']; 89 }, 90 'payment_gateways.validator' => static function (ContainerInterface $container): PaymentGatewayValidator { 91 $requiredServices = $container->get('payment_gateways.required_services'); 92 assert(is_array($requiredServices)); 93 return new PaymentGatewayValidator($container, $requiredServices); 94 }, 95 'payment_gateways.i18n' => static fn(ContainerInterface $container): I18n => new I18n($container), 96 'payment_gateways.i18n.messages' => static fn(): array => ['refund_order_not_found' => static fn(array $params): string => sprintf( 97 /* translators: %1$s is replaced with the actual order ID. */ 98 __('Failed to process the refund: the order with ID %1$s not found', 'syde-payment-gateway'), 99 (string) $params['orderId'] 100 ), 'refund_failed' => __('Failed to refund the order payment', 'syde-payment-gateway'), 'payment_method_not_available' => __('Payment method not available. Please select another payment method.', 'syde-payment-gateway')], 101 ], $this->providePaymentMethodServices(...$this->paymentMethods)); 76 102 } 77 103 public function run(ContainerInterface $container): bool … … 93 119 * 94 120 */ 95 add_action('woocommerce_ blocks_loaded', function () use ($container): void {121 add_action('woocommerce_init', function () use ($container): void { 96 122 if (!class_exists(AbstractPaymentMethodType::class)) { 97 123 return; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-embedded-payment/assets/payoneer-checkout.asset.php
r3305047 r3321269 3 3 namespace Syde\Vendor; 4 4 5 return array('dependencies' => array('jquery', 'react', 'wc-blocks-data-store', 'wp-api-fetch', 'wp-data', 'wp-hooks'), 'version' => ' 9ca74476643627ca1471');5 return array('dependencies' => array('jquery', 'react', 'wc-blocks-data-store', 'wp-api-fetch', 'wp-data', 'wp-hooks'), 'version' => 'e1e588052347528f5d49'); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-embedded-payment/assets/payoneer-checkout.js
r3305047 r3321269 1 !function(){"use strict";var e={20:function(e,t,o){var n=o(609),a=Symbol.for("react.element"),r=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,o){var n,i={},d=null,l=null;for(n in void 0!==o&&(d=""+o),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(l=t.ref),t)r.call(t,n)&&!s.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:a,type:e,key:d,ref:l,props:i,_owner:c.current}}},609:function(e){e.exports=window.React},848:function(e,t,o){e.exports=o(20)}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{addComponent:function(){return O},initPayoneerComponents:function(){return k},mountComponents:function(){return P},onBeforeError:function(){return C},onComponentListChange:function(){return M},onPaymentDeclined:function(){return L},onValidationInfo:function(){return A},pay:function(){return N},reboot:function(){return v},releaseOnHoldOrder:function(){return x},removeComponent:function(){return I},setActivePaymentMethod:function(){return b},setEnv:function(){return D},setForceHostedFlow:function(){return R},setIsValid:function(){return F},setLongId:function(){return g},setOnPaymentDeclinedNonce:function(){return H},setOrderId:function(){return V},setSdkState:function(){return T}});var a={};o.r(a),o.d(a,{getEnv:function(){return W},getExtensionData:function(){return G},getLongId:function(){return q},getSdk:function(){return U},getSdkIntegrity:function(){return $},getSdkVersion:function(){return X}});var r=window.jQuery,c=o.n(r);const{paymentFieldsComponentAttribute:s}=window.PayoneerData,i=()=>document.querySelector('.woocommerce-checkout input[name="payment_method"]:checked'),d=()=>i()?.id,l=()=>{return e=d(),/^payment_method_payoneer-(checkout|afterpay)/i.test(e);var e},p=()=>"1"===window.PayoneerData.isPayForOrder,y=()=>{i()?.focus()};var u=window.wp.data;const E={SET_EXTENSION_DATA:"SET_EXTENSION_DATA",SET_LONG_ID:"SET_LONG_ID",SET_LIST_URL:"SET_LIST_URL",SET_ENV:"SET_ENV",SET_SDK:"SET_SDK",SET_SDK_VERSION:"SET_SDK_VERSION",SET_SDK_INTEGRITY:"SET_SDK_INTEGRITY",SET_SDK_STATE:"SET_SDK_STATE",ADD_COMPONENT:"ADD_COMPONENT",REMOVE_COMPONENT:"REMOVE_COMPONENT",MOUNT_COMPONENTS:"MOUNT_COMPONENTS",PAY:"PAY",SET_ACTIVE_PAYMENT_METHOD:"SET_ACTIVE_PAYMENT_METHOD",SET_FORCE_HOSTED_FLOW:"SET_FORCE_HOSTED_FLOW",SET_IS_VALID:"SET_IS_VALID",SET_ORDER_ID:"SET_ORDER_ID",SET_ON_PAYMENT_DECLINED_NONCE:"SET_ON_PAYMENT_DECLINED_NONCE"},_={activePaymentMethod:"",longId:null,env:null,sdkState:"UNINITIALIZED",forceHostedFlow:!0,isValid:!1,availableDropInComponents:[]};const S=e=>({"payoneer-checkout":"cards","payoneer-afterpay":"afterpay"}[e]),{paymentFieldsComponentAttribute:m}=window.PayoneerData,w=(e,t)=>{for(const[o,n]of Object.entries(e)){const e=h(o);e instanceof Element&&t.isAvailable(o)&&n.mount(e)}},h=function(e){return document.querySelector(`[${m}=${e}]`)};var f=window.wp.hooks;const g=e=>async({select:t,resolveSelect:o,dispatch:n})=>{const a=await o.getSdk();await a.updateLongId(e),n({type:E.SET_LONG_ID,payload:e})},T=e=>({type:E.SET_SDK_STATE,payload:e});function D(e){return{type:E.SET_ENV,payload:e}}const O=e=>async({select:t,resolveSelect:o,dispatch:n})=>{const a=await o.getSdk();if(console.log(a),!a.isDroppedIn(e)&&"object"==typeof h(e))try{const t={name:e,component:a.dropIn(e,{hidePaymentButton:!0})};console.log("New component",t),n({type:E.ADD_COMPONENT,payload:t}),w({[t.name]:t.component},a)}catch(t){console.error(`Failed to drop in component ${e}. Error details: ${t}`)}};function I(e){return{type:E.REMOVE_COMPONENT,payload:e}}const k=()=>async({select:e,resolveSelect:t,dispatch:o})=>{const n=await t.getSdk(),a=await t.getLongId();await n.updateLongId(a),await o.mountComponents()},v=()=>async({select:e,resolveSelect:t,dispatch:o})=>{f.defaultHooks.doAction("payoneer.webSdk.reboot"),wp.data.dispatch("wc/store/cart").invalidateResolutionForStore(),o.invalidateResolutionForStore(),await o.mountComponents()},P=()=>async({select:e,resolveSelect:t,dispatch:o})=>{const n=await t.getSdk(),a=e.getAvailableDropInComponents();console.log("Mounting components",a),w(a,n)},N=()=>({select:e,dispatch:t})=>{const o=e.getAvailableDropInComponents(),n=e.getActivePaymentMethod(),a=o[S(n)];a?a.pay():console.log("Component not found.")},C=(e,t,o)=>async({select:n,dispatch:a})=>(a.setSdkState(e.state),console.error("WebSDK error:",{sdk:e,component:t,data:o}),["SYSTEM_FAILURE"].includes(o?.interaction?.reason)?(a.setForceHostedFlow(!0),!0):f.defaultHooks.applyFilters("payoneer.webSdk.onSdkError",!1,e,t,o)),L=(e,t,o)=>async({select:n,dispatch:a})=>f.defaultHooks.applyFilters("payoneer.webSdk.onPaymentDeclined",!0,e,t,o),M=(e,t)=>async({select:o,dispatch:n})=>{console.log("onComponentListChange",e,t),t.addedComponents.forEach( (e=>{n.addComponent(e)})),t.removedComponents.forEach((e=>{n.removeComponent(e)}))},A=(e,t,o)=>async({select:e,dispatch:n})=>{console.log(t,o),n.setIsValid(o.valid)},b=e=>async({dispatch:t})=>{console.log("Setting active payment method",e),t.mountComponents(),t({type:E.SET_ACTIVE_PAYMENT_METHOD,payload:e})};function R(e){return console.log("Setting hosted flow override flag",e),{type:E.SET_FORCE_HOSTED_FLOW,payload:e}}function F(e){return{type:E.SET_IS_VALID,payload:e}}const H=e=>({dispatch:t})=>{t({type:E.SET_ON_PAYMENT_DECLINED_NONCE,payload:e})},V=e=>({dispatch:t})=>{t({type:E.SET_ORDER_ID,payload:e})},x=e=>async({dispatch:t})=>{const o=window.wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","payoneer-checkout-payment-declined"),n=o.includes("?")?"&":"?",a=o+n+"_ajax_nonce="+window.PayoneerData.onPaymentDeclinedNonce;return new Promise(((o,n)=>{c().ajax({type:"POST",url:a,xhrFields:{withCredentials:!0},data:e,dataType:"json"}).success((e=>{t.setOnPaymentDeclinedNonce(e.nonce),o(e)})).catch((e=>{console.log(e),n(e)}))}))};var j=window.wp.apiFetch,K=o.n(j);const{websdkStyles:Y}=PayoneerData,U=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getEnv(),n=await e.getSdkVersion(),a=await e.getSdkIntegrity(),r=await e.getLongId(),c=await(s={env:o,sdkVersion:n,sdkIntegrity:a,onBeforeError:async(e,o,n)=>await t.onBeforeError(e,o,n),onPaymentDeclined:async(e,o,n)=>await t.onPaymentDeclined(e,o,n),onComponentListChange:async(e,o)=>await t.onComponentListChange(e,o),onValidationInfo:async(e,o,n)=>await t.onValidationInfo(e,o,n),preload:["cards"],styles:Y},window.Payoneer?.CheckoutWeb?window.Payoneer.CheckoutWeb(s):new Promise(((e,t)=>{const o=document.createElement("script");o.src=((e,t)=>{const o=t?`-${t}`:"";return new URL(window.PayoneerData.webSdkUmdUrlTemplate?.replace("<env>",e)?.replace("<version>",o))})(s.env,s.sdkVersion),o.onload=e,o.onerror=t,s.sdkVersion&&s.sdkIntegrity&&(o.integrity=s.sdkIntegrity,o.crossOrigin="anonymous"),document.head.appendChild(o)})).then((()=>window.Payoneer.CheckoutWeb(s))));var s;if("LOADING"===c.state){const e=async()=>await new Promise((e=>{const t=setInterval((()=>{"LOADING"!==c.state&&(e(c.state),clearInterval(t))}),1e3)}));await e()}await c.updateLongId(r),await t.setForceHostedFlow(!1),await t.setSdkState(c.state),await t({type:E.SET_SDK,payload:c})},G=()=>async({dispatch:e})=>{const t=await K()({path:"/wc/store/v1/cart#skipPreloadingMiddleware",method:"GET",cache:"no-store",parse:!1}),o=(await t.json()).extensions["payoneer-checkout"];console.log("Payoneer Extension Data: ",o),await e({type:E.SET_EXTENSION_DATA,payload:o}),f.defaultHooks.doAction("payoneer.checkout.onReceiveExtensionData",o)},q=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getExtensionData();await t({type:E.SET_LONG_ID,payload:o.longId})},W=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getExtensionData();await t({type:E.SET_ENV,payload:o.environment})},X=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getExtensionData();await t({type:E.SET_SDK_VERSION,payload:o.sdkVersion})},$=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getExtensionData();await t({type:E.SET_SDK_INTEGRITY,payload:o.sdkIntegrity})};const B="payoneer-checkout",Q=(0,u.createReduxStore)(B,{reducer:(e=_,t)=>{switch(t.type){case E.SET_EXTENSION_DATA:return{...e,extension:t.payload};case E.SET_LONG_ID:return{...e,longId:t.payload};case E.SET_LIST_URL:return{...e,listUrl:t.payload};case E.SET_ENV:return{...e,env:t.payload};case E.SET_SDK:return{...e,sdk:t.payload};case E.SET_SDK_VERSION:return{...e,sdkVersion:t.payload};case E.SET_SDK_INTEGRITY:return{...e,sdkIntegrity:t.payload};case E.SET_SDK_STATE:return{...e,sdkState:t.payload};case E.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:t.payload};case E.SET_FORCE_HOSTED_FLOW:return{...e,forceHostedFlow:t.payload};case E.SET_IS_VALID:return{...e,isValid:t.payload};case E.SET_ORDER_ID:return{...e,orderId:t.payload};case E.SET_ON_PAYMENT_DECLINED_NONCE:return{...e,onPaymentDeclinedNonce:t.payload};case E.ADD_COMPONENT:return{...e,availableDropInComponents:{...e.availableDropInComponents,[t.payload.name]:t.payload.component}};case E.REMOVE_COMPONENT:let o={...e.availableDropInComponents};return delete o[t.payload.name],{...e,availableDropInComponents:o};default:return e}},actions:n,selectors:{getExtensionData:e=>e.extension,getLongId:e=>e.longId,getEnv:e=>e.env,getSdkVersion:e=>e.sdkVersion,getSdkIntegrity:e=>e.sdkIntegrity,getSdk:e=>e.sdk,isHostedModeForced:e=>e.forceHostedFlow,getIsValid:e=>"payoneer-checkout"!==e.activePaymentMethod||e.isValid,getActivePaymentMethod:e=>e.activePaymentMethod,getAvailableDropInComponents:e=>e.availableDropInComponents,getOrderId:e=>e.orderId,getOnPaymentDeclinedNonce:e=>e.onPaymentDeclinedNonce},resolvers:a});(0,u.register)(Q);const z="x-payoneer-checkout-force-hosted-flow",Z="x-payoneer-is-payment-checkout",J=()=>{const e={[z]:String((0,u.select)(B).isHostedModeForced()),[Z]:p&&new URLSearchParams(window.location.search).get("key")||""};return f.defaultHooks.applyFilters("payoneer.http.customHeaders",e)};f.defaultHooks.addAction("payoneer.checkout.onReceiveExtensionData","payoneer/setupCustomHttpHeaders",(()=>{f.defaultHooks.addFilter("payoneer.http.customHeaders","payoneer/setupCustomHttpHeaders",(function(e){return e["x-payoneer-long-id"]=String((0,u.select)(B).getLongId()),e}))}));var ee=window.wc.wcBlocksData;const te=()=>{const e=function(){const e=null!==(t=document.querySelector('.woocommerce-checkout input[name="payment_method"]:checked').value)&&void 0!==t?t:"";var t;(0,u.dispatch)(B).setActivePaymentMethod(e)};jQuery(document.body).on("payment_method_selected",e),e()};var oe=o(609),ne=o(848);const ae=()=>(0,u.dispatch)(B).initPayoneerComponents(),re=()=>(0,u.dispatch)(B).pay(),ce=()=>(0,u.dispatch)(B).reboot(),se=(0,u.withSelect)(((e,t)=>{const o=e(B),{activePaymentMethod:n,eventRegistration:a}=t;return{activePaymentMethod:n,eventRegistration:a,payWithPayoneer:re,initPayoneerComponents:ae,rebootPayoneer:ce,isValid:o.getIsValid()}}))((function({payWithPayoneer:e,initPayoneerComponents:t,paymentMethodData:o,rebootPayoneer:n,activePaymentMethod:a,eventRegistration:r,isValid:c}){const{onPaymentSetup:s,onCheckoutSuccess:i,onCheckoutFail:d}=r;(0,oe.useEffect)((()=>{t()}),[]),(0,oe.useEffect)((()=>i((({orderId:t})=>{(0,u.dispatch)(B).setOrderId(t),e()}))),[]),(0,oe.useEffect)((()=>d(n)),[]),(0,oe.useEffect)((()=>s((()=>c?{type:"success"}:{type:"failure",message:"Invalid payment fields"}))),[c,s,o]);const l=S(a);return(0,ne.jsx)("div",{className:`payment_method_${a}`,"data-component":l})})),ie=(0,u.select)(B);document.addEventListener("DOMContentLoaded",(async()=>{const e=window.fetch;if(window.fetch=async(...t)=>{let[o,n]=t;if(new URL(o,window.location.origin).origin!==window.location.origin)return e(o,n);const a=J();return console.log("Adding custom headers to fetch call",a),n=n&&n.headers?{...n,headers:{...n.headers,...a}}:{...n,headers:a},await e(o,n)},!window.XMLHttpRequest)return;const t=XMLHttpRequest.prototype.open,o=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(e,o,...n){this._isSameOrigin=new URL(o,window.location.origin).origin===window.location.origin,t.apply(this,[e,o,...n])},XMLHttpRequest.prototype.send=function(...e){const t=J();if(this._isSameOrigin){console.log("Adding custom headers to XMLHttpRequest call",t);for(const[e,o]of Object.entries(t))this.setRequestHeader(e,o)}o.apply(this,e)}}),!1),p()?(console.log("Loading payment checkout integration"),document.addEventListener("DOMContentLoaded",(()=>{te(),(0,u.dispatch)(B).setOnPaymentDeclinedNonce(PayoneerData.onPaymentDeclinedNonce);const e=c()("#order_review");f.defaultHooks.addFilter("payoneer.webSdk.onSdkError","payoneer/paymentCheckout",((e,t,o,n)=>{const{payOrderErrorFlag:a}=window.PayoneerData,r=new URL(document.location);return r.searchParams.set(a,!0),window.location.href=r.toString(),e})),wp.hooks.addFilter("payoneer.webSdk.onPaymentDeclined","payoneer/paymentCheckout",(async()=>(await wp.data.dispatch(B).releaseOnHoldOrder({longId:(0,u.select)(B).getLongId(),orderKey:new URLSearchParams(window.location.search).get("key")}),window.location.reload(),!1))),e.on("submit",(t=>{if(l()&&!(0,u.select)(B).isHostedModeForced()){if(t.preventDefault(),t.stopImmediatePropagation(),!(0,u.select)(B).getIsValid())try{y()}catch(e){console.error(e)}finally{return}var o;(o=e,o.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),c().ajax({type:"POST",url:window.wc_checkout_params.ajax_url,xhrFields:{withCredentials:!0},dataType:"json",data:{action:"payoneer_order_pay",fields:o.serialize(),params:new URL(document.location).searchParams.toString()}}).always((()=>o.unblock()))).then((()=>(0,u.dispatch)(B).pay())).catch((()=>{window.scrollTo(0,0),window.location.reload()}))}})),(0,u.dispatch)(B).mountComponents()}),!1)):"1"===window?.PayoneerData?.isBlockCheckout?(console.log("Loading classic checkout integration"),(()=>{let e;const t=(0,u.select)(ee.PAYMENT_STORE_KEY),o=()=>{const o=t.getActivePaymentMethod();e!==o&&((0,u.dispatch)(B).setActivePaymentMethod(o),e=o)};(0,u.subscribe)(o,ee.PAYMENT_STORE_KEY),o()})(),Array.isArray(inpsydeGateways)?inpsydeGateways.forEach((e=>{var t;t=e,wp.hooks.addFilter(`${t}_checkout_fields`,t,(e=>(e.push(se),e))),wp.hooks.addFilter("payoneer-checkout_payment_method_icons","payoneer-checkout",(e=>"payoneer-checkout"===ie.getActivePaymentMethod()?[]:e))})):console.error("window.inpsydeGateways not found"),document.addEventListener("DOMContentLoaded",(()=>{wp.hooks.addFilter("payoneer.webSdk.onPaymentDeclined","payoneer/blockCheckout",(()=>(wp.data.dispatch(B).releaseOnHoldOrder({longId:(0,u.select)(B).getLongId(),payoneerOrderId:(0,u.select)(B).getOrderId()}),window.location.reload(),!0)))}),!1)):(console.log("Loading classic checkout integration"),document.addEventListener("DOMContentLoaded",(()=>{te(),(0,u.dispatch)(B).setOnPaymentDeclinedNonce(PayoneerData.onPaymentDeclinedNonce);const e=c()("form.checkout");f.defaultHooks.addFilter("payoneer.webSdk.onSdkError","payoneer/shortcodeCheckout",((e,t,o,n)=>(wp.data.dispatch(B).reboot(),c()(document.body).trigger("update_checkout"),e))),wp.hooks.addFilter("payoneer.webSdk.onPaymentDeclined","payoneer/shortcodeCheckout",(()=>(wp.data.dispatch(B).releaseOnHoldOrder({longId:(0,u.select)(B).getLongId()}),!1))),c()(document.body).on("updated_checkout",(()=>(0,u.dispatch)(B).initPayoneerComponents())),e.on("checkout_place_order",(()=>{if((0,u.select)(B).getIsValid())return!0;try{y()}catch(e){console.error(e)}finally{return!1}})),e.on("checkout_place_order_success",((t,o)=>{if(l()&&!(0,u.select)(B).isHostedModeForced())return(0,u.dispatch)(B).pay(),o.redirect="#payoneer-redirect",setTimeout((()=>{e.removeClass("processing").unblock(),c().scroll_to_notices(c()((e=>{const t=".payment_box."+e;return document.querySelector(t)})(d())))}),1500),!1}))}),!1))}();1 !function(){"use strict";var e={20:function(e,t,o){var n=o(609),a=Symbol.for("react.element"),r=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,o){var n,i={},d=null,l=null;for(n in void 0!==o&&(d=""+o),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(l=t.ref),t)r.call(t,n)&&!s.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:a,type:e,key:d,ref:l,props:i,_owner:c.current}}},609:function(e){e.exports=window.React},848:function(e,t,o){e.exports=o(20)}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{addComponent:function(){return O},initPayoneerComponents:function(){return k},mountComponents:function(){return P},onBeforeError:function(){return C},onComponentListChange:function(){return M},onPaymentDeclined:function(){return L},onValidationInfo:function(){return A},pay:function(){return N},reboot:function(){return v},releaseOnHoldOrder:function(){return x},removeComponent:function(){return I},setActivePaymentMethod:function(){return b},setEnv:function(){return D},setForceHostedFlow:function(){return R},setIsValid:function(){return F},setLongId:function(){return g},setOnPaymentDeclinedNonce:function(){return H},setOrderId:function(){return V},setSdkState:function(){return T}});var a={};o.r(a),o.d(a,{getEnv:function(){return W},getExtensionData:function(){return G},getLongId:function(){return q},getSdk:function(){return U},getSdkIntegrity:function(){return $},getSdkVersion:function(){return X}});var r=window.jQuery,c=o.n(r);const{paymentFieldsComponentAttribute:s}=window.PayoneerData,i=()=>document.querySelector('.woocommerce-checkout input[name="payment_method"]:checked'),d=()=>i()?.id,l=()=>{return e=d(),/^payment_method_payoneer-(checkout|afterpay)/i.test(e);var e},p=()=>"1"===window.PayoneerData.isPayForOrder,y=()=>{i()?.focus()};var u=window.wp.data;const E={SET_EXTENSION_DATA:"SET_EXTENSION_DATA",SET_LONG_ID:"SET_LONG_ID",SET_LIST_URL:"SET_LIST_URL",SET_ENV:"SET_ENV",SET_SDK:"SET_SDK",SET_SDK_VERSION:"SET_SDK_VERSION",SET_SDK_INTEGRITY:"SET_SDK_INTEGRITY",SET_SDK_STATE:"SET_SDK_STATE",ADD_COMPONENT:"ADD_COMPONENT",REMOVE_COMPONENT:"REMOVE_COMPONENT",MOUNT_COMPONENTS:"MOUNT_COMPONENTS",PAY:"PAY",SET_ACTIVE_PAYMENT_METHOD:"SET_ACTIVE_PAYMENT_METHOD",SET_FORCE_HOSTED_FLOW:"SET_FORCE_HOSTED_FLOW",SET_IS_VALID:"SET_IS_VALID",SET_ORDER_ID:"SET_ORDER_ID",SET_ON_PAYMENT_DECLINED_NONCE:"SET_ON_PAYMENT_DECLINED_NONCE"},_={activePaymentMethod:"",longId:null,env:null,sdkState:"UNINITIALIZED",forceHostedFlow:!0,isValid:!1,availableDropInComponents:[]};const S=e=>({"payoneer-checkout":"cards","payoneer-afterpay":"afterpay"}[e]),{paymentFieldsComponentAttribute:m}=window.PayoneerData,w=(e,t)=>{for(const[o,n]of Object.entries(e)){const e=h(o);e instanceof Element&&t.isAvailable(o)&&n.mount(e)}},h=function(e){return document.querySelector(`[${m}=${e}]`)};var f=window.wp.hooks;const g=e=>async({select:t,resolveSelect:o,dispatch:n})=>{const a=await o.getSdk();await a.updateLongId(e),n({type:E.SET_LONG_ID,payload:e})},T=e=>({type:E.SET_SDK_STATE,payload:e});function D(e){return{type:E.SET_ENV,payload:e}}const O=e=>async({select:t,resolveSelect:o,dispatch:n})=>{const a=await o.getSdk();if(console.log(a),!a.isDroppedIn(e)&&"object"==typeof h(e))try{const t={name:e,component:a.dropIn(e,{hidePaymentButton:!0})};console.log("New component",t),n({type:E.ADD_COMPONENT,payload:t}),w({[t.name]:t.component},a)}catch(t){console.error(`Failed to drop in component ${e}. Error details: ${t}`)}};function I(e){return{type:E.REMOVE_COMPONENT,payload:e}}const k=()=>async({select:e,resolveSelect:t,dispatch:o})=>{const n=await t.getSdk(),a=await t.getLongId();await n.updateLongId(a),await o.mountComponents()},v=()=>async({select:e,resolveSelect:t,dispatch:o})=>{f.defaultHooks.doAction("payoneer.webSdk.reboot"),wp.data.dispatch("wc/store/cart").invalidateResolutionForStore(),o.invalidateResolutionForStore(),await o.mountComponents()},P=()=>async({select:e,resolveSelect:t,dispatch:o})=>{const n=await t.getSdk(),a=e.getAvailableDropInComponents();console.log("Mounting components",a),w(a,n)},N=()=>({select:e,dispatch:t})=>{const o=e.getAvailableDropInComponents(),n=e.getActivePaymentMethod(),a=o[S(n)];a?a.pay():console.log("Component not found.")},C=(e,t,o)=>async({select:n,dispatch:a})=>(a.setSdkState(e.state),console.error("WebSDK error:",{sdk:e,component:t,data:o}),["SYSTEM_FAILURE"].includes(o?.interaction?.reason)?(a.setForceHostedFlow(!0),!0):f.defaultHooks.applyFilters("payoneer.webSdk.onSdkError",!1,e,t,o)),L=(e,t,o)=>async({select:n,dispatch:a})=>f.defaultHooks.applyFilters("payoneer.webSdk.onPaymentDeclined",!0,e,t,o),M=(e,t)=>async({select:o,dispatch:n})=>{console.log("onComponentListChange",e,t),t.addedComponents.forEach(e=>{n.addComponent(e)}),t.removedComponents.forEach(e=>{n.removeComponent(e)})},A=(e,t,o)=>async({select:e,dispatch:n})=>{console.log(t,o),n.setIsValid(o.valid)},b=e=>async({dispatch:t})=>{console.log("Setting active payment method",e),t.mountComponents(),t({type:E.SET_ACTIVE_PAYMENT_METHOD,payload:e})};function R(e){return console.log("Setting hosted flow override flag",e),{type:E.SET_FORCE_HOSTED_FLOW,payload:e}}function F(e){return{type:E.SET_IS_VALID,payload:e}}const H=e=>({dispatch:t})=>{t({type:E.SET_ON_PAYMENT_DECLINED_NONCE,payload:e})},V=e=>({dispatch:t})=>{t({type:E.SET_ORDER_ID,payload:e})},x=e=>async({dispatch:t})=>{const o=window.wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","payoneer-checkout-payment-declined"),n=o.includes("?")?"&":"?",a=o+n+"_ajax_nonce="+window.PayoneerData.onPaymentDeclinedNonce;return new Promise((o,n)=>{c().ajax({type:"POST",url:a,xhrFields:{withCredentials:!0},data:e,dataType:"json"}).success(e=>{t.setOnPaymentDeclinedNonce(e.nonce),o(e)}).catch(e=>{console.log(e),n(e)})})};var j=window.wp.apiFetch,K=o.n(j);const{websdkStyles:Y}=PayoneerData,U=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getEnv(),n=await e.getSdkVersion(),a=await e.getSdkIntegrity(),r=await e.getLongId(),c=await(s={env:o,sdkVersion:n,sdkIntegrity:a,onBeforeError:async(e,o,n)=>await t.onBeforeError(e,o,n),onPaymentDeclined:async(e,o,n)=>await t.onPaymentDeclined(e,o,n),onComponentListChange:async(e,o)=>await t.onComponentListChange(e,o),onValidationInfo:async(e,o,n)=>await t.onValidationInfo(e,o,n),preload:["cards"],styles:Y},window.Payoneer?.CheckoutWeb?window.Payoneer.CheckoutWeb(s):new Promise((e,t)=>{const o=document.createElement("script");o.src=((e,t)=>{const o=t?`-${t}`:"";return new URL(window.PayoneerData.webSdkUmdUrlTemplate?.replace("<env>",e)?.replace("<version>",o))})(s.env,s.sdkVersion),o.onload=e,o.onerror=t,s.sdkVersion&&s.sdkIntegrity&&(o.integrity=s.sdkIntegrity,o.crossOrigin="anonymous"),document.head.appendChild(o)}).then(()=>window.Payoneer.CheckoutWeb(s)));var s;if("LOADING"===c.state){const e=async()=>await new Promise(e=>{const t=setInterval(()=>{"LOADING"!==c.state&&(e(c.state),clearInterval(t))},1e3)});await e()}await c.updateLongId(r),await t.setForceHostedFlow(!1),await t.setSdkState(c.state),await t({type:E.SET_SDK,payload:c})},G=()=>async({dispatch:e})=>{const t=await K()({path:"/wc/store/v1/cart#skipPreloadingMiddleware",method:"GET",cache:"no-store",parse:!1}),o=(await t.json()).extensions["payoneer-checkout"];console.log("Payoneer Extension Data: ",o),await e({type:E.SET_EXTENSION_DATA,payload:o}),f.defaultHooks.doAction("payoneer.checkout.onReceiveExtensionData",o)},q=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getExtensionData();await t({type:E.SET_LONG_ID,payload:o.longId})},W=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getExtensionData();await t({type:E.SET_ENV,payload:o.environment})},X=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getExtensionData();await t({type:E.SET_SDK_VERSION,payload:o.sdkVersion})},$=()=>async({resolveSelect:e,dispatch:t})=>{const o=await e.getExtensionData();await t({type:E.SET_SDK_INTEGRITY,payload:o.sdkIntegrity})};const B="payoneer-checkout",Q=(0,u.createReduxStore)(B,{reducer:(e=_,t)=>{switch(t.type){case E.SET_EXTENSION_DATA:return{...e,extension:t.payload};case E.SET_LONG_ID:return{...e,longId:t.payload};case E.SET_LIST_URL:return{...e,listUrl:t.payload};case E.SET_ENV:return{...e,env:t.payload};case E.SET_SDK:return{...e,sdk:t.payload};case E.SET_SDK_VERSION:return{...e,sdkVersion:t.payload};case E.SET_SDK_INTEGRITY:return{...e,sdkIntegrity:t.payload};case E.SET_SDK_STATE:return{...e,sdkState:t.payload};case E.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:t.payload};case E.SET_FORCE_HOSTED_FLOW:return{...e,forceHostedFlow:t.payload};case E.SET_IS_VALID:return{...e,isValid:t.payload};case E.SET_ORDER_ID:return{...e,orderId:t.payload};case E.SET_ON_PAYMENT_DECLINED_NONCE:return{...e,onPaymentDeclinedNonce:t.payload};case E.ADD_COMPONENT:return{...e,availableDropInComponents:{...e.availableDropInComponents,[t.payload.name]:t.payload.component}};case E.REMOVE_COMPONENT:let o={...e.availableDropInComponents};return delete o[t.payload.name],{...e,availableDropInComponents:o};default:return e}},actions:n,selectors:{getExtensionData:e=>e.extension,getLongId:e=>e.longId,getEnv:e=>e.env,getSdkVersion:e=>e.sdkVersion,getSdkIntegrity:e=>e.sdkIntegrity,getSdk:e=>e.sdk,isHostedModeForced:e=>e.forceHostedFlow,getIsValid:e=>"payoneer-checkout"!==e.activePaymentMethod||e.isValid,getActivePaymentMethod:e=>e.activePaymentMethod,getAvailableDropInComponents:e=>e.availableDropInComponents,getOrderId:e=>e.orderId,getOnPaymentDeclinedNonce:e=>e.onPaymentDeclinedNonce},resolvers:a});(0,u.register)(Q);const z="x-payoneer-checkout-force-hosted-flow",Z="x-payoneer-is-payment-checkout",J=()=>{const e={[z]:String((0,u.select)(B).isHostedModeForced()),[Z]:p&&new URLSearchParams(window.location.search).get("key")||""};return f.defaultHooks.applyFilters("payoneer.http.customHeaders",e)};f.defaultHooks.addAction("payoneer.checkout.onReceiveExtensionData","payoneer/setupCustomHttpHeaders",()=>{f.defaultHooks.addFilter("payoneer.http.customHeaders","payoneer/setupCustomHttpHeaders",function(e){return e["x-payoneer-long-id"]=String((0,u.select)(B).getLongId()),e})});var ee=window.wc.wcBlocksData;const te=()=>{const e=function(){const e=null!==(t=document.querySelector('.woocommerce-checkout input[name="payment_method"]:checked').value)&&void 0!==t?t:"";var t;(0,u.dispatch)(B).setActivePaymentMethod(e)};jQuery(document.body).on("payment_method_selected",e),e()};var oe=o(609),ne=o(848);const ae=()=>(0,u.dispatch)(B).initPayoneerComponents(),re=()=>(0,u.dispatch)(B).pay(),ce=()=>(0,u.dispatch)(B).reboot(),se=(0,u.withSelect)((e,t)=>{const o=e(B),{activePaymentMethod:n,eventRegistration:a}=t;return{activePaymentMethod:n,eventRegistration:a,payWithPayoneer:re,initPayoneerComponents:ae,rebootPayoneer:ce,isValid:o.getIsValid()}})(function({payWithPayoneer:e,initPayoneerComponents:t,paymentMethodData:o,rebootPayoneer:n,activePaymentMethod:a,eventRegistration:r,isValid:c}){const{onPaymentSetup:s,onCheckoutSuccess:i,onCheckoutFail:d}=r;(0,oe.useEffect)(()=>{t()},[]),(0,oe.useEffect)(()=>i(({orderId:t})=>{(0,u.dispatch)(B).setOrderId(t),e()}),[]),(0,oe.useEffect)(()=>d(n),[]),(0,oe.useEffect)(()=>s(()=>c?{type:"success"}:{type:"failure",message:"Invalid payment fields"}),[c,s,o]);const l=S(a);return(0,ne.jsx)("div",{className:`payment_method_${a}`,"data-component":l})}),ie=(0,u.select)(B);document.addEventListener("DOMContentLoaded",async()=>{const e=window.fetch;if(window.fetch=async(...t)=>{let[o,n]=t;if(new URL(o,window.location.origin).origin!==window.location.origin)return e(o,n);const a=J();return console.log("Adding custom headers to fetch call",a),n=n&&n.headers?{...n,headers:{...n.headers,...a}}:{...n,headers:a},await e(o,n)},!window.XMLHttpRequest)return;const t=XMLHttpRequest.prototype.open,o=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(e,o,...n){this._isSameOrigin=new URL(o,window.location.origin).origin===window.location.origin,t.apply(this,[e,o,...n])},XMLHttpRequest.prototype.send=function(...e){const t=J();if(this._isSameOrigin){console.log("Adding custom headers to XMLHttpRequest call",t);for(const[e,o]of Object.entries(t))this.setRequestHeader(e,o)}o.apply(this,e)}},!1),p()?(console.log("Loading payment checkout integration"),document.addEventListener("DOMContentLoaded",()=>{te(),(0,u.dispatch)(B).setOnPaymentDeclinedNonce(PayoneerData.onPaymentDeclinedNonce);const e=c()("#order_review");f.defaultHooks.addFilter("payoneer.webSdk.onSdkError","payoneer/paymentCheckout",(e,t,o,n)=>{const{payOrderErrorFlag:a}=window.PayoneerData,r=new URL(document.location);return r.searchParams.set(a,!0),window.location.href=r.toString(),e}),wp.hooks.addFilter("payoneer.webSdk.onPaymentDeclined","payoneer/paymentCheckout",async()=>(await wp.data.dispatch(B).releaseOnHoldOrder({longId:(0,u.select)(B).getLongId(),orderKey:new URLSearchParams(window.location.search).get("key")}),window.location.reload(),!1)),e.on("submit",t=>{if(l()&&!(0,u.select)(B).isHostedModeForced()){if(t.preventDefault(),t.stopImmediatePropagation(),!(0,u.select)(B).getIsValid())try{y()}catch(e){console.error(e)}finally{return}var o;(o=e,o.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),c().ajax({type:"POST",url:window.wc_checkout_params.ajax_url,xhrFields:{withCredentials:!0},dataType:"json",data:{action:"payoneer_order_pay",fields:o.serialize(),params:new URL(document.location).searchParams.toString()}}).always(()=>o.unblock())).then(()=>(0,u.dispatch)(B).pay()).catch(()=>{window.scrollTo(0,0),window.location.reload()})}}),(0,u.dispatch)(B).mountComponents()},!1)):"1"===window?.PayoneerData?.isBlockCheckout?(console.log("Loading classic checkout integration"),(()=>{let e;const t=(0,u.select)(ee.PAYMENT_STORE_KEY),o=()=>{const o=t.getActivePaymentMethod();e!==o&&((0,u.dispatch)(B).setActivePaymentMethod(o),e=o)};(0,u.subscribe)(o,ee.PAYMENT_STORE_KEY),o()})(),Array.isArray(inpsydeGateways)?inpsydeGateways.forEach(e=>{var t;t=e,wp.hooks.addFilter(`${t}_checkout_fields`,t,e=>(e.push(se),e)),wp.hooks.addFilter("payoneer-checkout_payment_method_icons","payoneer-checkout",e=>"payoneer-checkout"===ie.getActivePaymentMethod()?[]:e)}):console.error("window.inpsydeGateways not found"),document.addEventListener("DOMContentLoaded",()=>{wp.hooks.addFilter("payoneer.webSdk.onPaymentDeclined","payoneer/blockCheckout",()=>(wp.data.dispatch(B).releaseOnHoldOrder({longId:(0,u.select)(B).getLongId(),payoneerOrderId:(0,u.select)(B).getOrderId()}),window.location.reload(),!0))},!1)):(console.log("Loading classic checkout integration"),document.addEventListener("DOMContentLoaded",()=>{te(),(0,u.dispatch)(B).setOnPaymentDeclinedNonce(PayoneerData.onPaymentDeclinedNonce);const e=c()("form.checkout");f.defaultHooks.addFilter("payoneer.webSdk.onSdkError","payoneer/shortcodeCheckout",(e,t,o,n)=>(wp.data.dispatch(B).reboot(),c()(document.body).trigger("update_checkout"),e)),wp.hooks.addFilter("payoneer.webSdk.onPaymentDeclined","payoneer/shortcodeCheckout",()=>(wp.data.dispatch(B).releaseOnHoldOrder({longId:(0,u.select)(B).getLongId()}),!1)),c()(document.body).on("updated_checkout",()=>(0,u.dispatch)(B).initPayoneerComponents()),e.on("checkout_place_order",()=>{if((0,u.select)(B).getIsValid())return!0;try{y()}catch(e){console.error(e)}finally{return!1}}),e.on("checkout_place_order_success",(t,o)=>{if(l()&&!(0,u.select)(B).isHostedModeForced())return(0,u.dispatch)(B).pay(),o.redirect="#payoneer-redirect",setTimeout(()=>{e.removeClass("processing").unblock(),c().scroll_to_notices(c()((e=>{const t=".payment_box."+e;return document.querySelector(t)})(d())))},1500),!1})},!1))}(); 2 2 //# sourceMappingURL=payoneer-checkout.js.map -
payoneer-checkout/trunk/modules/inpsyde/payoneer-embedded-payment/assets/payoneer-checkout.js.map
r3305047 r3321269 1 {"version":3,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AAKtB,SAAS+G,GAAoB5D,mBACpC,CACCzE,QAAQoB,EAAAA,EAAAA,QAAQiH,GAAqB9F,eAGhC,KAQT+C,IAAGrH,SAASoM,MAAOC,GAAI,oBAAoB,KAAMhJ,EAAAA,EAAAA,UAAU+G,GAAqB/F,2BAEhFyM,EAAczE,GAAG,wBAAwB,KAExC,IADgBlJ,EAAAA,EAAAA,QAAQiH,GAAqBU,aAE5C,OAAO,EAGR,IACCrK,GACD,CAAE,MAAM0D,GACPP,QAAQO,MAAMA,EACf,CAAE,QACD,OAAO,CACR,KAGD2M,EAAczE,GAAI,gCAAgC,CAAErO,EAAGgT,KACtD,GAAM5Q,OAA+B+C,EAAAA,EAAAA,QAAQiH,GAAqBS,qBAwBlE,OArBAxH,EAAAA,EAAAA,UAAU+G,GAAqBrF,MAG/BiM,EAAOC,SAAW,qBAWlBC,YAAY,KACXJ,EAAcK,YAAa,cAAetB,UAC1CxI,IAAAA,kBACCA,IrBrDyB/G,KAC9B,MAAM8Q,EAAW,gBAAkB9Q,EACnC,OAAON,SAASC,cAAemR,EAAU,EAIzCC,CAAenR,MqBgDV,GACC,OAEI,CAAK,GACV,IAEJ,G","sources":["webpack://payoneer-embedded-payment/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://payoneer-embedded-payment/external window \"React\"","webpack://payoneer-embedded-payment/./node_modules/react/jsx-runtime.js","webpack://payoneer-embedded-payment/webpack/bootstrap","webpack://payoneer-embedded-payment/webpack/runtime/compat get default export","webpack://payoneer-embedded-payment/webpack/runtime/define property getters","webpack://payoneer-embedded-payment/webpack/runtime/hasOwnProperty shorthand","webpack://payoneer-embedded-payment/webpack/runtime/make namespace object","webpack://payoneer-embedded-payment/external window \"jQuery\"","webpack://payoneer-embedded-payment/./resources/js/src/util/woocommerce.js","webpack://payoneer-embedded-payment/external window [\"wp\",\"data\"]","webpack://payoneer-embedded-payment/./resources/js/src/store/constants.js","webpack://payoneer-embedded-payment/./resources/js/src/store/reducer.js","webpack://payoneer-embedded-payment/./resources/js/src/util/components.js","webpack://payoneer-embedded-payment/external window [\"wp\",\"hooks\"]","webpack://payoneer-embedded-payment/./resources/js/src/store/actions.js","webpack://payoneer-embedded-payment/./resources/js/src/util/sdk/umdLoader.js","webpack://payoneer-embedded-payment/external window [\"wp\",\"apiFetch\"]","webpack://payoneer-embedded-payment/./resources/js/src/store/resolvers.js","webpack://payoneer-embedded-payment/./resources/js/src/store/index.js","webpack://payoneer-embedded-payment/./resources/js/src/store/selectors.js","webpack://payoneer-embedded-payment/./resources/js/src/util/http.js","webpack://payoneer-embedded-payment/external window [\"wc\",\"wcBlocksData\"]","webpack://payoneer-embedded-payment/./resources/js/src/store/storeListeners.js","webpack://payoneer-embedded-payment/./resources/js/src/components/widgetContainer/component.js","webpack://payoneer-embedded-payment/./resources/js/src/components/widgetContainer/provider.js","webpack://payoneer-embedded-payment/./resources/js/src/components/widgetContainer/index.js","webpack://payoneer-embedded-payment/./resources/js/src/util/checkout/blockCheckout.js","webpack://payoneer-embedded-payment/./resources/js/payoneer-checkout.js","webpack://payoneer-embedded-payment/./resources/js/src/util/checkout/paymentCheckout.js","webpack://payoneer-embedded-payment/./resources/js/src/util/checkout/classicCheckout.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","module.exports = window[\"React\"];","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"jQuery\"];","import $ from 'jquery';\nconst {\n\tpaymentFieldsComponentAttribute\n} = window.PayoneerData;\n\nexport const paymentMethodName = () => {\n\treturn document.querySelector( '.woocommerce-checkout input[name=\"payment_method\"]:checked' ).value ?? '';\n}\n\nexport const selectedPaymentGateway = () => {\n\treturn document.querySelector(\n\t\t'.woocommerce-checkout input[name=\"payment_method\"]:checked'\n\t)\n};\n\nexport const selectedPaymentGatewayId = () => {\n\treturn selectedPaymentGateway()?.id;\n};\n\nexport const getComponentNameFromPaymentBox = function ( paymentBox ) {\n\treturn paymentBox\n\t\t?.querySelector( `[${ paymentFieldsComponentAttribute }]` )\n\t\t?.getAttribute( paymentFieldsComponentAttribute );\n};\n\nexport const isPayoneerGateway = ( gatewayId ) => {\n\treturn /^payment_method_payoneer-(checkout|afterpay)/i.test( gatewayId );\n};\n\nexport const isPayoneerGatewaySelected = () =>\n\tisPayoneerGateway( selectedPaymentGatewayId() );\n\nexport const isPayForOrder = () => {\n\treturn window.PayoneerData.isPayForOrder === '1';\n};\n\nexport const getPaymentBox = ( gatewayId ) => {\n\tconst selector = '.payment_box.' + gatewayId;\n\treturn document.querySelector( selector );\n};\n\nexport const getSelectedPaymentBox = () =>\n\tgetPaymentBox( selectedPaymentGatewayId() );\n\nconst hostedOverrideFlagInput = () => {\n\tconst { hostedFlowOverrideFlag } = window.PayoneerData;\n\treturn document.querySelector(\n\t\t`input[name=\"${ hostedFlowOverrideFlag }\"]`\n\t);\n};\n\nexport const submitOrderPayViaAjax = ( $form ) => {\n\t//Blocks the UI in the same way Woocommerce does (source: https://github.com/woocommerce/woocommerce/blob/6.0.1/plugins/woocommerce/assets/js/frontend/checkout.js#L454-L466)\n\t$form.block( {\n\t\tmessage: null,\n\t\toverlayCSS: {\n\t\t\tbackground: '#fff',\n\t\t\topacity: 0.6,\n\t\t},\n\t} );\n\n\treturn $.ajax( {\n\t\ttype: 'POST',\n\t\turl: window.wc_checkout_params.ajax_url,\n\t\txhrFields: {\n\t\t\t// This is important. We need the session cookie to access the LIST in the back-end\n\t\t\twithCredentials: true,\n\t\t},\n\t\tdataType: 'json',\n\t\tdata: {\n\t\t\taction: 'payoneer_order_pay',\n\t\t\tfields: $form.serialize(),\n\t\t\tparams: new URL( document.location ).searchParams.toString(),\n\t\t},\n\t} ).always( () => $form.unblock() );\n};\n\nexport const isBlockCheckout = () =>\n\twindow?.PayoneerData?.isBlockCheckout === '1';\n\nexport const focusOnSelectedGateway = () => {\n\tselectedPaymentGateway()?.focus();\n}\n","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","export const ACTIONS = {\n\tSET_EXTENSION_DATA: 'SET_EXTENSION_DATA',\n\tSET_LONG_ID: 'SET_LONG_ID',\n\tSET_LIST_URL: 'SET_LIST_URL',\n\tSET_ENV: 'SET_ENV',\n\tSET_SDK: 'SET_SDK',\n\tSET_SDK_VERSION: 'SET_SDK_VERSION',\n\tSET_SDK_INTEGRITY: 'SET_SDK_INTEGRITY',\n\tSET_SDK_STATE: 'SET_SDK_STATE',\n\tADD_COMPONENT: 'ADD_COMPONENT',\n\tREMOVE_COMPONENT: 'REMOVE_COMPONENT',\n\tMOUNT_COMPONENTS: 'MOUNT_COMPONENTS',\n\tPAY: 'PAY',\n\tSET_ACTIVE_PAYMENT_METHOD: 'SET_ACTIVE_PAYMENT_METHOD',\n\tSET_FORCE_HOSTED_FLOW: 'SET_FORCE_HOSTED_FLOW',\n\tSET_IS_VALID: 'SET_IS_VALID',\n\tSET_ORDER_ID: 'SET_ORDER_ID',\n\tSET_ON_PAYMENT_DECLINED_NONCE: 'SET_ON_PAYMENT_DECLINED_NONCE',\n};\n","import { ACTIONS } from './constants';\n\nconst initialState = {\n\tactivePaymentMethod: '',\n\tlongId: null,\n\tenv: null,\n\tsdkState: 'UNINITIALIZED',\n\tforceHostedFlow: true,\n\tisValid: false,\n\tavailableDropInComponents: []\n};\n\nconst reducer = (state = initialState, action) => {\n\tswitch (action.type) {\n\t\tcase ACTIONS.SET_EXTENSION_DATA:\n\t\t\treturn { ...state, extension: action.payload };\n\t\tcase ACTIONS.SET_LONG_ID:\n\t\t\treturn { ...state, longId: action.payload };\n\t\tcase ACTIONS.SET_LIST_URL:\n\t\t\treturn { ...state, listUrl: action.payload };\n\t\tcase ACTIONS.SET_ENV:\n\t\t\treturn { ...state, env: action.payload };\n\t\tcase ACTIONS.SET_SDK:\n\t\t\treturn { ...state, sdk: action.payload };\n\t\tcase ACTIONS.SET_SDK_VERSION:\n\t\t\treturn { ...state, sdkVersion: action.payload };\n\t\tcase ACTIONS.SET_SDK_INTEGRITY:\n\t\t\treturn { ...state, sdkIntegrity: action.payload };\n\t\tcase ACTIONS.SET_SDK_STATE:\n\t\t\treturn { ...state, sdkState: action.payload };\n\t\tcase ACTIONS.SET_ACTIVE_PAYMENT_METHOD:\n\t\t\treturn { ...state, activePaymentMethod: action.payload };\n\t\tcase ACTIONS.SET_FORCE_HOSTED_FLOW:\n\t\t\treturn { ...state, forceHostedFlow: action.payload };\n\t\tcase ACTIONS.SET_IS_VALID:\n\t\t\treturn { ...state, isValid: action.payload };\n\t\tcase ACTIONS.SET_ORDER_ID:\n\t\t\treturn { ...state, orderId: action.payload };\n\t\tcase ACTIONS.SET_ON_PAYMENT_DECLINED_NONCE:\n\t\t\treturn { ...state, onPaymentDeclinedNonce: action.payload };\n\t\tcase ACTIONS.ADD_COMPONENT:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tavailableDropInComponents: {\n\t\t\t\t\t...state.availableDropInComponents,\n\t\t\t\t\t[action.payload.name]: action.payload.component\n\t\t\t\t}\n\t\t\t};\n\t\tcase ACTIONS.REMOVE_COMPONENT:\n\t\t\tlet availableDropInComponents = { ...state.availableDropInComponents };\n\t\t\tdelete availableDropInComponents[action.payload.name];\n\t\t\treturn { ...state, availableDropInComponents };\n\t\tdefault:\n\t\t\treturn state;\n\t}\n};\n\nexport default reducer;\n","import {\n\tgetPaymentBox,\n\tgetComponentNameFromPaymentBox,\n\tsetHostedOverride\n} from './woocommerce';\n\nexport const getComponentNameByGatewayId = ( gatewayId ) => {\n\tconst gatewayIdToComponentName = {\n\t\t'payoneer-checkout': 'cards',\n\t\t'payoneer-afterpay': 'afterpay',\n\t};\n\n\treturn gatewayIdToComponentName[ gatewayId ];\n}\n\nconst { paymentFieldsComponentAttribute } = window.PayoneerData;\n\nexport const mountComponents = ( components, sdk ) => {\n\tfor ( const [ componentName, component ] of Object.entries( components ) ) {\n\t\tconst container = findComponentContainer( componentName );\n\t\tif (\n\t\t\tcontainer instanceof Element &&\n\t\t\tsdk.isAvailable( componentName )\n\t\t) {\n\t\t\tcomponent.mount( container );\n\t\t}\n\t}\n};\n\nexport const findComponentContainer = function ( componentName ) {\n\treturn document.querySelector(\n\t\t`[${paymentFieldsComponentAttribute}=${componentName}]`\n\t);\n};\n","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","import {\n\tmountComponents as doMountComponents,\n\tgetComponentNameByGatewayId,\n\tfindComponentContainer\n} from '../util/components';\nimport { ACTIONS } from './constants';\nimport { defaultHooks } from \"@wordpress/hooks\";\nimport $ from 'jquery';\n\nexport const setLongId = ( longId ) => async ( { select, resolveSelect, dispatch } ) => {\n\tconst sdk = await resolveSelect.getSdk()\n\tawait sdk.updateLongId( longId );\n\tdispatch( { type: ACTIONS.SET_LONG_ID, payload: longId } );\n}\n\nexport const setSdkState = ( sdkState ) => {\n\treturn { type: ACTIONS.SET_SDK_STATE, payload: sdkState };\n};\n\nexport function setEnv( env ) {\n\treturn { type: ACTIONS.SET_ENV, payload: env };\n}\n\nexport const addComponent = ( componentName ) => async ( { select, resolveSelect, dispatch } ) => {\n\tconst sdk = await resolveSelect.getSdk()\n\tconsole.log( sdk )\n\tif ( !sdk.isDroppedIn( componentName ) && typeof findComponentContainer( componentName ) === 'object' ) {\n\t\ttry {\n\t\t\tconst payload = {\n\t\t\t\tname: componentName,\n\t\t\t\tcomponent: sdk.dropIn( componentName, {\n\t\t\t\t\thidePaymentButton: true,\n\t\t\t\t} )\n\t\t\t};\n\t\t\tconsole.log( 'New component', payload );\n\t\t\tdispatch( { type: ACTIONS.ADD_COMPONENT, payload } );\n\t\t\tdoMountComponents( { [ payload.name ]: payload.component }, sdk );\n\t\t} catch ( e ) {\n\t\t\tconsole.error( `Failed to drop in component ${componentName}. Error details: ${e}` );\n\t\t}\n\t}\n}\n\nexport function removeComponent( componentName ) {\n\treturn { type: ACTIONS.REMOVE_COMPONENT, payload: componentName };\n}\n\n/**\n * When a React component is displayed for the first time, the SDK needs to mount its dropIn.\n * So they call this function in a useEffect callback.\n * However:\n * If the SDK has been bootstrapped already, and a new method becomes available after\n * checkout field changes we need to instruct the SDK to refetch the list of dropIn components.\n * This is why we call sdk.updateLongId()\n * After that, the onComponentListChange handler should take care of mounting automatically\n *\n * @returns {(function({select: *, resolveSelect: *, dispatch: *}): Promise<void>)|*}\n */\nexport const initPayoneerComponents = () => async ( { select, resolveSelect, dispatch } ) => {\n\tconst sdk = await resolveSelect.getSdk()\n\tconst longId = await resolveSelect.getLongId()\n\tawait sdk.updateLongId( longId );\n\tawait dispatch.mountComponents()\n}\n\nexport const reboot = () => async ( { select, resolveSelect, dispatch } ) => {\n\tdefaultHooks.doAction( 'payoneer.webSdk.reboot' )\n\twp.data.dispatch( 'wc/store/cart' ).invalidateResolutionForStore();\n\tdispatch.invalidateResolutionForStore()\n\tawait dispatch.mountComponents()\n}\n\nexport const mountComponents = () => async ( { select, resolveSelect, dispatch } ) => {\n\tconst sdk = await resolveSelect.getSdk()\n\tconst availableComponents = select.getAvailableDropInComponents();\n\tconsole.log( 'Mounting components', availableComponents );\n\tdoMountComponents( availableComponents, sdk );\n};\n\nexport const pay = () => ( { select, dispatch } ) => {\n\tconst availableComponents = select.getAvailableDropInComponents();\n\tconst activePaymentMethod = select.getActivePaymentMethod();\n\tconst componentName = getComponentNameByGatewayId( activePaymentMethod );\n\tconst component = availableComponents[ componentName ];\n\tif ( !component ) {\n\t\tconsole.log( 'Component not found.' );\n\t\treturn;\n\t}\n\tcomponent.pay();\n};\n\nexport const onBeforeError = ( sdk, component, data ) => async ( { select, dispatch } ) => {\n\tdispatch.setSdkState( sdk.state );\n\tconsole.error( \"WebSDK error:\", { sdk, component, data } );\n\t/**\n\t * For SYSTEM_FAILURE, we assume there is nothing we can do to recover.\n\t * Use hosted mode fallback and let the customer proceed\n\t */\n\tif ( [ \"SYSTEM_FAILURE\" ].includes( data?.interaction?.reason ) ) {\n\t\tdispatch.setForceHostedFlow( true );\n\t\treturn true;\n\t}\n\t/**\n\t * Let the outside world attempt to handle the error.\n\t * The different checkout types can reboot the payment attempt from there.\n\t */\n\treturn defaultHooks.applyFilters( 'payoneer.webSdk.onSdkError', false, sdk, component, data );\n}\n\nexport const onPaymentDeclined = ( sdk, component, data ) => async ( { select, dispatch } ) => {\n\treturn defaultHooks.applyFilters( 'payoneer.webSdk.onPaymentDeclined', true, sdk, component, data )\n}\n\nexport const onComponentListChange = ( sdk, changeInfo ) => async ( { select, dispatch } ) => {\n\tconsole.log( 'onComponentListChange', sdk, changeInfo );\n\tchangeInfo.addedComponents.forEach( ( name ) => {\n\t\tdispatch.addComponent( name );\n\t} );\n\tchangeInfo.removedComponents.forEach( ( name ) => {\n\t\tdispatch.removeComponent( name );\n\t} );\n}\nexport const onValidationInfo = ( sdk, componentName, data ) => async ( { select, dispatch } ) => {\n\tconsole.log(componentName,data)\n\tdispatch.setIsValid( data.valid )\n}\n\nexport const setActivePaymentMethod = ( method ) => async ( { dispatch } ) => {\n\tconsole.log( 'Setting active payment method', method );\n\tdispatch.mountComponents()\n\tdispatch( { type: ACTIONS.SET_ACTIVE_PAYMENT_METHOD, payload: method } );\n}\n\nexport function setForceHostedFlow( state ) {\n\tconsole.log( 'Setting hosted flow override flag', state );\n\treturn { type: ACTIONS.SET_FORCE_HOSTED_FLOW, payload: state };\n}\n\nexport function setIsValid( flag ) {\n\treturn { type: ACTIONS.SET_IS_VALID, payload: flag };\n}\n\nexport const setOnPaymentDeclinedNonce = ( nonce ) => ( {dispatch} ) => {\n\tdispatch( { type: ACTIONS.SET_ON_PAYMENT_DECLINED_NONCE, payload: nonce} );\n}\n\nexport const setOrderId = ( orderId ) => ( {dispatch} ) => {\n\tdispatch( { type: ACTIONS.SET_ORDER_ID, payload: orderId } );\n}\n\nexport const releaseOnHoldOrder = (requestData) => async ( { dispatch } ) => {\n\tconst targetUrlBase = window.wc_checkout_params.wc_ajax_url.\n\ttoString().\n\treplace( '%%endpoint%%', 'payoneer-checkout-payment-declined' );\n\tconst separator = targetUrlBase.includes('?') ? '&' : '?';\n\tconst targetUrl = targetUrlBase +\n\t\tseparator +\n\t\t'_ajax_nonce=' +\n\t\twindow.PayoneerData.onPaymentDeclinedNonce\n\n\treturn new Promise( ( resolve, reject ) => {\n\t\t$.ajax( {\n\t\t\ttype: 'POST',\n\t\t\turl: targetUrl,\n\t\t\txhrFields: {\n\t\t\t\t// This is important. We need the session cookie to access the LIST in the back-end\n\t\t\t\twithCredentials: true,\n\t\t\t},\n\t\t\tdata: requestData,\n\t\t\tdataType: 'json',\n\t\t} ).success( ( data ) => {\n\t\t\t//New nonce for the next request.\n\t\t\tdispatch.setOnPaymentDeclinedNonce( data.nonce );\n\t\t\tresolve( data );\n\t\t} ).catch( ( e ) => {\n\t\t\tconsole.log( e );\n\t\t\treject( e )\n\t\t} );\n\t} );\n}\n","/*\n * Since the WebSDK is not yet available on npm, we asynchronously\n * load the UMD version from the appropriate env whenever the SDK is initialized\n * for the first time.\n */\n\nconst formatUmdUrl = ( env, sdkVersion ) => {\n\t/**\n\t * When the configuration does not provide a pinned version we can omit the script version to\n\t * load the latest version of the SDK.\n\t *\n\t * @type {string}\n\t */\n\tconst scriptVersion = sdkVersion ? `-${sdkVersion}` : '';\n\n\treturn new URL(\n\t\twindow.PayoneerData.webSdkUmdUrlTemplate\n\t\t\t?.replace( '<env>', env )\n\t\t\t?.replace( '<version>', scriptVersion )\n\t);\n};\n\nconst sdkLoader = ( config ) => {\n\tif ( window.Payoneer?.CheckoutWeb ) {\n\t\treturn window.Payoneer.CheckoutWeb( config );\n\t}\n\n\treturn new Promise( ( resolve, reject ) => {\n\t\tconst script = document.createElement( 'script' );\n\t\tscript.src = formatUmdUrl( config.env, config.sdkVersion );\n\t\tscript.onload = resolve;\n\t\tscript.onerror = reject;\n\n\t\t/**\n\t\t * Add Subresource Integrity (SRI) validation when a specific SDK version is requested.\n\t\t * This enhances security by ensuring the loaded script matches its expected content,\n\t\t * which is a requirement for PCI compliance.\n\t\t */\n\t\tif ( config.sdkVersion && config.sdkIntegrity ) {\n\t\t\tscript.integrity = config.sdkIntegrity;\n\n\t\t\t// Add crossorigin attribute when using integrity checks.\n\t\t\t// This is required for SRI to work properly with CORS.\n\t\t\tscript.crossOrigin = 'anonymous';\n\t\t}\n\t\tdocument.head.appendChild( script );\n\t} ).then( () => {\n\t\treturn window.Payoneer.CheckoutWeb( config );\n\t} );\n};\n\nexport default sdkLoader;\n","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","import { ACTIONS } from \"./constants\";\nimport initializeSdk from \"../util/sdk/umdLoader\";\nimport apiFetch from '@wordpress/api-fetch';\nimport { defaultHooks } from \"@wordpress/hooks\";\n\nconst {\n\twebsdkStyles: styles\n} = PayoneerData;\n\nexport const getSdk = () => async ( { resolveSelect, dispatch } ) => {\n\tconst env = await resolveSelect.getEnv();\n\tconst sdkVersion = await resolveSelect.getSdkVersion();\n\tconst sdkIntegrity = await resolveSelect.getSdkIntegrity();\n\tconst longId = await resolveSelect.getLongId();\n\tconst onBeforeError = async ( sdk, component, data ) => await dispatch.onBeforeError( sdk, component, data );\n\tconst onPaymentDeclined = async ( sdk, component, data ) => await dispatch.onPaymentDeclined( sdk, component, data );\n\tconst onComponentListChange = async ( sdk, changeInfo ) => await dispatch.onComponentListChange( sdk, changeInfo );\n\tconst onValidationInfo = async ( sdk, componentName, data ) => await dispatch.onValidationInfo( sdk, componentName, data );\n\n\tconst sdk = await initializeSdk( {\n\t\tenv,\n\t\tsdkVersion,\n\t\tsdkIntegrity,\n\t\tonBeforeError,\n\t\tonPaymentDeclined,\n\t\tonComponentListChange,\n\t\tonValidationInfo,\n\t\tpreload: [ 'cards' ],\n\t\tstyles\n\t} );\n\n\tif ( sdk.state === 'LOADING' ) {\n\t\tconst nonLoadingState = async () => {\n\t\t\treturn await new Promise( resolve => {\n\t\t\t\tconst interval = setInterval( () => {\n\t\t\t\t\tif ( sdk.state !== 'LOADING' ) {\n\t\t\t\t\t\tresolve( sdk.state );\n\t\t\t\t\t\tclearInterval( interval );\n\t\t\t\t\t}\n\t\t\t\t}, 1000 );\n\t\t\t} );\n\t\t};\n\t\tawait nonLoadingState();\n\t}\n\tawait sdk.updateLongId( longId );\n\tawait dispatch.setForceHostedFlow( false );\n\tawait dispatch.setSdkState( sdk.state );\n\tawait dispatch( { type: ACTIONS.SET_SDK, payload: sdk } );\n}\n/**\n * Perform a Store API call to the cart endpoint where we provide LIST longId and environment\n */\nexport const getExtensionData = () => async ( { dispatch } ) => {\n\n\tconst response = await apiFetch( {\n\t\t/**\n\t\t * /wc/store/v1/cart\n\t\t * is pre-warmed in PHP, so the first API call will always get data produced during\n\t\t * the initial page load.\n\t\t * Here we MUST receive the results of an actual API call.\n\t\t * So we use a custom URL hash to prevent this from happening.\n\t\t */\n\t\tpath: '/wc/store/v1/cart#skipPreloadingMiddleware',\n\t\tmethod: 'GET',\n\t\tcache: 'no-store',\n\t\tparse: false,\n\t} );\n\tconst json = await response.json();\n\tconst payoneerExtensionData = json.extensions[ 'payoneer-checkout' ];\n\tconsole.log('Payoneer Extension Data: ', payoneerExtensionData);\n\tawait dispatch( { type: ACTIONS.SET_EXTENSION_DATA, payload: payoneerExtensionData } );\n\tdefaultHooks.doAction( 'payoneer.checkout.onReceiveExtensionData', payoneerExtensionData )\n}\nexport const getLongId = () => async ( { resolveSelect,dispatch } ) => {\n\tconst extensionData = await resolveSelect.getExtensionData();\n\tawait dispatch( { type: ACTIONS.SET_LONG_ID, payload: extensionData.longId } );\n}\n\nexport const getEnv = () => async ( { resolveSelect,dispatch } ) => {\n\tconst extensionData = await resolveSelect.getExtensionData();\n\tawait dispatch( { type: ACTIONS.SET_ENV, payload: extensionData.environment } );\n}\n\nexport const getSdkVersion = () => async ( { resolveSelect,dispatch } ) => {\n\tconst extensionData = await resolveSelect.getExtensionData();\n\tawait dispatch( { type: ACTIONS.SET_SDK_VERSION, payload: extensionData.sdkVersion } );\n}\n\nexport const getSdkIntegrity = () => async ( { resolveSelect,dispatch } ) => {\n\tconst extensionData = await resolveSelect.getExtensionData();\n\tawait dispatch( { type: ACTIONS.SET_SDK_INTEGRITY, payload: extensionData.sdkIntegrity } );\n}\n","import { createReduxStore, register } from '@wordpress/data';\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as resolvers from './resolvers';\nimport selectors from './selectors';\n\nexport const PAYONEER_STORE_KEY = 'payoneer-checkout';\n\nexport const payoneerStore = createReduxStore(PAYONEER_STORE_KEY, {\n\treducer,\n\tactions,\n\tselectors,\n\tresolvers\n});\n\nregister(payoneerStore);\n\n","\nconst selectors = {\n\t/**\n\t * This is technically only needed temporarily to lazy-fetch longId and env\n\t * in a resolver. Maybe there are better ways to deal with this?\n\t */\n\tgetExtensionData: (state) => state.extension,\n\tgetLongId: (state) => state.longId,\n\tgetEnv: (state) => state.env,\n\tgetSdkVersion: (state) => state.sdkVersion,\n\tgetSdkIntegrity: (state) => state.sdkIntegrity,\n\tgetSdk: (state) => state.sdk,\n\tisHostedModeForced: (state) => state.forceHostedFlow,\n\t/**\n\t * Validity only makes sense for Cards payment method\n\t * https://checkoutdocs.payoneer.com/docs/payment-button#listening-for-validation-events\n\t */\n\tgetIsValid: (state) =>\n\t\tstate.activePaymentMethod !== 'payoneer-checkout' ||\n\t\tstate.isValid,\n\tgetActivePaymentMethod: (state) => state.activePaymentMethod,\n\tgetAvailableDropInComponents: (state) => state.availableDropInComponents,\n\tgetOrderId: (state) => state.orderId,\n\tgetOnPaymentDeclinedNonce: (state) => state.onPaymentDeclinedNonce,\n};\n\nexport default selectors;\n","import { PAYONEER_STORE_KEY } from \"../store/index\";\nimport { select } from '@wordpress/data';\nimport { isPayForOrder } from \"./woocommerce\";\nimport { defaultHooks } from \"@wordpress/hooks\";\n\nconst FORCE_HOSTED_MODE_HEADER = 'x-payoneer-checkout-force-hosted-flow'\nconst LIST_LONG_ID = 'x-payoneer-long-id'\nconst IS_PAYMENT_CHECKOUT = 'x-payoneer-is-payment-checkout'\n\nconst paymentCheckoutHeaderValue = () => {\n\tif ( !isPayForOrder ) {\n\t\treturn '' // to avoid receiving random variables from non-payment pages\n\t}\n\tconst urlParams = new URLSearchParams( window.location.search );\n\treturn urlParams.get( 'key' ) || '';\n};\n\nconst getCustomHeaders = () => {\n\tconst customHeaders = {\n\t\t[ FORCE_HOSTED_MODE_HEADER ]: String( select( PAYONEER_STORE_KEY ).isHostedModeForced() ),\n\t\t[ IS_PAYMENT_CHECKOUT ]: paymentCheckoutHeaderValue()\n\t};\n\treturn defaultHooks.applyFilters( 'payoneer.http.customHeaders', customHeaders );\n};\n\n/**\n * Since we need the getLongId resolver to have run once, we defer adding the header\n */\ndefaultHooks.addAction(\n\t'payoneer.checkout.onReceiveExtensionData',\n\t'payoneer/setupCustomHttpHeaders',\n\t() => {\n\t\tdefaultHooks.addFilter(\n\t\t\t'payoneer.http.customHeaders',\n\t\t\t'payoneer/setupCustomHttpHeaders',\n\t\t\tfunction ( headers ) {\n\t\t\t\theaders[ LIST_LONG_ID ] = String( select( PAYONEER_STORE_KEY ).getLongId() )\n\t\t\t\treturn headers;\n\t\t\t}\n\t\t)\n\t} );\n\n/**\n * We decorate the global fetch function so that we can pass custom headers for outgoing requests.\n * This is used to control the hosted mode fallback in the back-end and for validating\n * that the frontend LIST longId matches the one used by the backend\n */\nexport const setupCustomHttpHeaders = async () => {\n\n\tconst originalFetch = window.fetch;\n\n\twindow.fetch = async ( ...args ) => {\n\t\tlet [ url, options ] = args;\n\t\t// Only process requests going out to the same origin\n\t\tif ( new URL( url, window.location.origin ).origin !== window.location.origin ) {\n\t\t\treturn originalFetch( url, options );\n\t\t}\n\t\tconst customHeaders = getCustomHeaders();\n\t\tconsole.log( 'Adding custom headers to fetch call', customHeaders );\n\t\t// Clone the original options to avoid mutating it\n\t\tif ( options && options.headers ) {\n\t\t\toptions = { ...options, headers: { ...options.headers, ...customHeaders } };\n\t\t} else {\n\t\t\toptions = { ...options, headers: customHeaders };\n\t\t}\n\n\t\treturn await originalFetch( url, options );\n\t};\n\n\tif ( !window.XMLHttpRequest ) {\n\t\treturn;\n\t}\n\n\tconst originalOpen = XMLHttpRequest.prototype.open;\n\tconst originalSend = XMLHttpRequest.prototype.send;\n\n\tXMLHttpRequest.prototype.open = function ( method, url, ...rest ) {\n\t\tthis._isSameOrigin = new URL( url, window.location.origin ).origin === window.location.origin;\n\t\toriginalOpen.apply( this, [ method, url, ...rest ] );\n\t};\n\n\tXMLHttpRequest.prototype.send = function ( ...args ) {\n\t\tconst customHeaders = getCustomHeaders();\n\n\t\tif ( this._isSameOrigin ) {\n\t\t\tconsole.log( 'Adding custom headers to XMLHttpRequest call', customHeaders );\n\t\t\tfor ( const [ header, value ] of Object.entries( customHeaders ) ) {\n\t\t\t\tthis.setRequestHeader( header, value );\n\t\t\t}\n\t\t}\n\t\toriginalSend.apply( this, args );\n\t};\n}\n","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wc\"][\"wcBlocksData\"];","import { dispatch } from '@wordpress/data';\nimport { PAYMENT_STORE_KEY } from '@woocommerce/block-data';\nimport { PAYONEER_STORE_KEY } from \"./index\";\nimport { select, subscribe } from '@wordpress/data';\nimport { paymentMethodName } from \"../util/woocommerce\";\n\nexport const setUpBlockCheckoutListeners = () => {\n\n\tlet currentPaymentMethod;\n\n\tconst wcPaymentStore = select( PAYMENT_STORE_KEY );\n\tconst paymentStoreCallback = () => {\n\t\tconst paymentMethod = wcPaymentStore.getActivePaymentMethod();\n\t\tif ( currentPaymentMethod !== paymentMethod ) {\n\t\t\tdispatch( PAYONEER_STORE_KEY ).setActivePaymentMethod( paymentMethod );\n\t\t\tcurrentPaymentMethod = paymentMethod;\n\t\t}\n\t}\n\tconst unsubscribePaymentStore = subscribe( paymentStoreCallback, PAYMENT_STORE_KEY );\n\tpaymentStoreCallback()\n\n\treturn { unsubscribePaymentStore };\n}\n\nexport const setupClassicCheckoutListeners = () => {\n\tconst paymentMethodCallback = function () {\n\t\tconst methodName = paymentMethodName()\n\t\tdispatch( PAYONEER_STORE_KEY ).setActivePaymentMethod( methodName );\n\t}\n\tjQuery( document.body ).on( 'payment_method_selected', paymentMethodCallback );\n\tpaymentMethodCallback()\n}\n\n\n","import { useEffect } from 'react';\nimport { getComponentNameByGatewayId } from \"../../util/components\";\nimport { dispatch } from '@wordpress/data'\nimport { PAYONEER_STORE_KEY } from \"../../store/index\";\n/**\n * @see https://developer.woocommerce.com/2022/10/06/how-the-checkout-block-processes-an-order/\n * @see https://developer.woocommerce.com/docs/cart-and-checkout-payment-method-integration-for-the-checkout-block/#3-props-fed-to-payment-method-nodes\n */\nexport const Component = function (\n\t{\n\t\tpayWithPayoneer,\n\t\tinitPayoneerComponents,\n\t\tpaymentMethodData,\n\t\trebootPayoneer,\n\t\tactivePaymentMethod,\n\t\teventRegistration,\n\t\tisValid\n\t}\n) {\n\n\tconst { onPaymentSetup, onCheckoutSuccess, onCheckoutFail } = eventRegistration;\n\t/**\n\t * Ping the SDK when we see the light of day\n\t */\n\tuseEffect( () => {\n\t\tinitPayoneerComponents()\n\t}, [] )\n\n\tuseEffect( () => {\n\t\treturn onCheckoutSuccess( ({orderId}) => {\n\t\t\tdispatch(PAYONEER_STORE_KEY).setOrderId(orderId);\n\t\t\tpayWithPayoneer();\n\t\t} );\n\t}, [] );\n\n\tuseEffect( () => {\n\t\treturn onCheckoutFail( rebootPayoneer );\n\t}, [] );\n\t/**\n\t * Enhance the payment data validation step.\n\t * We need to validate that the LIST used in block checkout submit\n\t * matches the one we will use for finalizing the transaction in the backend.\n\t * Therefore, we pass additional metadata in this listener\n\t */\n\tuseEffect( () => {\n\t\treturn onPaymentSetup( () => {\n\t\t\treturn isValid\n\t\t\t\t?\n\t\t\t\t{\n\t\t\t\t\ttype: 'success',\n\t\t\t\t}\n\t\t\t\t:\n\t\t\t\t{\n\t\t\t\t\ttype: 'failure',\n\t\t\t\t\tmessage: 'Invalid payment fields',\n\t\t\t\t}\n\t\t} );\n\t}, [ isValid, onPaymentSetup, paymentMethodData ] );\n\n\tconst componentName = getComponentNameByGatewayId( activePaymentMethod );\n\n\treturn <div\n\t\tclassName={`payment_method_${activePaymentMethod}`}\n\t\tdata-component={componentName}\n\t></div>;\n}\n","import { PAYONEER_STORE_KEY } from \"../../store\";\nimport { dispatch, withSelect } from '@wordpress/data';\n\nconst initPayoneerComponents = () => dispatch( PAYONEER_STORE_KEY ).initPayoneerComponents();\nconst payWithPayoneer = () => dispatch( PAYONEER_STORE_KEY ).pay();\nconst rebootPayoneer = () => dispatch( PAYONEER_STORE_KEY ).reboot();\n\n/**\n * Higher-Order Component that maps the inner component's props to our payoneer store\n */\nexport const provider = withSelect(\n\t( select, ownProps ) => {\n\t\tconst payoneer = select( PAYONEER_STORE_KEY )\n\t\tconst {\n\t\t\tactivePaymentMethod,\n\t\t\teventRegistration\n\t\t} = ownProps\n\t\treturn {\n\t\t\tactivePaymentMethod,\n\t\t\teventRegistration,\n\t\t\tpayWithPayoneer,\n\t\t\tinitPayoneerComponents,\n\t\t\trebootPayoneer,\n\t\t\tisValid: payoneer.getIsValid()\n\t\t}\n\t}\n)\n","import {Component} from './component'\nimport {provider} from './provider'\n\nexport const WidgetContainer = provider(Component)\n","import { setUpBlockCheckoutListeners } from \"../../store/storeListeners\";\nimport {WidgetContainer} from '../../components/widgetContainer';\nimport {select, dispatch} from '@wordpress/data';\nimport { PAYONEER_STORE_KEY } from \"../../store/index\";\nimport $ from 'jquery';\nimport { getLongId } from \"../../store/resolvers\";\n\nconst payoneerStore = select( PAYONEER_STORE_KEY );\n\nconst setUpGatewayContainers = function () {\n\tif ( !Array.isArray( inpsydeGateways ) ) {\n\t\tconsole.error('window.inpsydeGateways not found')\n\t\treturn;\n\t}\n\n\tinpsydeGateways.forEach( ( gatewayName ) => {\n\t\taddWidgetContainer( gatewayName );\n\t} );\n};\n\nconst addWidgetContainer = function ( gatewayId ) {\n\twp.hooks.addFilter( `${gatewayId}_checkout_fields`, gatewayId, ( components ) => {\n\t\tcomponents.push(\n\t\t\tWidgetContainer\n\t\t);\n\t\treturn components;\n\t} );\n\n\twp.hooks.addFilter(\n\t\t'payoneer-checkout_payment_method_icons',\n\t\t'payoneer-checkout',\n\t\t(icons) => {\n\t\t\tconst activePaymentMethod = payoneerStore.getActivePaymentMethod();\n\t\t\treturn activePaymentMethod === 'payoneer-checkout' ? [] : icons\n\t\t}\n\t);\n};\n\nconst registerPageReloadingOnPaymentDeclined = () => {\n\tdocument.addEventListener(\n\t\t'DOMContentLoaded',\n\t\t() => {\n\t\t\twp.hooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onPaymentDeclined',\n\t\t\t\t'payoneer/blockCheckout',\n\t\t\t\t() => {\n\t\t\t\t\twp.data.dispatch(PAYONEER_STORE_KEY).releaseOnHoldOrder(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlongId: select( PAYONEER_STORE_KEY ).getLongId(),\n\t\t\t\t\t\t\tpayoneerOrderId: select(PAYONEER_STORE_KEY).getOrderId()\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\t/**\n\t\t\t\t\t * The following is an extreme solution where a correct solution seemingly does not exist.\n\t\t\t\t\t * As of 02/2025, the WooCommerce checkout entirely depends on a redirectUrl after onCheckoutSuccess().\n\t\t\t\t\t * If there is no redirect, core WC will simply do nothing, leaving a nonfunctional checkout page\n\t\t\t\t\t * with a greyed-out blocked Pay button.\n\t\t\t\t\t * You can test this by out-commenting the payment call in our 'onCheckoutSuccess' observer.\n\t\t\t\t\t *\n\t\t\t\t\t * Now:\n\t\t\t\t\t * Our WC backend cannot dictate a redirectUrl because we will only start the client-side CHARGE\n\t\t\t\t\t * after creating the order in the backend. Thus, the backend only finalizes LIST data.\n\t\t\t\t\t * It is the job of the WebSDK to carry out the payment and handle the redirects.\n\t\t\t\t\t * On the happy path, this is not an issue.\n\t\t\t\t\t *\n\t\t\t\t\t * But what if there is an error?\n\t\t\t\t\t * component.pay() is async, but onCheckoutSuccess() can only be influenced synchronously, by returning\n\t\t\t\t\t * success/failure. But we cannot know that since we are not omniscient time-bending 4D creatures yet.\n\t\t\t\t\t *\n\t\t\t\t\t * So since we cannot give WC any meaningful signal before resolving the async call,\n\t\t\t\t\t * we are forced to accept its default behaviour: redirecting to 'redirectUrl' which is empty,\n\t\t\t\t\t * leading to the aforementioned blocked checkout state.\n\t\t\t\t\t *\n\t\t\t\t\t * The only known recovery is dispatch(CHECKOUT_STORE_KEY).__internalSetIdle()\n\t\t\t\t\t * However, that's using an internal function that might be unsafe and could be removed any time.\n\t\t\t\t\t *\n\t\t\t\t\t * So we're picking the heavy tools when they are required. Hints and PRs welcome.\n\t\t\t\t\t *\n\t\t\t\t\t * @see https://developer.woocommerce.com/docs/cart-and-checkout-checkout-flow-and-events/\n\t\t\t\t\t */\n\t\t\t\t\twindow.location.reload();\n\t\t\t\t\treturn true // just out of spite\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\tfalse\n\t);\n}\n\nexport const initBlockCheckout = () => {\n\tconsole.log('Loading classic checkout integration')\n\tsetUpBlockCheckoutListeners();\n\tsetUpGatewayContainers();\n\tregisterPageReloadingOnPaymentDeclined();\n}\n","import { isBlockCheckout, isPayForOrder } from './src/util/woocommerce';\nimport { setupCustomHttpHeaders } from './src/util/http';\nimport { initClassicCheckout } from \"./src/util/checkout/classicCheckout\";\nimport { initBlockCheckout } from \"./src/util/checkout/blockCheckout\";\nimport { initPaymentCheckout } from \"./src/util/checkout/paymentCheckout\";\n\n\ndocument.addEventListener(\n\t'DOMContentLoaded',\n\tsetupCustomHttpHeaders,\n\tfalse\n);\n/**\n * Boot one of the supported checkout integrations.\n * Let us hope this list is getting shorter, not longer\n */\nif ( isPayForOrder() ) {\n\tinitPaymentCheckout()\n} else if ( isBlockCheckout() ) {\n\tinitBlockCheckout();\n} else {\n\tinitClassicCheckout()\n}\n\n","import { setupClassicCheckoutListeners } from \"../../store/storeListeners\";\nimport $ from \"jquery\";\nimport {\n\tisPayForOrder,\n\tisPayoneerGatewaySelected,\n\tsubmitOrderPayViaAjax,\n\tfocusOnSelectedGateway\n} from \"../woocommerce\";\nimport { PAYONEER_STORE_KEY } from \"../../store\";\nimport { defaultHooks } from '@wordpress/hooks';\nimport { select, dispatch } from '@wordpress/data';\nimport { releaseOnHoldOrder, setOnPaymentDeclinedNonce } from \"../../store/actions\";\n\n\nexport const initPaymentCheckout = () => {\n\tconsole.log('Loading payment checkout integration')\n\n\tdocument.addEventListener(\n\t\t'DOMContentLoaded',\n\t\t() => {\n\t\t\tsetupClassicCheckoutListeners()\n\t\t\tdispatch(PAYONEER_STORE_KEY).\n\t\t\t\tsetOnPaymentDeclinedNonce(PayoneerData.onPaymentDeclinedNonce);\n\n\t\t\tconst $orderReviewForm = $( '#order_review' );\n\n\t\t\tdefaultHooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onSdkError',\n\t\t\t\t'payoneer/paymentCheckout',\n\t\t\t\t( isResolved, checkout, component, data ) => {\n\t\t\t\t\tconst { payOrderErrorFlag } = window.PayoneerData;\n\t\t\t\t\tconst url = new URL( document.location );\n\t\t\t\t\turl.searchParams.set( payOrderErrorFlag, true );\n\t\t\t\t\twindow.location.href = url.toString();\n\t\t\t\t\treturn isResolved;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\twp.hooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onPaymentDeclined',\n\t\t\t\t'payoneer/paymentCheckout',\n\t\t\t\tasync () => {\n\t\t\t\t\tawait wp.data.dispatch(PAYONEER_STORE_KEY).releaseOnHoldOrder(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlongId: select( PAYONEER_STORE_KEY ).getLongId(),\n\t\t\t\t\t\t\torderKey: new URLSearchParams(window.location.search).get('key'),\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\twindow.location.reload();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t$orderReviewForm.on( 'submit', ( e ) => {\n\t\t\t\tif ( !isPayoneerGatewaySelected() || select( PAYONEER_STORE_KEY ).isHostedModeForced() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopImmediatePropagation();\n\n\t\t\t\tconst isValid = select( PAYONEER_STORE_KEY ).getIsValid();\n\n\t\t\t\tif ( !isValid ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfocusOnSelectedGateway();\n\t\t\t\t\t} catch (error){\n\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tsubmitOrderPayViaAjax( $orderReviewForm )\n\t\t\t\t\t.then( () => dispatch( PAYONEER_STORE_KEY ).pay() )\n\t\t\t\t\t.catch( () => {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Reloading enables us to see error messages added via wc_add_notice()\n\t\t\t\t\t\t * Scrolling up makes sure the notices are in the viewport after the refresh\n\t\t\t\t\t\t */\n\t\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tdispatch( PAYONEER_STORE_KEY ).mountComponents();\n\t\t},\n\t\tfalse\n\t);\n}\n","import { setupClassicCheckoutListeners } from \"../../store/storeListeners\";\nimport $ from \"jquery\";\nimport {\n\tgetSelectedPaymentBox,\n\tisPayoneerGatewaySelected,\n\tfocusOnSelectedGateway\n} from \"../woocommerce\";\nimport { PAYONEER_STORE_KEY } from \"../../store\";\nimport { defaultHooks } from '@wordpress/hooks';\nimport { select, dispatch } from '@wordpress/data';\nimport { releaseOnHoldOrder, setOnPaymentDeclinedNonce } from \"../../store/actions\";\n\nexport const initClassicCheckout = () => {\n\tconsole.log('Loading classic checkout integration')\n\tdocument.addEventListener(\n\t\t'DOMContentLoaded',\n\t\t() => {\n\t\t\tsetupClassicCheckoutListeners()\n\t\t\tdispatch(PAYONEER_STORE_KEY)\n\t\t\t\t.setOnPaymentDeclinedNonce(PayoneerData.onPaymentDeclinedNonce);\n\n\t\t\tconst $checkoutForm = $( 'form.checkout' );\n\n\t\t\tdefaultHooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onSdkError',\n\t\t\t\t'payoneer/shortcodeCheckout',\n\t\t\t\t( isResolved, checkout, component, data ) => {\n\t\t\t\t\twp.data.dispatch(PAYONEER_STORE_KEY).reboot();\n\n\t\t\t\t\t$( document.body ).trigger( 'update_checkout' );\n\t\t\t\t\treturn isResolved\n\t\t\t\t}\n\t\t\t);\n\n\t\t\twp.hooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onPaymentDeclined',\n\t\t\t\t'payoneer/shortcodeCheckout',\n\t\t\t\t() => {\n\t\t\t\t\twp.data.dispatch(PAYONEER_STORE_KEY).releaseOnHoldOrder(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlongId: select( PAYONEER_STORE_KEY ).getLongId(),\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Cannot use native event listener for events dispatched by jQuery\n\t\t\t * https://github.com/jquery/jquery/issues/3347\n\t\t\t */\n\t\t\t$( document.body ).on( 'updated_checkout', () => dispatch( PAYONEER_STORE_KEY ).initPayoneerComponents() );\n\n\t\t\t$checkoutForm.on('checkout_place_order', () => {\n\t\t\t\tconst isValid = select( PAYONEER_STORE_KEY ).getIsValid();\n\t\t\t\tif ( isValid ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tfocusOnSelectedGateway();\n\t\t\t\t} catch(error) {\n\t\t\t\t\tconsole.error(error);\n\t\t\t\t} finally {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t$checkoutForm.on( 'checkout_place_order_success', ( e, result ) => {\n\t\t\t\tif ( !isPayoneerGatewaySelected() || select( PAYONEER_STORE_KEY ).isHostedModeForced() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdispatch( PAYONEER_STORE_KEY ).pay();\n\n\t\t\t\t//Override default redirect to hosted payment page\n\t\t\t\tresult.redirect = '#payoneer-redirect';\n\n\t\t\t\t/**\n\t\t\t\t * Create a timeout that races the SDK's payment handling.\n\t\t\t\t * If the handling is not done after 1,5 second, it unblocks\n\t\t\t\t * the checkout form and scrolls the users to the payment fields\n\t\t\t\t * because probably there is an error displayed there\n\t\t\t\t *\n\t\t\t\t * This is done since the SDK does not have any validation callback\n\t\t\t\t * or Promise we could attach to.\n\t\t\t\t */\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t$checkoutForm.removeClass( 'processing' ).unblock();\n\t\t\t\t\t$.scroll_to_notices(\n\t\t\t\t\t\t$( getSelectedPaymentBox() )\n\t\t\t\t\t);\n\t\t\t\t}, 1500 );\n\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t},\n\t\tfalse\n\t);\n}\n"],"names":["f","k","Symbol","for","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","exports","jsx","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","module","window","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","o","defineProperty","enumerable","get","obj","prop","r","toStringTag","value","paymentFieldsComponentAttribute","PayoneerData","selectedPaymentGateway","document","querySelector","selectedPaymentGatewayId","id","isPayoneerGatewaySelected","isPayoneerGateway","gatewayId","test","isPayForOrder","focusOnSelectedGateway","focus","ACTIONS","SET_EXTENSION_DATA","SET_LONG_ID","SET_LIST_URL","SET_ENV","SET_SDK","SET_SDK_VERSION","SET_SDK_INTEGRITY","SET_SDK_STATE","ADD_COMPONENT","REMOVE_COMPONENT","MOUNT_COMPONENTS","PAY","SET_ACTIVE_PAYMENT_METHOD","SET_FORCE_HOSTED_FLOW","SET_IS_VALID","SET_ORDER_ID","SET_ON_PAYMENT_DECLINED_NONCE","initialState","activePaymentMethod","longId","env","sdkState","forceHostedFlow","isValid","availableDropInComponents","getComponentNameByGatewayId","mountComponents","components","sdk","componentName","component","entries","container","findComponentContainer","Element","isAvailable","mount","setLongId","async","select","resolveSelect","dispatch","getSdk","updateLongId","payload","setSdkState","setEnv","addComponent","console","log","isDroppedIn","name","dropIn","hidePaymentButton","doMountComponents","error","removeComponent","initPayoneerComponents","getLongId","reboot","defaultHooks","doAction","wp","data","invalidateResolutionForStore","availableComponents","getAvailableDropInComponents","pay","getActivePaymentMethod","onBeforeError","state","includes","interaction","reason","setForceHostedFlow","applyFilters","onPaymentDeclined","onComponentListChange","changeInfo","addedComponents","forEach","removedComponents","onValidationInfo","setIsValid","valid","setActivePaymentMethod","method","flag","setOnPaymentDeclinedNonce","nonce","setOrderId","orderId","releaseOnHoldOrder","requestData","targetUrlBase","wc_checkout_params","wc_ajax_url","toString","replace","separator","targetUrl","onPaymentDeclinedNonce","Promise","resolve","reject","$","url","xhrFields","withCredentials","dataType","success","catch","websdkStyles","styles","getEnv","sdkVersion","getSdkVersion","sdkIntegrity","getSdkIntegrity","config","preload","Payoneer","CheckoutWeb","script","createElement","src","formatUmdUrl","scriptVersion","URL","webSdkUmdUrlTemplate","onload","onerror","integrity","crossOrigin","head","appendChild","then","nonLoadingState","interval","setInterval","clearInterval","getExtensionData","response","apiFetch","path","cache","parse","payoneerExtensionData","json","extensions","extensionData","environment","PAYONEER_STORE_KEY","payoneerStore","createReduxStore","reducer","action","extension","listUrl","actions","selectors","isHostedModeForced","getIsValid","getOrderId","getOnPaymentDeclinedNonce","resolvers","register","FORCE_HOSTED_MODE_HEADER","IS_PAYMENT_CHECKOUT","getCustomHeaders","customHeaders","String","URLSearchParams","location","search","addAction","addFilter","headers","setupClassicCheckoutListeners","paymentMethodCallback","methodName","_document$querySelect","paymentMethodName","jQuery","body","on","payWithPayoneer","rebootPayoneer","WidgetContainer","withSelect","ownProps","payoneer","eventRegistration","provider","paymentMethodData","onPaymentSetup","onCheckoutSuccess","onCheckoutFail","useEffect","message","_jsx","className","addEventListener","originalFetch","fetch","args","options","origin","XMLHttpRequest","originalOpen","open","originalSend","send","rest","this","_isSameOrigin","apply","header","setRequestHeader","$orderReviewForm","isResolved","checkout","payOrderErrorFlag","searchParams","set","href","hooks","orderKey","reload","preventDefault","stopImmediatePropagation","$form","block","overlayCSS","background","opacity","ajax_url","fields","serialize","params","always","unblock","scrollTo","isBlockCheckout","setUpBlockCheckoutListeners","currentPaymentMethod","wcPaymentStore","PAYMENT_STORE_KEY","paymentStoreCallback","paymentMethod","subscribe","Array","isArray","inpsydeGateways","gatewayName","push","icons","payoneerOrderId","$checkoutForm","trigger","result","redirect","setTimeout","removeClass","selector","getPaymentBox"],"sourceRoot":""}1 {"version":3,"file":"payoneer-checkout.js","mappings":"uDASiBA,EAAE,EAAQ,KAASC,EAAEC,OAAOC,IAAI,iBAAgDC,GAA7BF,OAAOC,IAAI,kBAAoBE,OAAOC,UAAUC,gBAAeC,EAAER,EAAES,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAC+FC,EAAQC,IAAvV,SAAWC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,GAAGH,QAAG,IAASD,EAAEP,MAAMW,EAAE,GAAGJ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webpack://payoneer-embedded-payment/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://payoneer-embedded-payment/external window \"React\"","webpack://payoneer-embedded-payment/./node_modules/react/jsx-runtime.js","webpack://payoneer-embedded-payment/webpack/bootstrap","webpack://payoneer-embedded-payment/webpack/runtime/compat get default export","webpack://payoneer-embedded-payment/webpack/runtime/define property getters","webpack://payoneer-embedded-payment/webpack/runtime/hasOwnProperty shorthand","webpack://payoneer-embedded-payment/webpack/runtime/make namespace object","webpack://payoneer-embedded-payment/external window \"jQuery\"","webpack://payoneer-embedded-payment/./resources/js/src/util/woocommerce.js","webpack://payoneer-embedded-payment/external window [\"wp\",\"data\"]","webpack://payoneer-embedded-payment/./resources/js/src/store/constants.js","webpack://payoneer-embedded-payment/./resources/js/src/store/reducer.js","webpack://payoneer-embedded-payment/./resources/js/src/util/components.js","webpack://payoneer-embedded-payment/external window [\"wp\",\"hooks\"]","webpack://payoneer-embedded-payment/./resources/js/src/store/actions.js","webpack://payoneer-embedded-payment/./resources/js/src/util/sdk/umdLoader.js","webpack://payoneer-embedded-payment/external window [\"wp\",\"apiFetch\"]","webpack://payoneer-embedded-payment/./resources/js/src/store/resolvers.js","webpack://payoneer-embedded-payment/./resources/js/src/store/index.js","webpack://payoneer-embedded-payment/./resources/js/src/store/selectors.js","webpack://payoneer-embedded-payment/./resources/js/src/util/http.js","webpack://payoneer-embedded-payment/external window [\"wc\",\"wcBlocksData\"]","webpack://payoneer-embedded-payment/./resources/js/src/store/storeListeners.js","webpack://payoneer-embedded-payment/./resources/js/src/components/widgetContainer/component.js","webpack://payoneer-embedded-payment/./resources/js/src/components/widgetContainer/provider.js","webpack://payoneer-embedded-payment/./resources/js/src/components/widgetContainer/index.js","webpack://payoneer-embedded-payment/./resources/js/src/util/checkout/blockCheckout.js","webpack://payoneer-embedded-payment/./resources/js/payoneer-checkout.js","webpack://payoneer-embedded-payment/./resources/js/src/util/checkout/paymentCheckout.js","webpack://payoneer-embedded-payment/./resources/js/src/util/checkout/classicCheckout.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","module.exports = window[\"React\"];","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"jQuery\"];","import $ from 'jquery';\nconst {\n\tpaymentFieldsComponentAttribute\n} = window.PayoneerData;\n\nexport const paymentMethodName = () => {\n\treturn document.querySelector( '.woocommerce-checkout input[name=\"payment_method\"]:checked' ).value ?? '';\n}\n\nexport const selectedPaymentGateway = () => {\n\treturn document.querySelector(\n\t\t'.woocommerce-checkout input[name=\"payment_method\"]:checked'\n\t)\n};\n\nexport const selectedPaymentGatewayId = () => {\n\treturn selectedPaymentGateway()?.id;\n};\n\nexport const getComponentNameFromPaymentBox = function ( paymentBox ) {\n\treturn paymentBox\n\t\t?.querySelector( `[${ paymentFieldsComponentAttribute }]` )\n\t\t?.getAttribute( paymentFieldsComponentAttribute );\n};\n\nexport const isPayoneerGateway = ( gatewayId ) => {\n\treturn /^payment_method_payoneer-(checkout|afterpay)/i.test( gatewayId );\n};\n\nexport const isPayoneerGatewaySelected = () =>\n\tisPayoneerGateway( selectedPaymentGatewayId() );\n\nexport const isPayForOrder = () => {\n\treturn window.PayoneerData.isPayForOrder === '1';\n};\n\nexport const getPaymentBox = ( gatewayId ) => {\n\tconst selector = '.payment_box.' + gatewayId;\n\treturn document.querySelector( selector );\n};\n\nexport const getSelectedPaymentBox = () =>\n\tgetPaymentBox( selectedPaymentGatewayId() );\n\nconst hostedOverrideFlagInput = () => {\n\tconst { hostedFlowOverrideFlag } = window.PayoneerData;\n\treturn document.querySelector(\n\t\t`input[name=\"${ hostedFlowOverrideFlag }\"]`\n\t);\n};\n\nexport const submitOrderPayViaAjax = ( $form ) => {\n\t//Blocks the UI in the same way Woocommerce does (source: https://github.com/woocommerce/woocommerce/blob/6.0.1/plugins/woocommerce/assets/js/frontend/checkout.js#L454-L466)\n\t$form.block( {\n\t\tmessage: null,\n\t\toverlayCSS: {\n\t\t\tbackground: '#fff',\n\t\t\topacity: 0.6,\n\t\t},\n\t} );\n\n\treturn $.ajax( {\n\t\ttype: 'POST',\n\t\turl: window.wc_checkout_params.ajax_url,\n\t\txhrFields: {\n\t\t\t// This is important. We need the session cookie to access the LIST in the back-end\n\t\t\twithCredentials: true,\n\t\t},\n\t\tdataType: 'json',\n\t\tdata: {\n\t\t\taction: 'payoneer_order_pay',\n\t\t\tfields: $form.serialize(),\n\t\t\tparams: new URL( document.location ).searchParams.toString(),\n\t\t},\n\t} ).always( () => $form.unblock() );\n};\n\nexport const isBlockCheckout = () =>\n\twindow?.PayoneerData?.isBlockCheckout === '1';\n\nexport const focusOnSelectedGateway = () => {\n\tselectedPaymentGateway()?.focus();\n}\n","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","export const ACTIONS = {\n\tSET_EXTENSION_DATA: 'SET_EXTENSION_DATA',\n\tSET_LONG_ID: 'SET_LONG_ID',\n\tSET_LIST_URL: 'SET_LIST_URL',\n\tSET_ENV: 'SET_ENV',\n\tSET_SDK: 'SET_SDK',\n\tSET_SDK_VERSION: 'SET_SDK_VERSION',\n\tSET_SDK_INTEGRITY: 'SET_SDK_INTEGRITY',\n\tSET_SDK_STATE: 'SET_SDK_STATE',\n\tADD_COMPONENT: 'ADD_COMPONENT',\n\tREMOVE_COMPONENT: 'REMOVE_COMPONENT',\n\tMOUNT_COMPONENTS: 'MOUNT_COMPONENTS',\n\tPAY: 'PAY',\n\tSET_ACTIVE_PAYMENT_METHOD: 'SET_ACTIVE_PAYMENT_METHOD',\n\tSET_FORCE_HOSTED_FLOW: 'SET_FORCE_HOSTED_FLOW',\n\tSET_IS_VALID: 'SET_IS_VALID',\n\tSET_ORDER_ID: 'SET_ORDER_ID',\n\tSET_ON_PAYMENT_DECLINED_NONCE: 'SET_ON_PAYMENT_DECLINED_NONCE',\n};\n","import { ACTIONS } from './constants';\n\nconst initialState = {\n\tactivePaymentMethod: '',\n\tlongId: null,\n\tenv: null,\n\tsdkState: 'UNINITIALIZED',\n\tforceHostedFlow: true,\n\tisValid: false,\n\tavailableDropInComponents: []\n};\n\nconst reducer = (state = initialState, action) => {\n\tswitch (action.type) {\n\t\tcase ACTIONS.SET_EXTENSION_DATA:\n\t\t\treturn { ...state, extension: action.payload };\n\t\tcase ACTIONS.SET_LONG_ID:\n\t\t\treturn { ...state, longId: action.payload };\n\t\tcase ACTIONS.SET_LIST_URL:\n\t\t\treturn { ...state, listUrl: action.payload };\n\t\tcase ACTIONS.SET_ENV:\n\t\t\treturn { ...state, env: action.payload };\n\t\tcase ACTIONS.SET_SDK:\n\t\t\treturn { ...state, sdk: action.payload };\n\t\tcase ACTIONS.SET_SDK_VERSION:\n\t\t\treturn { ...state, sdkVersion: action.payload };\n\t\tcase ACTIONS.SET_SDK_INTEGRITY:\n\t\t\treturn { ...state, sdkIntegrity: action.payload };\n\t\tcase ACTIONS.SET_SDK_STATE:\n\t\t\treturn { ...state, sdkState: action.payload };\n\t\tcase ACTIONS.SET_ACTIVE_PAYMENT_METHOD:\n\t\t\treturn { ...state, activePaymentMethod: action.payload };\n\t\tcase ACTIONS.SET_FORCE_HOSTED_FLOW:\n\t\t\treturn { ...state, forceHostedFlow: action.payload };\n\t\tcase ACTIONS.SET_IS_VALID:\n\t\t\treturn { ...state, isValid: action.payload };\n\t\tcase ACTIONS.SET_ORDER_ID:\n\t\t\treturn { ...state, orderId: action.payload };\n\t\tcase ACTIONS.SET_ON_PAYMENT_DECLINED_NONCE:\n\t\t\treturn { ...state, onPaymentDeclinedNonce: action.payload };\n\t\tcase ACTIONS.ADD_COMPONENT:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tavailableDropInComponents: {\n\t\t\t\t\t...state.availableDropInComponents,\n\t\t\t\t\t[action.payload.name]: action.payload.component\n\t\t\t\t}\n\t\t\t};\n\t\tcase ACTIONS.REMOVE_COMPONENT:\n\t\t\tlet availableDropInComponents = { ...state.availableDropInComponents };\n\t\t\tdelete availableDropInComponents[action.payload.name];\n\t\t\treturn { ...state, availableDropInComponents };\n\t\tdefault:\n\t\t\treturn state;\n\t}\n};\n\nexport default reducer;\n","import {\n\tgetPaymentBox,\n\tgetComponentNameFromPaymentBox,\n\tsetHostedOverride\n} from './woocommerce';\n\nexport const getComponentNameByGatewayId = ( gatewayId ) => {\n\tconst gatewayIdToComponentName = {\n\t\t'payoneer-checkout': 'cards',\n\t\t'payoneer-afterpay': 'afterpay',\n\t};\n\n\treturn gatewayIdToComponentName[ gatewayId ];\n}\n\nconst { paymentFieldsComponentAttribute } = window.PayoneerData;\n\nexport const mountComponents = ( components, sdk ) => {\n\tfor ( const [ componentName, component ] of Object.entries( components ) ) {\n\t\tconst container = findComponentContainer( componentName );\n\t\tif (\n\t\t\tcontainer instanceof Element &&\n\t\t\tsdk.isAvailable( componentName )\n\t\t) {\n\t\t\tcomponent.mount( container );\n\t\t}\n\t}\n};\n\nexport const findComponentContainer = function ( componentName ) {\n\treturn document.querySelector(\n\t\t`[${paymentFieldsComponentAttribute}=${componentName}]`\n\t);\n};\n","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","import {\n\tmountComponents as doMountComponents,\n\tgetComponentNameByGatewayId,\n\tfindComponentContainer\n} from '../util/components';\nimport { ACTIONS } from './constants';\nimport { defaultHooks } from \"@wordpress/hooks\";\nimport $ from 'jquery';\n\nexport const setLongId = ( longId ) => async ( { select, resolveSelect, dispatch } ) => {\n\tconst sdk = await resolveSelect.getSdk()\n\tawait sdk.updateLongId( longId );\n\tdispatch( { type: ACTIONS.SET_LONG_ID, payload: longId } );\n}\n\nexport const setSdkState = ( sdkState ) => {\n\treturn { type: ACTIONS.SET_SDK_STATE, payload: sdkState };\n};\n\nexport function setEnv( env ) {\n\treturn { type: ACTIONS.SET_ENV, payload: env };\n}\n\nexport const addComponent = ( componentName ) => async ( { select, resolveSelect, dispatch } ) => {\n\tconst sdk = await resolveSelect.getSdk()\n\tconsole.log( sdk )\n\tif ( !sdk.isDroppedIn( componentName ) && typeof findComponentContainer( componentName ) === 'object' ) {\n\t\ttry {\n\t\t\tconst payload = {\n\t\t\t\tname: componentName,\n\t\t\t\tcomponent: sdk.dropIn( componentName, {\n\t\t\t\t\thidePaymentButton: true,\n\t\t\t\t} )\n\t\t\t};\n\t\t\tconsole.log( 'New component', payload );\n\t\t\tdispatch( { type: ACTIONS.ADD_COMPONENT, payload } );\n\t\t\tdoMountComponents( { [ payload.name ]: payload.component }, sdk );\n\t\t} catch ( e ) {\n\t\t\tconsole.error( `Failed to drop in component ${componentName}. Error details: ${e}` );\n\t\t}\n\t}\n}\n\nexport function removeComponent( componentName ) {\n\treturn { type: ACTIONS.REMOVE_COMPONENT, payload: componentName };\n}\n\n/**\n * When a React component is displayed for the first time, the SDK needs to mount its dropIn.\n * So they call this function in a useEffect callback.\n * However:\n * If the SDK has been bootstrapped already, and a new method becomes available after\n * checkout field changes we need to instruct the SDK to refetch the list of dropIn components.\n * This is why we call sdk.updateLongId()\n * After that, the onComponentListChange handler should take care of mounting automatically\n *\n * @returns {(function({select: *, resolveSelect: *, dispatch: *}): Promise<void>)|*}\n */\nexport const initPayoneerComponents = () => async ( { select, resolveSelect, dispatch } ) => {\n\tconst sdk = await resolveSelect.getSdk()\n\tconst longId = await resolveSelect.getLongId()\n\tawait sdk.updateLongId( longId );\n\tawait dispatch.mountComponents()\n}\n\nexport const reboot = () => async ( { select, resolveSelect, dispatch } ) => {\n\tdefaultHooks.doAction( 'payoneer.webSdk.reboot' )\n\twp.data.dispatch( 'wc/store/cart' ).invalidateResolutionForStore();\n\tdispatch.invalidateResolutionForStore()\n\tawait dispatch.mountComponents()\n}\n\nexport const mountComponents = () => async ( { select, resolveSelect, dispatch } ) => {\n\tconst sdk = await resolveSelect.getSdk()\n\tconst availableComponents = select.getAvailableDropInComponents();\n\tconsole.log( 'Mounting components', availableComponents );\n\tdoMountComponents( availableComponents, sdk );\n};\n\nexport const pay = () => ( { select, dispatch } ) => {\n\tconst availableComponents = select.getAvailableDropInComponents();\n\tconst activePaymentMethod = select.getActivePaymentMethod();\n\tconst componentName = getComponentNameByGatewayId( activePaymentMethod );\n\tconst component = availableComponents[ componentName ];\n\tif ( !component ) {\n\t\tconsole.log( 'Component not found.' );\n\t\treturn;\n\t}\n\tcomponent.pay();\n};\n\nexport const onBeforeError = ( sdk, component, data ) => async ( { select, dispatch } ) => {\n\tdispatch.setSdkState( sdk.state );\n\tconsole.error( \"WebSDK error:\", { sdk, component, data } );\n\t/**\n\t * For SYSTEM_FAILURE, we assume there is nothing we can do to recover.\n\t * Use hosted mode fallback and let the customer proceed\n\t */\n\tif ( [ \"SYSTEM_FAILURE\" ].includes( data?.interaction?.reason ) ) {\n\t\tdispatch.setForceHostedFlow( true );\n\t\treturn true;\n\t}\n\t/**\n\t * Let the outside world attempt to handle the error.\n\t * The different checkout types can reboot the payment attempt from there.\n\t */\n\treturn defaultHooks.applyFilters( 'payoneer.webSdk.onSdkError', false, sdk, component, data );\n}\n\nexport const onPaymentDeclined = ( sdk, component, data ) => async ( { select, dispatch } ) => {\n\treturn defaultHooks.applyFilters( 'payoneer.webSdk.onPaymentDeclined', true, sdk, component, data )\n}\n\nexport const onComponentListChange = ( sdk, changeInfo ) => async ( { select, dispatch } ) => {\n\tconsole.log( 'onComponentListChange', sdk, changeInfo );\n\tchangeInfo.addedComponents.forEach( ( name ) => {\n\t\tdispatch.addComponent( name );\n\t} );\n\tchangeInfo.removedComponents.forEach( ( name ) => {\n\t\tdispatch.removeComponent( name );\n\t} );\n}\nexport const onValidationInfo = ( sdk, componentName, data ) => async ( { select, dispatch } ) => {\n\tconsole.log(componentName,data)\n\tdispatch.setIsValid( data.valid )\n}\n\nexport const setActivePaymentMethod = ( method ) => async ( { dispatch } ) => {\n\tconsole.log( 'Setting active payment method', method );\n\tdispatch.mountComponents()\n\tdispatch( { type: ACTIONS.SET_ACTIVE_PAYMENT_METHOD, payload: method } );\n}\n\nexport function setForceHostedFlow( state ) {\n\tconsole.log( 'Setting hosted flow override flag', state );\n\treturn { type: ACTIONS.SET_FORCE_HOSTED_FLOW, payload: state };\n}\n\nexport function setIsValid( flag ) {\n\treturn { type: ACTIONS.SET_IS_VALID, payload: flag };\n}\n\nexport const setOnPaymentDeclinedNonce = ( nonce ) => ( {dispatch} ) => {\n\tdispatch( { type: ACTIONS.SET_ON_PAYMENT_DECLINED_NONCE, payload: nonce} );\n}\n\nexport const setOrderId = ( orderId ) => ( {dispatch} ) => {\n\tdispatch( { type: ACTIONS.SET_ORDER_ID, payload: orderId } );\n}\n\nexport const releaseOnHoldOrder = (requestData) => async ( { dispatch } ) => {\n\tconst targetUrlBase = window.wc_checkout_params.wc_ajax_url.\n\ttoString().\n\treplace( '%%endpoint%%', 'payoneer-checkout-payment-declined' );\n\tconst separator = targetUrlBase.includes('?') ? '&' : '?';\n\tconst targetUrl = targetUrlBase +\n\t\tseparator +\n\t\t'_ajax_nonce=' +\n\t\twindow.PayoneerData.onPaymentDeclinedNonce\n\n\treturn new Promise( ( resolve, reject ) => {\n\t\t$.ajax( {\n\t\t\ttype: 'POST',\n\t\t\turl: targetUrl,\n\t\t\txhrFields: {\n\t\t\t\t// This is important. We need the session cookie to access the LIST in the back-end\n\t\t\t\twithCredentials: true,\n\t\t\t},\n\t\t\tdata: requestData,\n\t\t\tdataType: 'json',\n\t\t} ).success( ( data ) => {\n\t\t\t//New nonce for the next request.\n\t\t\tdispatch.setOnPaymentDeclinedNonce( data.nonce );\n\t\t\tresolve( data );\n\t\t} ).catch( ( e ) => {\n\t\t\tconsole.log( e );\n\t\t\treject( e )\n\t\t} );\n\t} );\n}\n","/*\n * Since the WebSDK is not yet available on npm, we asynchronously\n * load the UMD version from the appropriate env whenever the SDK is initialized\n * for the first time.\n */\n\nconst formatUmdUrl = ( env, sdkVersion ) => {\n\t/**\n\t * When the configuration does not provide a pinned version we can omit the script version to\n\t * load the latest version of the SDK.\n\t *\n\t * @type {string}\n\t */\n\tconst scriptVersion = sdkVersion ? `-${sdkVersion}` : '';\n\n\treturn new URL(\n\t\twindow.PayoneerData.webSdkUmdUrlTemplate\n\t\t\t?.replace( '<env>', env )\n\t\t\t?.replace( '<version>', scriptVersion )\n\t);\n};\n\nconst sdkLoader = ( config ) => {\n\tif ( window.Payoneer?.CheckoutWeb ) {\n\t\treturn window.Payoneer.CheckoutWeb( config );\n\t}\n\n\treturn new Promise( ( resolve, reject ) => {\n\t\tconst script = document.createElement( 'script' );\n\t\tscript.src = formatUmdUrl( config.env, config.sdkVersion );\n\t\tscript.onload = resolve;\n\t\tscript.onerror = reject;\n\n\t\t/**\n\t\t * Add Subresource Integrity (SRI) validation when a specific SDK version is requested.\n\t\t * This enhances security by ensuring the loaded script matches its expected content,\n\t\t * which is a requirement for PCI compliance.\n\t\t */\n\t\tif ( config.sdkVersion && config.sdkIntegrity ) {\n\t\t\tscript.integrity = config.sdkIntegrity;\n\n\t\t\t// Add crossorigin attribute when using integrity checks.\n\t\t\t// This is required for SRI to work properly with CORS.\n\t\t\tscript.crossOrigin = 'anonymous';\n\t\t}\n\t\tdocument.head.appendChild( script );\n\t} ).then( () => {\n\t\treturn window.Payoneer.CheckoutWeb( config );\n\t} );\n};\n\nexport default sdkLoader;\n","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","import { ACTIONS } from \"./constants\";\nimport initializeSdk from \"../util/sdk/umdLoader\";\nimport apiFetch from '@wordpress/api-fetch';\nimport { defaultHooks } from \"@wordpress/hooks\";\n\nconst {\n\twebsdkStyles: styles\n} = PayoneerData;\n\nexport const getSdk = () => async ( { resolveSelect, dispatch } ) => {\n\tconst env = await resolveSelect.getEnv();\n\tconst sdkVersion = await resolveSelect.getSdkVersion();\n\tconst sdkIntegrity = await resolveSelect.getSdkIntegrity();\n\tconst longId = await resolveSelect.getLongId();\n\tconst onBeforeError = async ( sdk, component, data ) => await dispatch.onBeforeError( sdk, component, data );\n\tconst onPaymentDeclined = async ( sdk, component, data ) => await dispatch.onPaymentDeclined( sdk, component, data );\n\tconst onComponentListChange = async ( sdk, changeInfo ) => await dispatch.onComponentListChange( sdk, changeInfo );\n\tconst onValidationInfo = async ( sdk, componentName, data ) => await dispatch.onValidationInfo( sdk, componentName, data );\n\n\tconst sdk = await initializeSdk( {\n\t\tenv,\n\t\tsdkVersion,\n\t\tsdkIntegrity,\n\t\tonBeforeError,\n\t\tonPaymentDeclined,\n\t\tonComponentListChange,\n\t\tonValidationInfo,\n\t\tpreload: [ 'cards' ],\n\t\tstyles\n\t} );\n\n\tif ( sdk.state === 'LOADING' ) {\n\t\tconst nonLoadingState = async () => {\n\t\t\treturn await new Promise( resolve => {\n\t\t\t\tconst interval = setInterval( () => {\n\t\t\t\t\tif ( sdk.state !== 'LOADING' ) {\n\t\t\t\t\t\tresolve( sdk.state );\n\t\t\t\t\t\tclearInterval( interval );\n\t\t\t\t\t}\n\t\t\t\t}, 1000 );\n\t\t\t} );\n\t\t};\n\t\tawait nonLoadingState();\n\t}\n\tawait sdk.updateLongId( longId );\n\tawait dispatch.setForceHostedFlow( false );\n\tawait dispatch.setSdkState( sdk.state );\n\tawait dispatch( { type: ACTIONS.SET_SDK, payload: sdk } );\n}\n/**\n * Perform a Store API call to the cart endpoint where we provide LIST longId and environment\n */\nexport const getExtensionData = () => async ( { dispatch } ) => {\n\n\tconst response = await apiFetch( {\n\t\t/**\n\t\t * /wc/store/v1/cart\n\t\t * is pre-warmed in PHP, so the first API call will always get data produced during\n\t\t * the initial page load.\n\t\t * Here we MUST receive the results of an actual API call.\n\t\t * So we use a custom URL hash to prevent this from happening.\n\t\t */\n\t\tpath: '/wc/store/v1/cart#skipPreloadingMiddleware',\n\t\tmethod: 'GET',\n\t\tcache: 'no-store',\n\t\tparse: false,\n\t} );\n\tconst json = await response.json();\n\tconst payoneerExtensionData = json.extensions[ 'payoneer-checkout' ];\n\tconsole.log('Payoneer Extension Data: ', payoneerExtensionData);\n\tawait dispatch( { type: ACTIONS.SET_EXTENSION_DATA, payload: payoneerExtensionData } );\n\tdefaultHooks.doAction( 'payoneer.checkout.onReceiveExtensionData', payoneerExtensionData )\n}\nexport const getLongId = () => async ( { resolveSelect,dispatch } ) => {\n\tconst extensionData = await resolveSelect.getExtensionData();\n\tawait dispatch( { type: ACTIONS.SET_LONG_ID, payload: extensionData.longId } );\n}\n\nexport const getEnv = () => async ( { resolveSelect,dispatch } ) => {\n\tconst extensionData = await resolveSelect.getExtensionData();\n\tawait dispatch( { type: ACTIONS.SET_ENV, payload: extensionData.environment } );\n}\n\nexport const getSdkVersion = () => async ( { resolveSelect,dispatch } ) => {\n\tconst extensionData = await resolveSelect.getExtensionData();\n\tawait dispatch( { type: ACTIONS.SET_SDK_VERSION, payload: extensionData.sdkVersion } );\n}\n\nexport const getSdkIntegrity = () => async ( { resolveSelect,dispatch } ) => {\n\tconst extensionData = await resolveSelect.getExtensionData();\n\tawait dispatch( { type: ACTIONS.SET_SDK_INTEGRITY, payload: extensionData.sdkIntegrity } );\n}\n","import { createReduxStore, register } from '@wordpress/data';\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as resolvers from './resolvers';\nimport selectors from './selectors';\n\nexport const PAYONEER_STORE_KEY = 'payoneer-checkout';\n\nexport const payoneerStore = createReduxStore(PAYONEER_STORE_KEY, {\n\treducer,\n\tactions,\n\tselectors,\n\tresolvers\n});\n\nregister(payoneerStore);\n\n","\nconst selectors = {\n\t/**\n\t * This is technically only needed temporarily to lazy-fetch longId and env\n\t * in a resolver. Maybe there are better ways to deal with this?\n\t */\n\tgetExtensionData: (state) => state.extension,\n\tgetLongId: (state) => state.longId,\n\tgetEnv: (state) => state.env,\n\tgetSdkVersion: (state) => state.sdkVersion,\n\tgetSdkIntegrity: (state) => state.sdkIntegrity,\n\tgetSdk: (state) => state.sdk,\n\tisHostedModeForced: (state) => state.forceHostedFlow,\n\t/**\n\t * Validity only makes sense for Cards payment method\n\t * https://checkoutdocs.payoneer.com/docs/payment-button#listening-for-validation-events\n\t */\n\tgetIsValid: (state) =>\n\t\tstate.activePaymentMethod !== 'payoneer-checkout' ||\n\t\tstate.isValid,\n\tgetActivePaymentMethod: (state) => state.activePaymentMethod,\n\tgetAvailableDropInComponents: (state) => state.availableDropInComponents,\n\tgetOrderId: (state) => state.orderId,\n\tgetOnPaymentDeclinedNonce: (state) => state.onPaymentDeclinedNonce,\n};\n\nexport default selectors;\n","import { PAYONEER_STORE_KEY } from \"../store/index\";\nimport { select } from '@wordpress/data';\nimport { isPayForOrder } from \"./woocommerce\";\nimport { defaultHooks } from \"@wordpress/hooks\";\n\nconst FORCE_HOSTED_MODE_HEADER = 'x-payoneer-checkout-force-hosted-flow'\nconst LIST_LONG_ID = 'x-payoneer-long-id'\nconst IS_PAYMENT_CHECKOUT = 'x-payoneer-is-payment-checkout'\n\nconst paymentCheckoutHeaderValue = () => {\n\tif ( !isPayForOrder ) {\n\t\treturn '' // to avoid receiving random variables from non-payment pages\n\t}\n\tconst urlParams = new URLSearchParams( window.location.search );\n\treturn urlParams.get( 'key' ) || '';\n};\n\nconst getCustomHeaders = () => {\n\tconst customHeaders = {\n\t\t[ FORCE_HOSTED_MODE_HEADER ]: String( select( PAYONEER_STORE_KEY ).isHostedModeForced() ),\n\t\t[ IS_PAYMENT_CHECKOUT ]: paymentCheckoutHeaderValue()\n\t};\n\treturn defaultHooks.applyFilters( 'payoneer.http.customHeaders', customHeaders );\n};\n\n/**\n * Since we need the getLongId resolver to have run once, we defer adding the header\n */\ndefaultHooks.addAction(\n\t'payoneer.checkout.onReceiveExtensionData',\n\t'payoneer/setupCustomHttpHeaders',\n\t() => {\n\t\tdefaultHooks.addFilter(\n\t\t\t'payoneer.http.customHeaders',\n\t\t\t'payoneer/setupCustomHttpHeaders',\n\t\t\tfunction ( headers ) {\n\t\t\t\theaders[ LIST_LONG_ID ] = String( select( PAYONEER_STORE_KEY ).getLongId() )\n\t\t\t\treturn headers;\n\t\t\t}\n\t\t)\n\t} );\n\n/**\n * We decorate the global fetch function so that we can pass custom headers for outgoing requests.\n * This is used to control the hosted mode fallback in the back-end and for validating\n * that the frontend LIST longId matches the one used by the backend\n */\nexport const setupCustomHttpHeaders = async () => {\n\n\tconst originalFetch = window.fetch;\n\n\twindow.fetch = async ( ...args ) => {\n\t\tlet [ url, options ] = args;\n\t\t// Only process requests going out to the same origin\n\t\tif ( new URL( url, window.location.origin ).origin !== window.location.origin ) {\n\t\t\treturn originalFetch( url, options );\n\t\t}\n\t\tconst customHeaders = getCustomHeaders();\n\t\tconsole.log( 'Adding custom headers to fetch call', customHeaders );\n\t\t// Clone the original options to avoid mutating it\n\t\tif ( options && options.headers ) {\n\t\t\toptions = { ...options, headers: { ...options.headers, ...customHeaders } };\n\t\t} else {\n\t\t\toptions = { ...options, headers: customHeaders };\n\t\t}\n\n\t\treturn await originalFetch( url, options );\n\t};\n\n\tif ( !window.XMLHttpRequest ) {\n\t\treturn;\n\t}\n\n\tconst originalOpen = XMLHttpRequest.prototype.open;\n\tconst originalSend = XMLHttpRequest.prototype.send;\n\n\tXMLHttpRequest.prototype.open = function ( method, url, ...rest ) {\n\t\tthis._isSameOrigin = new URL( url, window.location.origin ).origin === window.location.origin;\n\t\toriginalOpen.apply( this, [ method, url, ...rest ] );\n\t};\n\n\tXMLHttpRequest.prototype.send = function ( ...args ) {\n\t\tconst customHeaders = getCustomHeaders();\n\n\t\tif ( this._isSameOrigin ) {\n\t\t\tconsole.log( 'Adding custom headers to XMLHttpRequest call', customHeaders );\n\t\t\tfor ( const [ header, value ] of Object.entries( customHeaders ) ) {\n\t\t\t\tthis.setRequestHeader( header, value );\n\t\t\t}\n\t\t}\n\t\toriginalSend.apply( this, args );\n\t};\n}\n","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wc\"][\"wcBlocksData\"];","import { dispatch } from '@wordpress/data';\nimport { PAYMENT_STORE_KEY } from '@woocommerce/block-data';\nimport { PAYONEER_STORE_KEY } from \"./index\";\nimport { select, subscribe } from '@wordpress/data';\nimport { paymentMethodName } from \"../util/woocommerce\";\n\nexport const setUpBlockCheckoutListeners = () => {\n\n\tlet currentPaymentMethod;\n\n\tconst wcPaymentStore = select( PAYMENT_STORE_KEY );\n\tconst paymentStoreCallback = () => {\n\t\tconst paymentMethod = wcPaymentStore.getActivePaymentMethod();\n\t\tif ( currentPaymentMethod !== paymentMethod ) {\n\t\t\tdispatch( PAYONEER_STORE_KEY ).setActivePaymentMethod( paymentMethod );\n\t\t\tcurrentPaymentMethod = paymentMethod;\n\t\t}\n\t}\n\tconst unsubscribePaymentStore = subscribe( paymentStoreCallback, PAYMENT_STORE_KEY );\n\tpaymentStoreCallback()\n\n\treturn { unsubscribePaymentStore };\n}\n\nexport const setupClassicCheckoutListeners = () => {\n\tconst paymentMethodCallback = function () {\n\t\tconst methodName = paymentMethodName()\n\t\tdispatch( PAYONEER_STORE_KEY ).setActivePaymentMethod( methodName );\n\t}\n\tjQuery( document.body ).on( 'payment_method_selected', paymentMethodCallback );\n\tpaymentMethodCallback()\n}\n\n\n","import { useEffect } from 'react';\nimport { getComponentNameByGatewayId } from \"../../util/components\";\nimport { dispatch } from '@wordpress/data'\nimport { PAYONEER_STORE_KEY } from \"../../store/index\";\n/**\n * @see https://developer.woocommerce.com/2022/10/06/how-the-checkout-block-processes-an-order/\n * @see https://developer.woocommerce.com/docs/cart-and-checkout-payment-method-integration-for-the-checkout-block/#3-props-fed-to-payment-method-nodes\n */\nexport const Component = function (\n\t{\n\t\tpayWithPayoneer,\n\t\tinitPayoneerComponents,\n\t\tpaymentMethodData,\n\t\trebootPayoneer,\n\t\tactivePaymentMethod,\n\t\teventRegistration,\n\t\tisValid\n\t}\n) {\n\n\tconst { onPaymentSetup, onCheckoutSuccess, onCheckoutFail } = eventRegistration;\n\t/**\n\t * Ping the SDK when we see the light of day\n\t */\n\tuseEffect( () => {\n\t\tinitPayoneerComponents()\n\t}, [] )\n\n\tuseEffect( () => {\n\t\treturn onCheckoutSuccess( ({orderId}) => {\n\t\t\tdispatch(PAYONEER_STORE_KEY).setOrderId(orderId);\n\t\t\tpayWithPayoneer();\n\t\t} );\n\t}, [] );\n\n\tuseEffect( () => {\n\t\treturn onCheckoutFail( rebootPayoneer );\n\t}, [] );\n\t/**\n\t * Enhance the payment data validation step.\n\t * We need to validate that the LIST used in block checkout submit\n\t * matches the one we will use for finalizing the transaction in the backend.\n\t * Therefore, we pass additional metadata in this listener\n\t */\n\tuseEffect( () => {\n\t\treturn onPaymentSetup( () => {\n\t\t\treturn isValid\n\t\t\t\t?\n\t\t\t\t{\n\t\t\t\t\ttype: 'success',\n\t\t\t\t}\n\t\t\t\t:\n\t\t\t\t{\n\t\t\t\t\ttype: 'failure',\n\t\t\t\t\tmessage: 'Invalid payment fields',\n\t\t\t\t}\n\t\t} );\n\t}, [ isValid, onPaymentSetup, paymentMethodData ] );\n\n\tconst componentName = getComponentNameByGatewayId( activePaymentMethod );\n\n\treturn <div\n\t\tclassName={`payment_method_${activePaymentMethod}`}\n\t\tdata-component={componentName}\n\t></div>;\n}\n","import { PAYONEER_STORE_KEY } from \"../../store\";\nimport { dispatch, withSelect } from '@wordpress/data';\n\nconst initPayoneerComponents = () => dispatch( PAYONEER_STORE_KEY ).initPayoneerComponents();\nconst payWithPayoneer = () => dispatch( PAYONEER_STORE_KEY ).pay();\nconst rebootPayoneer = () => dispatch( PAYONEER_STORE_KEY ).reboot();\n\n/**\n * Higher-Order Component that maps the inner component's props to our payoneer store\n */\nexport const provider = withSelect(\n\t( select, ownProps ) => {\n\t\tconst payoneer = select( PAYONEER_STORE_KEY )\n\t\tconst {\n\t\t\tactivePaymentMethod,\n\t\t\teventRegistration\n\t\t} = ownProps\n\t\treturn {\n\t\t\tactivePaymentMethod,\n\t\t\teventRegistration,\n\t\t\tpayWithPayoneer,\n\t\t\tinitPayoneerComponents,\n\t\t\trebootPayoneer,\n\t\t\tisValid: payoneer.getIsValid()\n\t\t}\n\t}\n)\n","import {Component} from './component'\nimport {provider} from './provider'\n\nexport const WidgetContainer = provider(Component)\n","import { setUpBlockCheckoutListeners } from \"../../store/storeListeners\";\nimport {WidgetContainer} from '../../components/widgetContainer';\nimport {select, dispatch} from '@wordpress/data';\nimport { PAYONEER_STORE_KEY } from \"../../store/index\";\nimport $ from 'jquery';\nimport { getLongId } from \"../../store/resolvers\";\n\nconst payoneerStore = select( PAYONEER_STORE_KEY );\n\nconst setUpGatewayContainers = function () {\n\tif ( !Array.isArray( inpsydeGateways ) ) {\n\t\tconsole.error('window.inpsydeGateways not found')\n\t\treturn;\n\t}\n\n\tinpsydeGateways.forEach( ( gatewayName ) => {\n\t\taddWidgetContainer( gatewayName );\n\t} );\n};\n\nconst addWidgetContainer = function ( gatewayId ) {\n\twp.hooks.addFilter( `${gatewayId}_checkout_fields`, gatewayId, ( components ) => {\n\t\tcomponents.push(\n\t\t\tWidgetContainer\n\t\t);\n\t\treturn components;\n\t} );\n\n\twp.hooks.addFilter(\n\t\t'payoneer-checkout_payment_method_icons',\n\t\t'payoneer-checkout',\n\t\t(icons) => {\n\t\t\tconst activePaymentMethod = payoneerStore.getActivePaymentMethod();\n\t\t\treturn activePaymentMethod === 'payoneer-checkout' ? [] : icons\n\t\t}\n\t);\n};\n\nconst registerPageReloadingOnPaymentDeclined = () => {\n\tdocument.addEventListener(\n\t\t'DOMContentLoaded',\n\t\t() => {\n\t\t\twp.hooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onPaymentDeclined',\n\t\t\t\t'payoneer/blockCheckout',\n\t\t\t\t() => {\n\t\t\t\t\twp.data.dispatch(PAYONEER_STORE_KEY).releaseOnHoldOrder(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlongId: select( PAYONEER_STORE_KEY ).getLongId(),\n\t\t\t\t\t\t\tpayoneerOrderId: select(PAYONEER_STORE_KEY).getOrderId()\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\t/**\n\t\t\t\t\t * The following is an extreme solution where a correct solution seemingly does not exist.\n\t\t\t\t\t * As of 02/2025, the WooCommerce checkout entirely depends on a redirectUrl after onCheckoutSuccess().\n\t\t\t\t\t * If there is no redirect, core WC will simply do nothing, leaving a nonfunctional checkout page\n\t\t\t\t\t * with a greyed-out blocked Pay button.\n\t\t\t\t\t * You can test this by out-commenting the payment call in our 'onCheckoutSuccess' observer.\n\t\t\t\t\t *\n\t\t\t\t\t * Now:\n\t\t\t\t\t * Our WC backend cannot dictate a redirectUrl because we will only start the client-side CHARGE\n\t\t\t\t\t * after creating the order in the backend. Thus, the backend only finalizes LIST data.\n\t\t\t\t\t * It is the job of the WebSDK to carry out the payment and handle the redirects.\n\t\t\t\t\t * On the happy path, this is not an issue.\n\t\t\t\t\t *\n\t\t\t\t\t * But what if there is an error?\n\t\t\t\t\t * component.pay() is async, but onCheckoutSuccess() can only be influenced synchronously, by returning\n\t\t\t\t\t * success/failure. But we cannot know that since we are not omniscient time-bending 4D creatures yet.\n\t\t\t\t\t *\n\t\t\t\t\t * So since we cannot give WC any meaningful signal before resolving the async call,\n\t\t\t\t\t * we are forced to accept its default behaviour: redirecting to 'redirectUrl' which is empty,\n\t\t\t\t\t * leading to the aforementioned blocked checkout state.\n\t\t\t\t\t *\n\t\t\t\t\t * The only known recovery is dispatch(CHECKOUT_STORE_KEY).__internalSetIdle()\n\t\t\t\t\t * However, that's using an internal function that might be unsafe and could be removed any time.\n\t\t\t\t\t *\n\t\t\t\t\t * So we're picking the heavy tools when they are required. Hints and PRs welcome.\n\t\t\t\t\t *\n\t\t\t\t\t * @see https://developer.woocommerce.com/docs/cart-and-checkout-checkout-flow-and-events/\n\t\t\t\t\t */\n\t\t\t\t\twindow.location.reload();\n\t\t\t\t\treturn true // just out of spite\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\tfalse\n\t);\n}\n\nexport const initBlockCheckout = () => {\n\tconsole.log('Loading classic checkout integration')\n\tsetUpBlockCheckoutListeners();\n\tsetUpGatewayContainers();\n\tregisterPageReloadingOnPaymentDeclined();\n}\n","import { isBlockCheckout, isPayForOrder } from './src/util/woocommerce';\nimport { setupCustomHttpHeaders } from './src/util/http';\nimport { initClassicCheckout } from \"./src/util/checkout/classicCheckout\";\nimport { initBlockCheckout } from \"./src/util/checkout/blockCheckout\";\nimport { initPaymentCheckout } from \"./src/util/checkout/paymentCheckout\";\n\n\ndocument.addEventListener(\n\t'DOMContentLoaded',\n\tsetupCustomHttpHeaders,\n\tfalse\n);\n/**\n * Boot one of the supported checkout integrations.\n * Let us hope this list is getting shorter, not longer\n */\nif ( isPayForOrder() ) {\n\tinitPaymentCheckout()\n} else if ( isBlockCheckout() ) {\n\tinitBlockCheckout();\n} else {\n\tinitClassicCheckout()\n}\n\n","import { setupClassicCheckoutListeners } from \"../../store/storeListeners\";\nimport $ from \"jquery\";\nimport {\n\tisPayForOrder,\n\tisPayoneerGatewaySelected,\n\tsubmitOrderPayViaAjax,\n\tfocusOnSelectedGateway\n} from \"../woocommerce\";\nimport { PAYONEER_STORE_KEY } from \"../../store\";\nimport { defaultHooks } from '@wordpress/hooks';\nimport { select, dispatch } from '@wordpress/data';\nimport { releaseOnHoldOrder, setOnPaymentDeclinedNonce } from \"../../store/actions\";\n\n\nexport const initPaymentCheckout = () => {\n\tconsole.log('Loading payment checkout integration')\n\n\tdocument.addEventListener(\n\t\t'DOMContentLoaded',\n\t\t() => {\n\t\t\tsetupClassicCheckoutListeners()\n\t\t\tdispatch(PAYONEER_STORE_KEY).\n\t\t\t\tsetOnPaymentDeclinedNonce(PayoneerData.onPaymentDeclinedNonce);\n\n\t\t\tconst $orderReviewForm = $( '#order_review' );\n\n\t\t\tdefaultHooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onSdkError',\n\t\t\t\t'payoneer/paymentCheckout',\n\t\t\t\t( isResolved, checkout, component, data ) => {\n\t\t\t\t\tconst { payOrderErrorFlag } = window.PayoneerData;\n\t\t\t\t\tconst url = new URL( document.location );\n\t\t\t\t\turl.searchParams.set( payOrderErrorFlag, true );\n\t\t\t\t\twindow.location.href = url.toString();\n\t\t\t\t\treturn isResolved;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\twp.hooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onPaymentDeclined',\n\t\t\t\t'payoneer/paymentCheckout',\n\t\t\t\tasync () => {\n\t\t\t\t\tawait wp.data.dispatch(PAYONEER_STORE_KEY).releaseOnHoldOrder(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlongId: select( PAYONEER_STORE_KEY ).getLongId(),\n\t\t\t\t\t\t\torderKey: new URLSearchParams(window.location.search).get('key'),\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\twindow.location.reload();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t$orderReviewForm.on( 'submit', ( e ) => {\n\t\t\t\tif ( !isPayoneerGatewaySelected() || select( PAYONEER_STORE_KEY ).isHostedModeForced() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopImmediatePropagation();\n\n\t\t\t\tconst isValid = select( PAYONEER_STORE_KEY ).getIsValid();\n\n\t\t\t\tif ( !isValid ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfocusOnSelectedGateway();\n\t\t\t\t\t} catch (error){\n\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tsubmitOrderPayViaAjax( $orderReviewForm )\n\t\t\t\t\t.then( () => dispatch( PAYONEER_STORE_KEY ).pay() )\n\t\t\t\t\t.catch( () => {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Reloading enables us to see error messages added via wc_add_notice()\n\t\t\t\t\t\t * Scrolling up makes sure the notices are in the viewport after the refresh\n\t\t\t\t\t\t */\n\t\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tdispatch( PAYONEER_STORE_KEY ).mountComponents();\n\t\t},\n\t\tfalse\n\t);\n}\n","import { setupClassicCheckoutListeners } from \"../../store/storeListeners\";\nimport $ from \"jquery\";\nimport {\n\tgetSelectedPaymentBox,\n\tisPayoneerGatewaySelected,\n\tfocusOnSelectedGateway\n} from \"../woocommerce\";\nimport { PAYONEER_STORE_KEY } from \"../../store\";\nimport { defaultHooks } from '@wordpress/hooks';\nimport { select, dispatch } from '@wordpress/data';\nimport { releaseOnHoldOrder, setOnPaymentDeclinedNonce } from \"../../store/actions\";\n\nexport const initClassicCheckout = () => {\n\tconsole.log('Loading classic checkout integration')\n\tdocument.addEventListener(\n\t\t'DOMContentLoaded',\n\t\t() => {\n\t\t\tsetupClassicCheckoutListeners()\n\t\t\tdispatch(PAYONEER_STORE_KEY)\n\t\t\t\t.setOnPaymentDeclinedNonce(PayoneerData.onPaymentDeclinedNonce);\n\n\t\t\tconst $checkoutForm = $( 'form.checkout' );\n\n\t\t\tdefaultHooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onSdkError',\n\t\t\t\t'payoneer/shortcodeCheckout',\n\t\t\t\t( isResolved, checkout, component, data ) => {\n\t\t\t\t\twp.data.dispatch(PAYONEER_STORE_KEY).reboot();\n\n\t\t\t\t\t$( document.body ).trigger( 'update_checkout' );\n\t\t\t\t\treturn isResolved\n\t\t\t\t}\n\t\t\t);\n\n\t\t\twp.hooks.addFilter(\n\t\t\t\t'payoneer.webSdk.onPaymentDeclined',\n\t\t\t\t'payoneer/shortcodeCheckout',\n\t\t\t\t() => {\n\t\t\t\t\twp.data.dispatch(PAYONEER_STORE_KEY).releaseOnHoldOrder(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlongId: select( PAYONEER_STORE_KEY ).getLongId(),\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Cannot use native event listener for events dispatched by jQuery\n\t\t\t * https://github.com/jquery/jquery/issues/3347\n\t\t\t */\n\t\t\t$( document.body ).on( 'updated_checkout', () => dispatch( PAYONEER_STORE_KEY ).initPayoneerComponents() );\n\n\t\t\t$checkoutForm.on('checkout_place_order', () => {\n\t\t\t\tconst isValid = select( PAYONEER_STORE_KEY ).getIsValid();\n\t\t\t\tif ( isValid ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tfocusOnSelectedGateway();\n\t\t\t\t} catch(error) {\n\t\t\t\t\tconsole.error(error);\n\t\t\t\t} finally {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t$checkoutForm.on( 'checkout_place_order_success', ( e, result ) => {\n\t\t\t\tif ( !isPayoneerGatewaySelected() || select( PAYONEER_STORE_KEY ).isHostedModeForced() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdispatch( PAYONEER_STORE_KEY ).pay();\n\n\t\t\t\t//Override default redirect to hosted payment page\n\t\t\t\tresult.redirect = '#payoneer-redirect';\n\n\t\t\t\t/**\n\t\t\t\t * Create a timeout that races the SDK's payment handling.\n\t\t\t\t * If the handling is not done after 1,5 second, it unblocks\n\t\t\t\t * the checkout form and scrolls the users to the payment fields\n\t\t\t\t * because probably there is an error displayed there\n\t\t\t\t *\n\t\t\t\t * This is done since the SDK does not have any validation callback\n\t\t\t\t * or Promise we could attach to.\n\t\t\t\t */\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t$checkoutForm.removeClass( 'processing' ).unblock();\n\t\t\t\t\t$.scroll_to_notices(\n\t\t\t\t\t\t$( getSelectedPaymentBox() )\n\t\t\t\t\t);\n\t\t\t\t}, 1500 );\n\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t},\n\t\tfalse\n\t);\n}\n"],"names":["f","k","Symbol","for","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","exports","jsx","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","module","window","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","o","defineProperty","enumerable","get","obj","prop","r","toStringTag","value","paymentFieldsComponentAttribute","PayoneerData","selectedPaymentGateway","document","querySelector","selectedPaymentGatewayId","id","isPayoneerGatewaySelected","isPayoneerGateway","gatewayId","test","isPayForOrder","focusOnSelectedGateway","focus","ACTIONS","SET_EXTENSION_DATA","SET_LONG_ID","SET_LIST_URL","SET_ENV","SET_SDK","SET_SDK_VERSION","SET_SDK_INTEGRITY","SET_SDK_STATE","ADD_COMPONENT","REMOVE_COMPONENT","MOUNT_COMPONENTS","PAY","SET_ACTIVE_PAYMENT_METHOD","SET_FORCE_HOSTED_FLOW","SET_IS_VALID","SET_ORDER_ID","SET_ON_PAYMENT_DECLINED_NONCE","initialState","activePaymentMethod","longId","env","sdkState","forceHostedFlow","isValid","availableDropInComponents","getComponentNameByGatewayId","mountComponents","components","sdk","componentName","component","entries","container","findComponentContainer","Element","isAvailable","mount","setLongId","async","select","resolveSelect","dispatch","getSdk","updateLongId","payload","setSdkState","setEnv","addComponent","console","log","isDroppedIn","name","dropIn","hidePaymentButton","doMountComponents","error","removeComponent","initPayoneerComponents","getLongId","reboot","defaultHooks","doAction","wp","data","invalidateResolutionForStore","availableComponents","getAvailableDropInComponents","pay","getActivePaymentMethod","onBeforeError","state","includes","interaction","reason","setForceHostedFlow","applyFilters","onPaymentDeclined","onComponentListChange","changeInfo","addedComponents","forEach","removedComponents","onValidationInfo","setIsValid","valid","setActivePaymentMethod","method","flag","setOnPaymentDeclinedNonce","nonce","setOrderId","orderId","releaseOnHoldOrder","requestData","targetUrlBase","wc_checkout_params","wc_ajax_url","toString","replace","separator","targetUrl","onPaymentDeclinedNonce","Promise","resolve","reject","$","url","xhrFields","withCredentials","dataType","success","catch","websdkStyles","styles","getEnv","sdkVersion","getSdkVersion","sdkIntegrity","getSdkIntegrity","config","preload","Payoneer","CheckoutWeb","script","createElement","src","formatUmdUrl","scriptVersion","URL","webSdkUmdUrlTemplate","onload","onerror","integrity","crossOrigin","head","appendChild","then","nonLoadingState","interval","setInterval","clearInterval","getExtensionData","response","apiFetch","path","cache","parse","payoneerExtensionData","json","extensions","extensionData","environment","PAYONEER_STORE_KEY","payoneerStore","createReduxStore","reducer","action","extension","listUrl","actions","selectors","isHostedModeForced","getIsValid","getOrderId","getOnPaymentDeclinedNonce","resolvers","register","FORCE_HOSTED_MODE_HEADER","IS_PAYMENT_CHECKOUT","getCustomHeaders","customHeaders","String","URLSearchParams","location","search","addAction","addFilter","headers","setupClassicCheckoutListeners","paymentMethodCallback","methodName","_document$querySelect","paymentMethodName","jQuery","body","on","payWithPayoneer","rebootPayoneer","WidgetContainer","withSelect","ownProps","payoneer","eventRegistration","provider","paymentMethodData","onPaymentSetup","onCheckoutSuccess","onCheckoutFail","useEffect","message","_jsx","className","addEventListener","originalFetch","fetch","args","options","origin","XMLHttpRequest","originalOpen","open","originalSend","send","rest","this","_isSameOrigin","apply","header","setRequestHeader","$orderReviewForm","isResolved","checkout","payOrderErrorFlag","searchParams","set","href","hooks","orderKey","reload","preventDefault","stopImmediatePropagation","$form","block","overlayCSS","background","opacity","ajax_url","fields","serialize","params","always","unblock","scrollTo","isBlockCheckout","setUpBlockCheckoutListeners","currentPaymentMethod","wcPaymentStore","PAYMENT_STORE_KEY","paymentStoreCallback","paymentMethod","subscribe","Array","isArray","inpsydeGateways","gatewayName","push","icons","payoneerOrderId","$checkoutForm","trigger","result","redirect","setTimeout","removeClass","selector","getPaymentBox"],"sourceRoot":""} -
payoneer-checkout/trunk/modules/inpsyde/payoneer-embedded-payment/src/EmbeddedPaymentModule.php
r3305047 r3321269 14 14 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\EmbeddedPayment\AjaxOrderPay\AjaxPayAction; 15 15 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\EmbeddedPayment\AjaxOrderPay\OrderPayload; 16 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\CheckoutContext;17 16 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManager; 18 17 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; … … 107 106 $onBeforeServerError = filter_input(\INPUT_GET, $onBeforeServerErrorFlag, \FILTER_CALLBACK, ['options' => 'sanitize_text_field']); 108 107 if ($onBeforeServerError) { 109 $listSessionManager->persist(null, new PaymentContext($order));110 108 /** 111 109 * Safely redirect without the $onBeforeServerError flag. … … 117 115 return; 118 116 } 119 $listSessionManager->persist(null, new CheckoutContext());120 $listSessionManager->persist(null, new PaymentContext($order));121 117 if (!in_array($interactionCode, ['RETRY', 'ABORT'], \true)) { 122 118 return; … … 176 172 woocommerce_store_api_register_endpoint_data(['endpoint' => CartSchema::IDENTIFIER, 'namespace' => 'payoneer-checkout', 'data_callback' => function () use ($container): array { 177 173 return $this->provideCartExtensionData($container); 178 }, 'schema_callback' => fn() => ['longId' => ['description' => 'LongId of the LIST session', 'type' => 'string', 'readonly' => \true], 'environment' => ['description' => 'The current environment', 'type' => 'string', 'readonly' => \true], 'sdkVersion' => ['description' => 'Pinned WebSDK script version', 'type' => 'string', 'readonly' => \true], 'sdkIntegrity' => ['description' => 'WebSDK integrity hash', 'type' => 'string', 'readonly' => \true] ], 'schema_type' => \ARRAY_A]);174 }, 'schema_callback' => fn() => ['longId' => ['description' => 'LongId of the LIST session', 'type' => 'string', 'readonly' => \true], 'environment' => ['description' => 'The current environment', 'type' => 'string', 'readonly' => \true], 'sdkVersion' => ['description' => 'Pinned WebSDK script version', 'type' => 'string', 'readonly' => \true], 'sdkIntegrity' => ['description' => 'WebSDK integrity hash', 'type' => 'string', 'readonly' => \true], 'comment' => ['description' => 'Arbitrary text with debugging info, error description, etc.', 'type' => 'string', 'readonly' => \true]], 'schema_type' => \ARRAY_A]); 179 175 }); 180 176 } … … 196 192 */ 197 193 $isStoreApi = $container->get('wc.is_store_api_request'); 194 $emptyResponse = ['longId' => null, 'environment' => null, 'sdkVersion' => null, 'sdkIntegrity' => null]; 198 195 if (!$isStoreApi) { 199 return ['longId' => null, 'environment' => null, 'sdkVersion' => null, 'sdkIntegrity' => null]; 196 $emptyResponse['comment'] = 'Current request is not Store REST API request'; 197 return $emptyResponse; 200 198 } 201 199 $listProvider = $container->get('list_session.manager'); … … 203 201 $envExtractor = $container->get('embedded_payment.list_url_environment_extractor'); 204 202 assert($envExtractor instanceof ListUrlEnvironmentExtractor); 205 $list = $listProvider->provide(ListSessionManager::determineContextFromGlobals()); 203 try { 204 $list = $listProvider->provide(new PaymentContext()); 205 } catch (\Throwable $throwable) { 206 $emptyResponse['comment'] = 'Cannot get List, throwable caught: ' . $throwable->getMessage(); 207 return $emptyResponse; 208 } 206 209 // TODO: Refactor the environment detection to use the current WP options. 207 210 // Extract the environment name from the LIST response. -
payoneer-checkout/trunk/modules/inpsyde/payoneer-embedded-payment/src/EnvironmentProvider.php
r3260742 r3321269 4 4 namespace Syde\Vendor\Inpsyde\PayoneerForWoocommerce\EmbeddedPayment; 5 5 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManager;7 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; 7 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; 8 8 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ListSession\ListInterface; 9 9 class EnvironmentProvider … … 23 23 protected function getList(): ListInterface 24 24 { 25 $context = ListSessionManager::determineContextFromGlobals(); 26 return $this->listSessionProvider->provide($context); 25 return $this->listSessionProvider->provide(new PaymentContext()); 27 26 } 28 27 protected function getListLongId(): string -
payoneer-checkout/trunk/modules/inpsyde/payoneer-embedded-payment/src/ListLongIdPaymentRequestValidator.php
r3260742 r3321269 7 7 use Syde\Vendor\Inpsyde\PaymentGateway\PaymentRequestValidatorInterface; 8 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\RequestHeaderUtil; 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\CheckoutContext;10 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; 10 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; 11 11 /** 12 12 * Validates payment requests by checking the presence and value of a custom header. … … 62 62 } 63 63 $headerValue = $headerUtil->getHeader($longIdHeader); 64 $currentLongId = $this->listSessionProvider->provide(new CheckoutContext())->getIdentification()->getLongId();64 $currentLongId = $this->listSessionProvider->provide(new PaymentContext())->getIdentification()->getLongId(); 65 65 if ($headerValue !== $currentLongId) { 66 66 throw new \UnexpectedValueException( -
payoneer-checkout/trunk/modules/inpsyde/payoneer-embedded-payment/src/PaymentFieldsRenderer/ListDebugFieldRenderer.php
r3111876 r3321269 5 5 6 6 use Syde\Vendor\Inpsyde\PaymentGateway\PaymentFieldsRendererInterface; 7 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManager;8 7 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; 9 9 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ListSession\ListSerializerInterface; 10 10 class ListDebugFieldRenderer implements PaymentFieldsRendererInterface … … 25 25 public function renderFields(): string 26 26 { 27 $context = ListSessionManager::determineContextFromGlobals(); 28 $listSession = $this->listSessionProvider->provide($context); 27 $listSession = $this->listSessionProvider->provide(new PaymentContext()); 29 28 $json = (string) json_encode($this->serializer->serializeListSession($listSession), \JSON_PRETTY_PRINT); 30 29 return '<pre>' . $json . '</pre>'; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-embedded-payment/src/PaymentProcessor/EmbeddedPaymentProcessor.php
r3305047 r3321269 8 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\MisconfigurationDetector\MisconfigurationDetectorInterface; 9 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\PaymentProcessor\AbstractPaymentProcessor; 10 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManager;11 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionPersistor;12 10 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; 13 11 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; … … 25 23 * @var string 26 24 */ 27 protected $hostedModeOverrideFlag;25 protected string $hostedModeOverrideFlag; 28 26 protected bool $isRestRequest; 29 public function __construct(WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, ListSessionProvider $sessionProvider, ListSessionPersistor $sessionPersistor,TokenGeneratorInterface $tokenGenerator, string $tokenKey, string $transactionIdFieldName, string $hostedModeOverrideFlag, MisconfigurationDetectorInterface $misconfigurationDetector, string $checkoutSessionHashKey, bool $isRestRequest)27 public function __construct(WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, ListSessionProvider $sessionProvider, TokenGeneratorInterface $tokenGenerator, string $tokenKey, string $transactionIdFieldName, string $hostedModeOverrideFlag, MisconfigurationDetectorInterface $misconfigurationDetector, string $checkoutSessionHashKey, bool $isRestRequest) 30 28 { 31 parent::__construct($misconfigurationDetector, $sessionProvider, $ sessionPersistor, $updateCommandFactory, $tokenGenerator, $tokenKey, $transactionIdFieldName, $checkoutSessionHashKey);29 parent::__construct($misconfigurationDetector, $sessionProvider, $updateCommandFactory, $tokenGenerator, $tokenKey, $transactionIdFieldName, $checkoutSessionHashKey); 32 30 $this->hostedModeOverrideFlag = $hostedModeOverrideFlag; 33 31 $this->isRestRequest = $isRestRequest; … … 35 33 public function processPayment(WC_Order $order, PaymentGateway $gateway): array 36 34 { 37 /** 38 * Transfer the checkout-based LIST to the WC_Order. 39 * From there, the parent AbstractPaymentProcessor can take over. 40 */ 41 $list = $this->sessionProvider->provide(ListSessionManager::determineContextFromGlobals($order)); 42 $this->sessionPersistor->persist($list, new PaymentContext($order)); 35 $this->sessionProvider->provide(new PaymentContext($order)); 43 36 try { 44 37 $result = parent::processPayment($order, $gateway); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-hosted-payment/inc/extensions.php
r3111876 r3321269 32 32 */ 33 33 $factory = new Factory(['list_session.manager', 'inpsyde_payment_gateway.transaction_id_field_name', 'hosted_payment.misconfiguration_detector', 'hosted_payment.order_based_update_command_factory', 'checkout.security_token_generator', 'checkout.order.security_header_field_name', 'hosted_payment.payment_flow_override_flag.is_set', 'checkout.session_hash_key'], static function (ListSessionManager $listSessionManager, string $transactionIdFieldName, MisconfigurationDetectorInterface $misconfigurationDetector, WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, TokenGeneratorInterface $tokenGenerator, string $tokenKey, bool $fallbackToHostedModeFlag, string $sessionHashKey): PaymentProcessorInterface { 34 return new HostedPaymentProcessor($ listSessionManager, $transactionIdFieldName, $misconfigurationDetector, $listSessionManager, $updateCommandFactory, $tokenGenerator, $tokenKey, $fallbackToHostedModeFlag, $sessionHashKey);34 return new HostedPaymentProcessor($transactionIdFieldName, $misconfigurationDetector, $listSessionManager, $updateCommandFactory, $tokenGenerator, $tokenKey, $fallbackToHostedModeFlag, $sessionHashKey); 35 35 }); 36 36 return $factory($container); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-hosted-payment/src/PaymentProcessor/HostedPaymentProcessor.php
r3305047 r3321269 7 7 use Syde\Vendor\Inpsyde\PaymentGateway\PaymentGateway; 8 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\Authentication\TokenGeneratorInterface; 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\CheckoutExceptionInterface;10 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\MisconfigurationDetector\MisconfigurationDetectorInterface; 11 10 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\PaymentProcessor\AbstractPaymentProcessor; 12 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionPersistor;13 11 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; 14 12 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; … … 25 23 { 26 24 /** 27 * @var ListSessionPersistor28 */29 protected $listSessionPersistor;30 /**31 25 * @var bool 32 26 */ 33 protected $fallbackToHostedModeFlag;34 public function __construct( ListSessionPersistor $listSessionPersistor,string $transactionIdFieldName, MisconfigurationDetectorInterface $misconfigurationDetector, ListSessionProvider $sessionProvider, WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, TokenGeneratorInterface $tokenGenerator, string $tokenKey, bool $fallbackToHostedModeFlag, string $checkoutSessionHashKey)27 protected bool $fallbackToHostedModeFlag; 28 public function __construct(string $transactionIdFieldName, MisconfigurationDetectorInterface $misconfigurationDetector, ListSessionProvider $sessionProvider, WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, TokenGeneratorInterface $tokenGenerator, string $tokenKey, bool $fallbackToHostedModeFlag, string $checkoutSessionHashKey) 35 29 { 36 parent::__construct($misconfigurationDetector, $sessionProvider, $listSessionPersistor, $updateCommandFactory, $tokenGenerator, $tokenKey, $transactionIdFieldName, $checkoutSessionHashKey); 37 $this->listSessionPersistor = $listSessionPersistor; 30 parent::__construct($misconfigurationDetector, $sessionProvider, $updateCommandFactory, $tokenGenerator, $tokenKey, $transactionIdFieldName, $checkoutSessionHashKey); 38 31 $this->fallbackToHostedModeFlag = $fallbackToHostedModeFlag; 39 32 } … … 43 36 public function processPayment(WC_Order $order, PaymentGateway $gateway): array 44 37 { 45 $this->clearOutdatedListInOrder($order);46 38 /** 47 39 * Here we create a new List if failed to update existing one. … … 91 83 } 92 84 /** 93 * If fallback to HPP flag is set, we need to clear saved LIST. It may be created for embedded94 * flow, so we cannot use it.95 *96 * @param WC_Order $order97 *98 * @throws CheckoutExceptionInterface99 */100 protected function clearOutdatedListInOrder(WC_Order $order): void101 {102 if ($this->fallbackToHostedModeFlag) {103 $this->listSessionPersistor->persist(null, new PaymentContext($order));104 }105 }106 /**107 85 * If the LIST response contains a redirect object, craft a compatible URL 108 86 * out of the given URL and its parameters. If none is found, use our own return URL -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/inc/extensions.php
r3305047 r3321269 6 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Factory\RedirectInjectingListFactory; 7 7 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ListSession\ListFactoryInterface; 8 use Syde\Vendor\Psr\Container\ContainerInterface;9 8 return static function (): array { 10 9 return ['payoneer_sdk.list_factory' => static function (ListFactoryInterface $previous): ListFactoryInterface { 11 10 return new RedirectInjectingListFactory($previous); 12 }, 'list_session.middlewares' => static function (array $middlewares, ContainerInterface $container): array {13 if ($container->get('wc.session.is-available')) {14 /**15 * If WC_Session is available, we want respective middleware to be present.16 * Even if we will be unable to create list (i.e. cart is not yet initialized),17 * we want to be able to get saved List session from WC_Session.18 */19 \array_unshift($middlewares, $container->get('list_session.middlewares.wc-session'));20 }21 /**22 * If it is safe to boot a LIST,23 * we can add additional middleware relevant to the frontend UX24 */25 if (!$container->get('list_session.can_try_create_list')) {26 return $middlewares;27 }28 /**29 * The order is important here!30 */31 \array_unshift($middlewares, $container->get('list_session.middlewares.wc-session-update'));32 /**33 * Prepend the validating middleware as the last step.34 * We do not want anything to execute before it.35 */36 \array_unshift($middlewares, $container->get('list_session.middlewares.validating'));37 return $middlewares;38 11 }]; 39 12 }; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/inc/factories.php
r3305047 r3321269 4 4 namespace Syde\Vendor; 5 5 6 use Syde\Vendor\Dhii\Services\Factory; 6 7 use Syde\Vendor\Psr\Container\ContainerInterface; 7 8 return static function (): array { … … 36 37 }, 37 38 'list_session.can_try_create_list' => static fn(ContainerInterface $container) => $container->get('list_session.can_persist') && $container->get('list_session.can_create'), 39 'wc.order_under_payment' => new Factory(['wc.order_awaiting_payment', 'wc.pay_for_order_id'], static function (int $orderAwaitingPayment, int $payForOrderId): int { 40 if ($payForOrderId) { 41 return $payForOrderId; 42 } 43 return $orderAwaitingPayment; 44 }), 45 'wc.pay_for_order_id' => new Factory(['wc.pay_for_order_id.from_header', 'wc'], static function (int $orderIdFromHeader): int { 46 $orderPay = \get_query_var('order-pay'); 47 if (\is_numeric($orderPay) && (int) $orderPay > 0) { 48 return (int) $orderPay; 49 } 50 return $orderIdFromHeader; 51 }), 38 52 ]; 39 53 }; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/inc/services.php
r3305047 r3321269 21 21 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ApiListSessionProvider; 22 22 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManager; 23 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManagerProxy; 24 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\NoopListSessionPersistor; 23 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Middleware\ListCache; 25 24 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Middleware\UpdatingMiddleware; 26 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Middleware\ValidatingMiddleware; 27 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Middleware\WcOrderMiddleware; 28 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Middleware\WcSessionMiddleware; 25 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Middleware\FetchingMiddleware; 29 26 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Api\Gateway\WcProductSerializer\WcProductSerializerInterface; 30 27 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Callback\CallbackFactoryInterface; … … 66 63 return 'v5'; 67 64 }, 68 'list_session.default_persistor' => new Constructor(NoopListSessionPersistor::class, []), 69 'list_session.creator' => new Constructor(ApiListSessionProvider::class, ['list_session.list_session_factory', 'list_session.order_based_list_session_factory', 'list_session.integration_type', 'list_session.can_try_create_list', 'list_session.hosted_version']), 70 'list_session.middlewares.validating' => new Constructor(ValidatingMiddleware::class, ['payoneer_sdk.commands.fetch', 'list_session.manager.proxy']), 71 'list_session.middlewares.wc-order' => new Constructor(WcOrderMiddleware::class, ['checkout.order_list_session_field_name', 'core.list_serializer', 'core.list_deserializer']), 72 'list_session.middlewares.wc-session' => new Constructor(WcSessionMiddleware::class, ['wc.session', 'checkout.list_session_manager.cache_key', 'core.list_serializer', 'core.list_deserializer']), 73 'list_session.middlewares.wc-session-update' => new Constructor(UpdatingMiddleware::class, ['list_session.manager.proxy', 'list_session.list_session_factory', 'checkout.checkout_hash_provider', 'checkout.session_hash_key', 'core.order_based_update_command_factory', 'wp.is_rest_api_request']), 74 'list_session.middlewares' => new ServiceList([ 75 /** 76 * WcOrderMiddleware only operates on PaymentContext, otherwise just calls next 77 * middleware. PaymentContext always contains order, so it is safe to always have 78 * WcOrderMiddleware. 79 * 80 * @todo: consider doing the same with the WC_Session List provider 81 */ 82 'list_session.middlewares.wc-order', 83 'list_session.creator', 84 'list_session.default_persistor', 85 ]), 65 'list_session.creator' => new Constructor(ApiListSessionProvider::class, ['list_session.list_session_factory', 'list_session.order_based_list_session_factory', 'list_session.integration_type', 'list_session.can_try_create_list.callable', 'list_session.hosted_version']), 66 'list_session.list_cache' => new Constructor(ListCache::class), 67 'list_session.middlewares.fetching' => new Constructor(FetchingMiddleware::class, ['payoneer_sdk.commands.fetch', 'list_session.list_cache', 'list_session.selected_payment_flow']), 68 'list_session.middlewares.wc-session-update' => new Constructor(UpdatingMiddleware::class, ['list_session.list_session_factory', 'checkout.checkout_hash_provider', 'checkout.session_hash_key', 'core.order_based_update_command_factory', 'wp.is_rest_api_request', 'list_session.list_cache']), 69 'list_session.middlewares' => new ServiceList(['list_session.middlewares.wc-session-update', 'list_session.middlewares.fetching', 'list_session.creator']), 86 70 'list_session.manager' => new Constructor(ListSessionManager::class, ['list_session.middlewares']), 87 71 /** 88 * An unpleasant helper to break a recursive dependency chain.72 * Callback returning can_try_create_list value. 89 73 * 74 * Since this value may change during the request processing (note this is factories, 75 * not services), we want to have the actual value in the class, not the one saved 76 * as a class property when it was created. 90 77 */ 91 'list_session.manager.proxy' => static function (ContainerInterface $container): ListSessionManagerProxy { 92 /** 93 * @return ListSessionManager 94 * @var callable():ListSessionManager $factory 95 */ 96 $factory = static function () use ($container): ListSessionManager { 97 /** 98 * @var ListSessionManager $manager 99 */ 100 $manager = $container->get('list_session.manager'); 101 return $manager; 102 }; 103 return new ListSessionManagerProxy($factory); 104 }, 78 'list_session.can_try_create_list.callable' => static fn(ContainerInterface $container) => static fn() => $container->get('list_session.can_try_create_list'), 105 79 ]; 106 80 }; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/src/Factory/RedirectInjectingListFactory.php
r3111876 r3321269 11 11 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Network\NetworksInterface; 12 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Payment\PaymentInterface; 13 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelInterface;14 13 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Redirect\RedirectInterface; 15 14 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Status\StatusInterface; … … 28 27 * @inheritDoc 29 28 */ 30 public function createList(array $links, IdentificationInterface $identification, StatusInterface $status, PaymentInterface $payment = null, CustomerInterface $customer = null, StyleInterface $style = null, RedirectInterface $redirect = null, string $division = null, array $products = null, ProcessingModelInterface $processingModel = null,NetworksInterface $networks = null): ListInterface29 public function createList(array $links, IdentificationInterface $identification, StatusInterface $status, PaymentInterface $payment = null, CustomerInterface $customer = null, StyleInterface $style = null, RedirectInterface $redirect = null, string $division = null, array $products = null, NetworksInterface $networks = null): ListInterface 31 30 { 32 31 $redirect = $redirect ?? apply_filters('payoneer-checkout.fallback_redirect', $redirect, $identification); … … 34 33 throw new ApiException('Redirect must be instance of RedirectInterface or null'); 35 34 } 36 return $this->listFactory->createList($links, $identification, $status, $payment, $customer, $style, $redirect, $division, $products, $ processingModel, $networks);35 return $this->listFactory->createList($links, $identification, $status, $payment, $customer, $style, $redirect, $division, $products, $networks); 37 36 } 38 37 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/src/ListSession/ApiListSessionProvider.php
r3305047 r3321269 4 4 namespace Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession; 5 5 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Factory\FactoryExceptionInterface; 6 7 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Factory\ListSession\OrderBasedListSessionFactory; 7 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Factory\ListSession\WcBasedListSessionFactoryInterface; … … 13 14 * @var WcBasedListSessionFactoryInterface 14 15 */ 15 private $checkoutFactory;16 private WcBasedListSessionFactoryInterface $checkoutFactory; 16 17 /** 17 18 * @var OrderBasedListSessionFactory 18 19 */ 19 private $listFactory;20 private OrderBasedListSessionFactory $listFactory; 20 21 /** 21 22 * @var PayoneerIntegrationTypes::* $integrationType … … 23 24 private $integrationType; 24 25 /** 25 * @var bool26 * @var callable 26 27 */ 27 private bool$canCreateList;28 private $canCreateList; 28 29 /** 29 30 * @var string|null 30 31 */ 31 private $hostedVersion;32 private ?string $hostedVersion; 32 33 /** 33 34 * @param WcBasedListSessionFactoryInterface $checkoutFactory 34 35 * @param OrderBasedListSessionFactory $listFactory 35 36 * @param string $integrationType $integrationType 36 * @param bool$canCreateList37 * @param callable $canCreateList 37 38 * @param string|null $hostedVersion 38 39 * 39 40 * @psalm-param PayoneerIntegrationTypes::* $integrationType 40 41 */ 41 public function __construct(WcBasedListSessionFactoryInterface $checkoutFactory, OrderBasedListSessionFactory $listFactory, string $integrationType, bool$canCreateList, string $hostedVersion = null)42 public function __construct(WcBasedListSessionFactoryInterface $checkoutFactory, OrderBasedListSessionFactory $listFactory, string $integrationType, callable $canCreateList, string $hostedVersion = null) 42 43 { 43 44 $this->checkoutFactory = $checkoutFactory; … … 47 48 $this->canCreateList = $canCreateList; 48 49 } 50 /** 51 * @throws FactoryExceptionInterface 52 */ 49 53 public function provide(ContextInterface $context): ListInterface 50 54 { 51 if (! $this->canCreateList) {55 if (!($this->canCreateList)()) { 52 56 throw new \RuntimeException('Cannot create List session.'); 53 57 } 54 if ($context instanceof CheckoutContext) { 55 $totals = $context->getCart()->get_total('edit'); 58 $order = $context->getOrder(); 59 $cart = $context->getCart(); 60 $customer = $context->getCustomer(); 61 if ($order === null) { 62 if ($cart === null) { 63 throw new \RuntimeException(sprintf('Cart not found for customer session in %s', __CLASS__)); 64 } 65 if ($customer === null) { 66 throw new \RuntimeException(sprintf('WC Customer not found in %s', __CLASS__)); 67 } 68 $totals = $cart->get_total('edit'); 56 69 if (!$totals) { 57 70 throw new \RuntimeException(sprintf('Invalid totals amount in %s', __CLASS__)); 58 71 } 59 $list = $this->checkoutFactory->createList($c ontext->getCustomer(), $context->getCart(), $this->integrationType, $this->hostedVersion);60 $context->offsetSet(' list_just_created', \true);72 $list = $this->checkoutFactory->createList($customer, $cart, $this->integrationType, $this->hostedVersion); 73 $context->offsetSet('pristine', \true); 61 74 return $list; 62 75 } 63 if ($context instanceof PaymentContext) { 64 $list = $this->listFactory->createList($context->getOrder(), $this->integrationType, $this->hostedVersion); 65 $context->offsetSet('list_just_created', \true); 66 return $list; 67 } 68 throw new \RuntimeException(sprintf('Unknown Context passed to %s', __CLASS__)); 76 $list = $this->listFactory->createList($order, $this->integrationType, $this->hostedVersion); 77 $context->offsetSet('pristine', \true); 78 return $list; 69 79 } 70 80 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/src/ListSession/ContextInterface.php
r3080398 r3321269 5 5 interface ContextInterface extends \ArrayAccess 6 6 { 7 public function getCart(): ?\WC_Cart; 8 public function getCustomer(): ?\WC_Customer; 9 public function getSession(): ?\WC_Session; 10 public function getOrder(): ?\WC_Order; 7 11 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionManager.php
r3260742 r3321269 4 4 namespace Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession; 5 5 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\RequestHeaderUtil;7 6 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ListSession\ListInterface; 8 class ListSessionManager implements ListSessionProvider , ListSessionPersistor7 class ListSessionManager implements ListSessionProvider 9 8 { 10 9 /** 11 * @var ListSessionMiddleware[]|ListSessionProvider[] |ListSessionPersistor[]10 * @var ListSessionMiddleware[]|ListSessionProvider[] 12 11 */ 13 12 private $middlewares; 14 13 /** 15 * @param ListSessionMiddleware[]|ListSessionProvider[] |ListSessionPersistor[]$middlewares14 * @param ListSessionMiddleware[]|ListSessionProvider[] $middlewares 16 15 */ 17 16 public function __construct(array $middlewares) 18 17 { 19 18 $this->middlewares = $middlewares; 20 }21 public function persist(?ListInterface $list, ContextInterface $context): bool22 {23 reset($this->middlewares);24 $runner = new Runner($this->middlewares);25 return $runner->persist($list, $context);26 19 } 27 20 public function provide(ContextInterface $context): ListInterface … … 31 24 return $runner->provide($context); 32 25 } 33 /**34 * Decide whether to use PaymentContext (order-based) or CheckoutContext (cart-based)35 * by inspecting request data.36 *37 * TODO: turn this global method into a service so that we can use proper dependencies from our container38 *39 * @param \WC_Order|null $order40 *41 * @return ContextInterface42 */43 public static function determineContextFromGlobals(\WC_Order $order = null): ContextInterface44 {45 /**46 * When using the Store API we currently rely on custom HHT header to pass information47 * about the current checkout attempt.48 */49 $headerUtil = new RequestHeaderUtil();50 $paymentCheckoutHeader = 'x-payoneer-is-payment-checkout';51 $orderKey = $headerUtil->getHeader($paymentCheckoutHeader);52 if (!empty($orderKey)) {53 $orderId = wc_get_order_id_by_order_key($orderKey);54 $order = wc_get_order($orderId);55 if ($order instanceof \WC_Order) {56 return new PaymentContext($order);57 }58 }59 /**60 * For initial page loads, we can use classic WP/WC functions to inspect the current request61 */62 if (is_checkout_pay_page() || isset($_POST['action']) && $_POST['action'] === 'payoneer_order_pay') {63 if ($order === null) {64 $orderId = get_query_var('order-pay');65 $order = wc_get_order((int) $orderId);66 }67 // Ensure the order is of type WC_Order68 if ($order instanceof \WC_Order) {69 return new PaymentContext($order);70 }71 }72 /**73 * When in doubt, return the CheckoutContext which covers classic & block checkout74 */75 return new CheckoutContext();76 }77 26 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionManagerProxy.php
r3111876 r3321269 5 5 6 6 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ListSession\ListInterface; 7 class ListSessionManagerProxy implements ListSessionProvider , ListSessionPersistor7 class ListSessionManagerProxy implements ListSessionProvider 8 8 { 9 9 /** … … 27 27 return $manager; 28 28 } 29 public function persist(?ListInterface $list, ContextInterface $context): bool30 {31 return $this->ensureManager()->persist($list, $context);32 }33 29 public function provide(ContextInterface $context): ListInterface 34 30 { -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/src/ListSession/PaymentContext.php
r3111876 r3321269 4 4 namespace Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession; 5 5 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\RequestHeaderUtil; 6 7 /** 7 8 * Describes an "order-based" context. … … 12 13 class PaymentContext extends AbstractContext 13 14 { 14 /** 15 * @var \WC_Order 16 */ 17 private $order; 18 public function __construct(\WC_Order $order) 15 private ?\WC_Order $order; 16 public function __construct(?\WC_Order $order = null) 19 17 { 20 18 $this->order = $order; 21 19 } 22 public function get Order(): \WC_Order20 public function getCart(): ?\WC_Cart 23 21 { 24 return $this->order; 22 return WC()->cart; 23 } 24 public function getCustomer(): ?\WC_Customer 25 { 26 return WC()->customer; 27 } 28 public function getSession(): ?\WC_Session 29 { 30 return WC()->session; 31 } 32 public function getOrder(): ?\WC_Order 33 { 34 if ($this->order) { 35 return $this->order; 36 } 37 /** 38 * When using the Store API we currently rely on custom HHT header to pass information 39 * about the current checkout attempt. 40 */ 41 $headerUtil = new RequestHeaderUtil(); 42 $paymentCheckoutHeader = 'x-payoneer-is-payment-checkout'; 43 $orderKey = $headerUtil->getHeader($paymentCheckoutHeader); 44 if (!empty($orderKey)) { 45 $orderId = wc_get_order_id_by_order_key($orderKey); 46 $order = wc_get_order($orderId); 47 if ($order instanceof \WC_Order) { 48 return $order; 49 } 50 } 51 /** 52 * For initial page loads, we can use classic WP/WC functions to inspect the current request 53 */ 54 if (is_checkout_pay_page() || isset($_POST['action']) && $_POST['action'] === 'payoneer_order_pay') { 55 $orderId = get_query_var('order-pay'); 56 $order = wc_get_order((int) $orderId); 57 // Ensure the order is of type WC_Order 58 if ($order instanceof \WC_Order) { 59 return $order; 60 } 61 } 62 return null; 25 63 } 26 64 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/src/ListSession/Runner.php
r3111876 r3321269 6 6 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ListSession\ListInterface; 7 7 use RuntimeException; 8 class Runner implements ListSessionProvider , ListSessionPersistor8 class Runner implements ListSessionProvider 9 9 { 10 10 /** 11 * @var array<ListSessionMiddleware|ListSessionProvider |ListSessionPersistor>11 * @var array<ListSessionMiddleware|ListSessionProvider> 12 12 */ 13 13 private $middlewares; 14 14 /** 15 * @param array<ListSessionMiddleware|ListSessionProvider |ListSessionPersistor> $middlewares15 * @param array<ListSessionMiddleware|ListSessionProvider> $middlewares 16 16 */ 17 17 public function __construct(array $middlewares) 18 18 { 19 19 $this->middlewares = $middlewares; 20 }21 public function persist(?ListInterface $list, ContextInterface $context): bool22 {23 /** @var ListSessionMiddleware|ListSessionProvider|ListSessionPersistor $middleware */24 $middleware = current($this->middlewares);25 next($this->middlewares);26 /**27 * We only process persistor middlewares. So if we have a wrong one,28 * skip it by calling the handler again, moving the cursor forward29 */30 if ($middleware instanceof ListSessionMiddleware && !$middleware instanceof ListSessionPersistorMiddleware) {31 return $this->persist($list, $context);32 }33 /**34 * Skip providers as well35 */36 if ($middleware instanceof ListSessionProvider) {37 return $this->persist($list, $context);38 }39 if ($middleware instanceof ListSessionPersistorMiddleware) {40 return $middleware->persist($list, $context, $this);41 }42 if ($middleware instanceof ListSessionPersistor) {43 return $middleware->persist($list, $context);44 }45 throw new RuntimeException(sprintf('Invalid middleware queue entry: %s. Middleware must either be callable or implement %s.', get_class($middleware), ListSessionPersistorMiddleware::class));46 20 } 47 21 public function provide(ContextInterface $context): ListInterface … … 59 33 return $this->provide($context); 60 34 } 61 /**62 * Skip persistors as well63 */64 if ($middleware instanceof ListSessionPersistor) {65 return $this->provide($context);66 }67 35 if ($middleware instanceof ListSessionProviderMiddleware) { 68 36 return $middleware->provide($context, $this); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-list-session/src/Middleware/UpdatingMiddleware.php
r3260742 r3321269 5 5 6 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Api\Gateway\CommandFactory\WcOrderBasedUpdateCommandFactoryInterface; 7 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\CheckoutExceptionInterface; 7 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\HashProvider\HashProviderInterface; 8 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\Factory\ListSession\WcBasedUpdateCommandFactoryInterface; 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\CheckoutContext;10 10 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ContextInterface; 11 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionPersistor;12 11 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; 13 12 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProviderMiddleware; 14 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; 13 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\ApiExceptionInterface; 14 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Command\Exception\CommandExceptionInterface; 15 15 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Command\UpdateListCommandInterface; 16 16 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ListSession\ListInterface; 17 17 class UpdatingMiddleware implements ListSessionProviderMiddleware 18 18 { 19 use IsProcessingTrait; 19 20 protected bool $isRestRequest; 20 /**21 * @var ListSessionPersistor22 */23 private $persistor;24 21 /** 25 22 * @var WcBasedUpdateCommandFactoryInterface 26 23 */ 27 24 protected $wcBasedListSessionFactory; 25 private ListCacheInterface $listCache; 28 26 /** 29 27 * @var HashProviderInterface … … 35 33 private $sessionHashKey; 36 34 protected WcOrderBasedUpdateCommandFactoryInterface $orderBasedUpdateCommandFactory; 37 public function __construct( ListSessionPersistor $persistor, WcBasedUpdateCommandFactoryInterface $wcBasedListSessionFactory, HashProviderInterface $hashProvider, string $sessionHashKey, WcOrderBasedUpdateCommandFactoryInterface $orderBasedUpdateCommandFactory, bool $isRestRequest)35 public function __construct(WcBasedUpdateCommandFactoryInterface $wcBasedListSessionFactory, HashProviderInterface $hashProvider, string $sessionHashKey, WcOrderBasedUpdateCommandFactoryInterface $orderBasedUpdateCommandFactory, bool $isRestRequest, ListCacheInterface $listCache) 38 36 { 39 $this->persistor = $persistor;40 37 $this->wcBasedListSessionFactory = $wcBasedListSessionFactory; 41 38 $this->hashProvider = $hashProvider; … … 43 40 $this->orderBasedUpdateCommandFactory = $orderBasedUpdateCommandFactory; 44 41 $this->isRestRequest = $isRestRequest; 42 $this->listCache = $listCache; 45 43 } 46 44 public function provide(ContextInterface $context, ListSessionProvider $next): ListInterface 47 45 { 46 $list = $next->provide($context); 47 $longId = $list->getIdentification()->getLongId(); 48 /** 49 * We cache here already to avoid multiple UPDATE calls in 50 * case of recursion. 51 * After the UPDATE, 52 * we will cache again to make sure we cache the updated list. 53 */ 54 $this->listCache->cacheList($list); 48 55 /** 49 56 * If we are already at the payment stage, 50 57 * we will let the gateway deal with final updates 51 58 */ 52 if ($this->isProcessing( $context)) {53 return $ next->provide($context);59 if ($this->isProcessing()) { 60 return $list; 54 61 } 55 if ($context instanceof PaymentContext) { 56 return $this->provideForPaymentContext($context, $next); 57 } 58 if ($context instanceof CheckoutContext) { 59 return $this->provideForCheckoutContext($context, $next); 60 } 61 //If we ever add a new type of context, we must be handling it properly. 62 throw new \UnexpectedValueException('Unexpected context type.'); 63 } 64 /** 65 * During payment processing, the final UPDATE is carried out by individual PaymentProcessors. 66 * Therefore, we want to be able to skip redundant UPDATE calls in that stage of the journey. 67 * 68 * @param ContextInterface $context 69 * 70 * @return bool 71 */ 72 protected function isProcessing(ContextInterface $context): bool 73 { 74 /** 75 * During the checkout journey, the LIST is transferred from the WC_Session 76 * to the WC_Order. So we can perform this check for ANY context: 77 */ 78 if (did_action('woocommerce_before_checkout_process') > 0) { 79 return \true; 80 } 81 /** 82 * Now check specifically for PaymentContext 83 */ 84 return $context instanceof PaymentContext && did_action('woocommerce_before_pay_action') > 0; 85 } 86 protected function provideForPaymentContext(PaymentContext $context, ListSessionProvider $provider): ListInterface 87 { 88 $list = $provider->provide($context); 89 if ($context->offsetExists('list_just_created')) { 62 if ($context->offsetExists('pristine')) { 90 63 //It is a fresh list, nothing to do with it. 91 64 return $list; 92 65 } 93 66 try { 94 $command = $this->orderBasedUpdateCommandFactory->createUpdateCommand($context->getOrder(), $list); 95 $updatedList = $this->updateList($command, $list); 96 $this->persistor->persist($updatedList, $context); 97 return $updatedList; 98 } catch (\Throwable $throwable) { 99 $this->persistor->persist(null, $context); 100 return $provider->provide($context); 67 $order = $context->getOrder(); 68 if ($order !== null) { 69 $list = $this->updateBasedOnOrder($list, $order); 70 $this->listCache->cacheList($list); 71 return $this->listCache->getCachedListByLongId($longId); 72 } 73 $customer = $context->getCustomer(); 74 $session = $context->getSession(); 75 $cart = $context->getCart(); 76 $invoiceId = $list->getPayment()->getInvoiceId(); 77 if ($session !== null && $cart !== null && $customer !== null && substr($invoiceId, 0, 4) === 'inv_') { 78 $list = $this->updateBasedOnSession($list, $session, $customer, $cart, $context->offsetExists('pristine')); 79 } 80 } catch (\Throwable $exception) { 81 //TODO Log errors during UPDATE 82 $list = $next->provide($context); 101 83 } 84 $this->listCache->cacheList($list); 85 return $this->listCache->getCachedListByLongId($longId); 102 86 } 103 protected function provideForCheckoutContext(CheckoutContext $context, ListSessionProvider $provider): ListInterface 87 /** 88 * @param ListInterface $list 89 * @param \WC_Order $order 90 * 91 * @return ListInterface 92 * @throws ApiExceptionInterface 93 * @throws CheckoutExceptionInterface 94 * @throws CommandExceptionInterface 95 */ 96 protected function updateBasedOnOrder(ListInterface $list, \WC_Order $order): ListInterface 104 97 { 105 $list = $provider->provide($context); 98 $command = $this->orderBasedUpdateCommandFactory->createUpdateCommand($order, $list); 99 return $this->updateList($command, $list); 100 } 101 /** 102 * @throws \Throwable 103 */ 104 protected function updateBasedOnSession(ListInterface $list, \WC_Session $session, \WC_Customer $customer, \WC_Cart $cart, bool $pristine): ListInterface 105 { 106 106 /** 107 107 * We don't want to update List before this hook. It is fired after cart totals is … … 120 120 * We write the current hash to prevent an unneeded update next time the LIST is requested 121 121 */ 122 if ($ context->offsetExists('list_just_created')) {123 $ context->getSession()->set($this->sessionHashKey, $currentHash);122 if ($pristine) { 123 $session->set($this->sessionHashKey, $currentHash); 124 124 return $list; 125 125 } … … 128 128 * If it has not changed, return the existing LIST 129 129 */ 130 $storedHash = $ context->getSession()->get($this->sessionHashKey);130 $storedHash = $session->get($this->sessionHashKey); 131 131 if ($storedHash === $currentHash) { 132 132 return $list; 133 133 } 134 try { 135 $command = $this->wcBasedListSessionFactory->createUpdateCommand($list->getIdentification(), $context->getCustomer(), $context->getCart()); 136 $updated = $this->updateList($command, $list); 137 } catch (\Throwable $exception) { 138 /** 139 * Clear any stored LIST downstream. The existing one is no longer usable 140 */ 141 $this->persistor->persist(null, $context); 142 /** 143 * Re-run the stack. 144 * With persisted LISTs now cleared, we should get a fresh one from the API 145 */ 146 return $provider->provide($context); 147 } 134 $command = $this->wcBasedListSessionFactory->createUpdateCommand($list->getIdentification(), $customer, $cart); 135 $updated = $this->updateList($command, $list); 148 136 /** 149 137 * Update checkout hash since the LIST has now changed 150 138 */ 151 $context->getSession()->set($this->sessionHashKey, $currentHash); 152 /** 153 * Store the updated LIST 154 */ 155 $this->persistor->persist($updated, $context); 139 $session->set($this->sessionHashKey, $currentHash); 156 140 return $updated; 157 141 } 142 /** 143 * @throws CommandExceptionInterface 144 */ 158 145 protected function updateList(UpdateListCommandInterface $command, ListInterface $list): ListInterface 159 146 { -
payoneer-checkout/trunk/modules/inpsyde/payoneer-payment-gateway-checkout/inc/services.php
r3305047 r3321269 76 76 ), 'checkout.settings.general_settings_fields' => Service::fromFile(__DIR__ . "/general_settings_fields.php"), 'checkout.flow_options' => new Value([]), 'checkout.flow_options_description' => static function (): string { 77 77 return __('Select the payment flow for every transaction.', 'payoneer-checkout'); 78 }, 'checkout.payment_flow_override_flag' => new Value('payoneer_force_hosted_flow'), 'checkout.payment_flow_override_flag.is_set' => new Factory(['checkout.payment_flow_override_flag'], static function (string $forceHostedFlowFlag): bool { 78 }, 'checkout.payment_flow_override_flag' => new Value('payoneer_force_hosted_flow'), 'checkout.payment_flow_override_flag.is_set' => new Factory(['checkout.payment_flow_override_flag', 'wp.is_rest_api_request', 'wc.is_store_api_request'], static function (string $forceHostedFlowFlag, bool $isRestApiRequest, bool $isStoreApiRequest): bool { 79 if ($isRestApiRequest && !$isStoreApiRequest) { 80 /** 81 * This is a REST API request, and it is not from block checkout. Therefore, 82 * there cannot be payment flow override flag. 83 */ 84 return \false; 85 } 79 86 /** 80 87 * Frontend JS decorates fetch() to pass a custom header to all outgoing HTTP calls -
payoneer-checkout/trunk/modules/inpsyde/payoneer-payment-gateway-checkout/src/CheckoutModule.php
r3260742 r3321269 10 10 use Syde\Vendor\Inpsyde\Modularity\Module\ServiceModule; 11 11 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\MisconfigurationDetector\MisconfigurationDetectorInterface; 12 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\CheckoutContext;13 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManager;14 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionPersistor;15 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider;16 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext;17 12 use Syde\Vendor\Psr\Container\ContainerInterface; 18 13 use RuntimeException; … … 55 50 $this->registerCacheSaltUpdating($container); 56 51 $this->setupFiringPaymentCompleteAction($container); 57 $this->registerClearingListIfHppFallbackFlagSet($container);58 $this->registerClearingListOnFailedOrderPayment($container);59 $this->registerMovingListToCreatedOrder($container);60 52 $this->registerAddingLiveModeNotice($container); 61 53 $notificationReceivedOptionName = (string) $container->get('checkout.notification_received.option_name'); … … 88 80 } 89 81 /** 90 * If forcing hosted payment page flow flag is set, this means we are in the embedded payment91 * flow mode, and payment widget wasn't properly set up on the frontend, so we have to switch92 * to the HPP mode on the go. Therefore, we need to remove saved LIST session because it was93 * created for the embedded flow. The new one will be created automatically.94 *95 * @param ContainerInterface $container96 *97 * @return void98 */99 protected function registerClearingListIfHppFallbackFlagSet(ContainerInterface $container): void100 {101 add_action(102 'woocommerce_checkout_order_processed',103 function ($_orderId, $_postedData, $order) use ($container): void {104 if (!$order instanceof WC_Order) {105 return;106 }107 if (!$this->isPayoneerOrderPaymentMethod($container, $order)) {108 return;109 }110 $isForceHppFlagSet = (bool) $container->get('checkout.payment_flow_override_flag.is_set');111 if ($isForceHppFlagSet) {112 $listSessionManager = $container->get('list_session.manager');113 assert($listSessionManager instanceof ListSessionManager);114 $listSessionManager->persist(null, new CheckoutContext());115 }116 },117 9,118 //Clear the List before we will try to move it to the created order119 3120 );121 }122 /**123 * When the API reports an unrecoverable state during processing, it means the LIST124 * session needs to be restarted. Here, we flush the LIST session125 * from any context in such an event126 *127 * @param ContainerInterface $container128 *129 * @return void130 * @throws \Psr\Container\ContainerExceptionInterface131 * @throws \Psr\Container\NotFoundExceptionInterface132 */133 protected function registerClearingListOnFailedOrderPayment(ContainerInterface $container): void134 {135 add_action(136 'payoneer-checkout.payment_processing_failure',137 /** @throws CheckoutExceptionInterface */138 static function (array $args = null) use ($container) {139 $listRemover = $container->get('list_session.manager');140 assert($listRemover instanceof ListSessionManager);141 /**142 * Flush the LIST from the customer session143 */144 $listRemover->persist(null, new CheckoutContext());145 /**146 * Now check if there was already an order passed as context.147 * If yes, flush it from the order as well148 */149 $order = $args['order'] ?? null;150 if (!$order instanceof WC_Order) {151 return;152 }153 $listRemover->persist(null, new PaymentContext($order));154 }155 );156 }157 protected function registerMovingListToCreatedOrder(ContainerInterface $container): void158 {159 add_action('woocommerce_checkout_order_processed', function (160 $_orderId,161 //underscore is for psalm to not complain about unused variable162 $_postedData,163 $order164 ) use ($container): void {165 if (!$order instanceof WC_Order) {166 return;167 }168 if (!$this->isPayoneerOrderPaymentMethod($container, $order)) {169 return;170 }171 $listManager = $container->get('list_session.manager');172 assert($listManager instanceof ListSessionPersistor);173 assert($listManager instanceof ListSessionProvider);174 /**175 * This may look weird, but this is what we want to do. We are getting List with176 * checkout context and saving it with payment context.177 *178 * Since this is a transition moment between session and a new order right before179 * payment processing, this should be ok.180 **/181 $list = $listManager->provide(new CheckoutContext());182 $listManager->persist($list, new PaymentContext($order));183 }, 10, 3);184 }185 /**186 82 * We are not in control of the CHARGE call, but we need the CHARGE longId 187 83 * for refunds via webhooks … … 196 92 * @return void 197 93 */ 198 protected function onThankYouPage(WC_Order $order, ListSessionPersistor $listSessionPersistor, string $metaKey) 199 { 200 /** 201 * Prevent re-using the List inside the WC_Session 202 */ 203 $listSessionPersistor->persist(null, new CheckoutContext()); 94 protected function onThankYouPage(WC_Order $order, string $metaKey) 95 { 204 96 $chargeLongId = filter_input(\INPUT_GET, 'longId', \FILTER_CALLBACK, ['options' => 'sanitize_text_field']); 205 97 if ($chargeLongId && !$order->meta_exists($metaKey)) { … … 286 178 * 287 179 * @param WC_Order $order 288 * @param ListSessionPersistor $listSessionPersistor289 180 * 290 181 * @return void 291 182 */ 292 protected function beforeOrderPay(WC_Order $order , ListSessionPersistor $listSessionPersistor): void183 protected function beforeOrderPay(WC_Order $order): void 293 184 { 294 185 $interactionCode = filter_input(\INPUT_GET, 'interactionCode', \FILTER_CALLBACK, ['options' => 'sanitize_text_field']); … … 323 214 $order->save(); 324 215 } 325 if ($interactionCode === 'ABORT') {326 $listSessionPersistor->persist(null, new PaymentContext($order));327 }328 216 } 329 217 protected function addCustomerNotice(string $interactionReason): void … … 359 247 return; 360 248 } 361 $listSessionManager = $container->get('list_session.manager'); 362 assert($listSessionManager instanceof ListSessionManager); 363 $this->beforeOrderPay($wcOrder, $listSessionManager); 249 $this->beforeOrderPay($wcOrder); 364 250 }, 0); 365 251 add_action('woocommerce_before_thankyou', function (int $orderId) use ($container) { … … 373 259 return; 374 260 } 375 $listSessionManager = $container->get('list_session.manager');376 assert($listSessionManager instanceof ListSessionManager);377 261 $chargeIdFieldName = (string) $container->get('inpsyde_payment_gateway.charge_id_field_name'); 378 $this->onThankYouPage($wcOrder, $ listSessionManager, $chargeIdFieldName);262 $this->onThankYouPage($wcOrder, $chargeIdFieldName); 379 263 }); 380 264 /** -
payoneer-checkout/trunk/modules/inpsyde/payoneer-payment-gateway-checkout/src/PaymentProcessor/AbstractPaymentProcessor.php
r3305047 r3321269 8 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\CheckoutExceptionInterface; 9 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\MisconfigurationDetector\MisconfigurationDetectorInterface; 10 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionPersistor;11 10 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; 12 11 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; … … 31 30 abstract class AbstractPaymentProcessor implements PaymentProcessorInterface 32 31 { 33 /** 34 * @var MisconfigurationDetectorInterface 35 */ 36 protected $misconfigurationDetector; 37 /** 38 * @var ListSessionProvider 39 */ 40 protected $sessionProvider; 41 /** 42 * @var ListSessionPersistor 43 */ 44 protected $sessionPersistor; 45 /** 46 * @var WcOrderBasedUpdateCommandFactoryInterface 47 */ 48 protected $updateCommandFactory; 49 /** 50 * @var string 51 */ 52 protected $transactionIdFieldName; 53 /** 54 * @var TokenGeneratorInterface 55 */ 56 private $tokenGenerator; 57 /** 58 * @var string 59 */ 60 private $tokenKey; 32 protected MisconfigurationDetectorInterface $misconfigurationDetector; 33 protected ListSessionProvider $sessionProvider; 34 protected WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory; 35 protected string $transactionIdFieldName; 36 private TokenGeneratorInterface $tokenGenerator; 37 private string $tokenKey; 61 38 private string $sessionHashKey; 62 39 /** 63 40 * @param MisconfigurationDetectorInterface $misconfigurationDetector 64 41 * @param ListSessionProvider $sessionProvider 65 * @param ListSessionPersistor $sessionPersistor66 42 * @param WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory 67 43 * @param TokenGeneratorInterface $tokenGenerator … … 70 46 * @param string $sessionHashKey 71 47 */ 72 public function __construct(MisconfigurationDetectorInterface $misconfigurationDetector, ListSessionProvider $sessionProvider, ListSessionPersistor $sessionPersistor,WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, TokenGeneratorInterface $tokenGenerator, string $tokenKey, string $transactionIdFieldName, string $sessionHashKey)48 public function __construct(MisconfigurationDetectorInterface $misconfigurationDetector, ListSessionProvider $sessionProvider, WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, TokenGeneratorInterface $tokenGenerator, string $tokenKey, string $transactionIdFieldName, string $sessionHashKey) 73 49 { 74 50 $this->misconfigurationDetector = $misconfigurationDetector; 75 51 $this->sessionProvider = $sessionProvider; 76 $this->sessionPersistor = $sessionPersistor;77 52 $this->updateCommandFactory = $updateCommandFactory; 78 53 $this->tokenGenerator = $tokenGenerator; … … 126 101 protected function updateOrderWithSessionData(WC_Order $order, ListInterface $list): void 127 102 { 128 $this->sessionPersistor->persist($list, new PaymentContext($order));129 103 $identification = $list->getIdentification(); 130 104 $transactionId = $identification->getTransactionId(); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-payment-methods/inc/services.php
r3305047 r3321269 145 145 return $settingsPageDescription; 146 146 }), 147 'payment_methods.availability_callback.checkout_predicate' => static function (ContainerInterface $container): callable { 148 return static function () use ($container): bool { 149 return (bool) $container->get('list_session.can_try_create_list'); 150 }; 151 }, 147 //todo: think about moving this to factories 148 'payment_methods.availability_callback.checkout_predicate' => new Alias('list_session.can_try_create_list.callable'), 152 149 'payment_methods.availability_callback.live_mode' => new Constructor(LiveModeAvailabilityCallback::class, ['payment_methods.is_live_mode', 'wc.admin_permission', 'payment_methods.show_payment_widget_to_customers_in_sandbox_mode']), 153 150 'payment_methods.payoneer-hosted.availability_callback' => new Factory(['payment_methods.availability_callback.live_mode', 'list_session.manager', 'embedded_payment.ajax_order_pay.is_ajax_order_pay', 'payment_methods.availability_callback.checkout_predicate'], static function (AvailabilityCallbackInterface $liveModeCallback, ListSessionManager $listSessionManager, bool $isAjaxOrderPay, callable $checkoutPredicate): AvailabilityCallbackInterface { … … 182 179 'payment_methods.transaction_url_template_field_name' => new Value('_transaction_url_template'), 183 180 'payment_gateway.payoneer-hosted.payment_processor' => new Factory(['list_session.manager', 'payment_methods.order.transaction_id_field_name', 'hosted_payment.misconfiguration_detector', 'hosted_payment.order_based_update_command_factory', 'checkout.security_token_generator', 'checkout.order.security_header_field_name', 'hosted_payment.payment_flow_override_flag.is_set', 'checkout.session_hash_key'], static function (ListSessionManager $listSessionManager, string $transactionIdFieldName, MisconfigurationDetectorInterface $misconfigurationDetector, WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, TokenGeneratorInterface $tokenGenerator, string $tokenKey, bool $fallbackToHostedModeFlag, string $sessionHashKey): PaymentProcessorInterface { 184 return new HostedPaymentProcessor($ listSessionManager, $transactionIdFieldName, $misconfigurationDetector, $listSessionManager, $updateCommandFactory, $tokenGenerator, $tokenKey, $fallbackToHostedModeFlag, $sessionHashKey);181 return new HostedPaymentProcessor($transactionIdFieldName, $misconfigurationDetector, $listSessionManager, $updateCommandFactory, $tokenGenerator, $tokenKey, $fallbackToHostedModeFlag, $sessionHashKey); 185 182 }), 186 183 'payment_gateway.payoneer-checkout.payment_processor' => new Factory(['inpsyde_payoneer_api.update_command_factory', 'list_session.manager', 'payment_methods.order.transaction_id_field_name', 'checkout.payment_flow_override_flag', 'embedded_payment.misconfiguration_detector', 'checkout.security_token_generator', 'checkout.order.security_header_field_name', 'checkout.session_hash_key', 'wp.is_rest_api_request'], static function (WcOrderBasedUpdateCommandFactoryInterface $updateCommandFactory, ListSessionManager $listSessionManager, string $transactionIdFieldName, string $hostedModeOverrideFlag, MisconfigurationDetectorInterface $misconfigurationDetector, TokenGeneratorInterface $tokenGenerator, string $tokenKey, string $sessionHashKey, bool $isRestRequest): PaymentProcessorInterface { 187 return new EmbeddedPaymentProcessor($updateCommandFactory, $listSessionManager, $ listSessionManager, $tokenGenerator, $tokenKey, $transactionIdFieldName, $hostedModeOverrideFlag, $misconfigurationDetector, $sessionHashKey, $isRestRequest);184 return new EmbeddedPaymentProcessor($updateCommandFactory, $listSessionManager, $tokenGenerator, $tokenKey, $transactionIdFieldName, $hostedModeOverrideFlag, $misconfigurationDetector, $sessionHashKey, $isRestRequest); 188 185 }), 189 186 'payment_gateway.payoneer-afterpay.payment_processor' => new Alias('payment_gateway.payoneer-checkout.payment_processor'), 190 'payment_gateway.payoneer-checkout.refund_processor' => new Constructor(RefundProcessor::class, ['inpsyde_payment_gateway.payoneer', ' list_session.manager', 'inpsyde_payment_gateway.payment_factory', 'inpsyde_payment_gateway.charge_id_field_name', 'payment_methods.payout_id_field_name', 'payment_methods.refund_reason_suffix_template', 'payment_gateways']),187 'payment_gateway.payoneer-checkout.refund_processor' => new Constructor(RefundProcessor::class, ['inpsyde_payment_gateway.payoneer', 'inpsyde_payment_gateway.transaction_id_field_name', 'inpsyde_payment_gateway.payment_factory', 'inpsyde_payment_gateway.charge_id_field_name', 'payment_methods.payout_id_field_name', 'payment_methods.refund_reason_suffix_template', 'payment_gateways']), 191 188 'payment_gateway.payoneer-hosted.refund_processor' => new Alias('payment_gateway.payoneer-checkout.refund_processor'), 192 189 'payment_gateway.payoneer-afterpay.refund_processor' => new Alias('payment_gateway.payoneer-checkout.refund_processor'), … … 210 207 return new DefaultIconsRenderer($iconProvider); 211 208 }), 212 'payment_methods.icon_provider_factory' => new Constructor(IconProviderFactory::class, ['core.main_plugin_file', 'payment_methods.path.assets', 'list_session.can_try_create_list ', 'list_session.manager', 'payment_methods.network_icon_map']),209 'payment_methods.icon_provider_factory' => new Constructor(IconProviderFactory::class, ['core.main_plugin_file', 'payment_methods.path.assets', 'list_session.can_try_create_list.callable', 'list_session.manager', 'payment_methods.network_icon_map']), 213 210 'payment_gateway.payoneer-hosted.method_icon_provider' => new Factory(['payment_methods.icon_provider_factory', 'payment_methods.payoneer-hosted.default_icons'], static function (IconProviderFactory $iconProviderFactory, array $defaultIcons): IconProviderInterface { 214 211 return $iconProviderFactory->create($defaultIcons); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-payment-methods/src/AvailabilityCallback/ListConditionAvailabilityCallback.php
r3111876 r3321269 6 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\EmbeddedPayment\AjaxOrderPay\OrderPayload; 7 7 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManager; 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; 8 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\PaymentMethods\ListCondition\ListConditionInterface; 9 10 use WC_Payment_Gateway; … … 27 28 $order = $orderPayload->getOrder(); 28 29 } 29 $listSession = $this->listSessionManager->provide( ListSessionManager::determineContextFromGlobals($order));30 $listSession = $this->listSessionManager->provide(new PaymentContext($order)); 30 31 } catch (\Throwable $exception) { 31 32 return \false; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-payment-methods/src/GatewayIconsRenderer/DynamicIconProvider.php
r3260742 r3321269 6 6 use Syde\Vendor\Inpsyde\PaymentGateway\Icon; 7 7 use Syde\Vendor\Inpsyde\PaymentGateway\IconProviderInterface; 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionManager;9 8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider; 9 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext; 10 10 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ListSession\ListInterface; 11 11 /** … … 20 20 { 21 21 protected ListSessionProvider $listSessionProvider; 22 /** @var array<string, string> $networkMap */22 /** @var array<string, string> $networkMap */ 23 23 protected array $networkMap; 24 24 protected IconProviderInterface $default; … … 73 73 private function getList(): ListInterface 74 74 { 75 return $this->listSessionProvider->provide( ListSessionManager::determineContextFromGlobals());75 return $this->listSessionProvider->provide(new PaymentContext()); 76 76 } 77 77 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-payment-methods/src/GatewayIconsRenderer/IconProviderFactory.php
r3305047 r3321269 12 12 protected string $mainPluginFile; 13 13 protected string $assetPath; 14 protected bool $canTryCreateList; 14 /** @var callable */ 15 protected $canTryCreateList; 15 16 protected ListSessionProvider $listSessionProvider; 16 17 /** @var array<string, string> */ … … 19 20 * @param array<string, string> $networkMap 20 21 */ 21 public function __construct(string $mainPluginFile, string $assetPath, bool$canTryCreateList, ListSessionProvider $listSessionProvider, array $networkMap)22 public function __construct(string $mainPluginFile, string $assetPath, callable $canTryCreateList, ListSessionProvider $listSessionProvider, array $networkMap) 22 23 { 23 24 $this->mainPluginFile = $mainPluginFile; … … 36 37 * If it is safe to boot a LIST, we can inspect real data 37 38 */ 38 if (! $this->canTryCreateList) {39 if (!($this->canTryCreateList)()) { 39 40 return $defaultIconProvider; 40 41 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-payment-methods/src/RefundProcessor.php
r3114998 r3321269 5 5 6 6 use Exception; 7 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\ListSessionProvider;8 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\ListSession\ListSession\PaymentContext;9 7 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\ApiExceptionInterface; 10 8 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Command\PayoutCommandInterface; … … 18 16 class RefundProcessor implements RefundProcessorInterface 19 17 { 20 /** 21 * @var ListSessionProvider 22 */ 23 protected $listSessionProvider; 24 /** 25 * @var PaymentFactoryInterface 26 */ 27 protected $paymentFactory; 28 /** 29 * @var PayoneerInterface 30 */ 31 protected $payoneer; 32 /** 33 * @var string 34 */ 35 protected $chargeIdFieldName; 18 protected string $transactionIdFieldName; 19 protected PaymentFactoryInterface $paymentFactory; 20 protected PayoneerInterface $payoneer; 21 protected string $chargeIdFieldName; 36 22 protected string $payoutIdFieldName; 37 23 protected string $refundReasonSuffixTemplate; … … 39 25 /** 40 26 * @param PayoneerInterface $payoneer 41 * @param ListSessionProvider $listSessionProvider27 * @param string $transactionIdFieldName 42 28 * @param PaymentFactoryInterface $paymentFactory 43 29 * @param string $chargeIdFieldName … … 45 31 * @param string $refundReasonSuffixTemplate 46 32 */ 47 public function __construct(PayoneerInterface $payoneer, ListSessionProvider $listSessionProvider, PaymentFactoryInterface $paymentFactory, string $chargeIdFieldName, string $payoutIdFieldName, string $refundReasonSuffixTemplate, array $payoneerPaymentGatewaysIds)33 public function __construct(PayoneerInterface $payoneer, string $transactionIdFieldName, PaymentFactoryInterface $paymentFactory, string $chargeIdFieldName, string $payoutIdFieldName, string $refundReasonSuffixTemplate, array $payoneerPaymentGatewaysIds) 48 34 { 49 35 $this->payoneer = $payoneer; 50 $this-> listSessionProvider = $listSessionProvider;36 $this->transactionIdFieldName = $transactionIdFieldName; 51 37 $this->paymentFactory = $paymentFactory; 52 38 $this->chargeIdFieldName = $chargeIdFieldName; … … 83 69 protected function configurePayoutCommand(WC_Order $order, float $amount, string $reason): PayoutCommandInterface 84 70 { 85 try { 86 $listSession = $this->listSessionProvider->provide(new PaymentContext($order)); 87 } catch (RuntimeException $exception) { 88 throw new InvalidArgumentException('Failed to process refund: order has no associated LIST session.', 0, $exception); 89 } 90 $transactionId = $listSession->getIdentification()->getTransactionId(); 71 $transactionId = (string) $order->get_meta($this->transactionIdFieldName, \true); 91 72 try { 92 73 $payment = $this->paymentFactory->createPayment($reason, $amount, 0, $amount, $order->get_currency(), $order->get_order_number()); … … 107 88 * 108 89 * @return void 90 * @throws \WC_Data_Exception 109 91 */ 110 92 protected function setupSavingPayoutData(string $payoutLongId): void -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/LICENSE
r2933494 r3321269 1 Copyright (c) 2021 Inpsyde GmbH 2 3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 7 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 1 GNU GENERAL PUBLIC LICENSE 2 Version 2, June 1991 3 4 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 Everyone is permitted to copy and distribute verbatim copies 7 of this license document, but changing it is not allowed. 8 9 Preamble 10 11 The licenses for most software are designed to take away your 12 freedom to share and change it. By contrast, the GNU General Public 13 License is intended to guarantee your freedom to share and change free 14 software--to make sure the software is free for all its users. This 15 General Public License applies to most of the Free Software 16 Foundation's software and to any other program whose authors commit to 17 using it. (Some other Free Software Foundation software is covered by 18 the GNU Lesser General Public License instead.) You can apply it to 19 your programs, too. 20 21 When we speak of free software, we are referring to freedom, not 22 price. Our General Public Licenses are designed to make sure that you 23 have the freedom to distribute copies of free software (and charge for 24 this service if you wish), that you receive source code or can get it 25 if you want it, that you can change the software or use pieces of it 26 in new free programs; and that you know you can do these things. 27 28 To protect your rights, we need to make restrictions that forbid 29 anyone to deny you these rights or to ask you to surrender the rights. 30 These restrictions translate to certain responsibilities for you if you 31 distribute copies of the software, or if you modify it. 32 33 For example, if you distribute copies of such a program, whether 34 gratis or for a fee, you must give the recipients all the rights that 35 you have. You must make sure that they, too, receive or can get the 36 source code. And you must show them these terms so they know their 37 rights. 38 39 We protect your rights with two steps: (1) copyright the software, and 40 (2) offer you this license which gives you legal permission to copy, 41 distribute and/or modify the software. 42 43 Also, for each author's protection and ours, we want to make certain 44 that everyone understands that there is no warranty for this free 45 software. If the software is modified by someone else and passed on, we 46 want its recipients to know that what they have is not the original, so 47 that any problems introduced by others will not reflect on the original 48 authors' reputations. 49 50 Finally, any free program is threatened constantly by software 51 patents. We wish to avoid the danger that redistributors of a free 52 program will individually obtain patent licenses, in effect making the 53 program proprietary. To prevent this, we have made it clear that any 54 patent must be licensed for everyone's free use or not licensed at all. 55 56 The precise terms and conditions for copying, distribution and 57 modification follow. 58 59 GNU GENERAL PUBLIC LICENSE 60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 62 0. This License applies to any program or other work which contains 63 a notice placed by the copyright holder saying it may be distributed 64 under the terms of this General Public License. The "Program", below, 65 refers to any such program or work, and a "work based on the Program" 66 means either the Program or any derivative work under copyright law: 67 that is to say, a work containing the Program or a portion of it, 68 either verbatim or with modifications and/or translated into another 69 language. (Hereinafter, translation is included without limitation in 70 the term "modification".) Each licensee is addressed as "you". 71 72 Activities other than copying, distribution and modification are not 73 covered by this License; they are outside its scope. The act of 74 running the Program is not restricted, and the output from the Program 75 is covered only if its contents constitute a work based on the 76 Program (independent of having been made by running the Program). 77 Whether that is true depends on what the Program does. 78 79 1. You may copy and distribute verbatim copies of the Program's 80 source code as you receive it, in any medium, provided that you 81 conspicuously and appropriately publish on each copy an appropriate 82 copyright notice and disclaimer of warranty; keep intact all the 83 notices that refer to this License and to the absence of any warranty; 84 and give any other recipients of the Program a copy of this License 85 along with the Program. 86 87 You may charge a fee for the physical act of transferring a copy, and 88 you may at your option offer warranty protection in exchange for a fee. 89 90 2. You may modify your copy or copies of the Program or any portion 91 of it, thus forming a work based on the Program, and copy and 92 distribute such modifications or work under the terms of Section 1 93 above, provided that you also meet all of these conditions: 94 95 a) You must cause the modified files to carry prominent notices 96 stating that you changed the files and the date of any change. 97 98 b) You must cause any work that you distribute or publish, that in 99 whole or in part contains or is derived from the Program or any 100 part thereof, to be licensed as a whole at no charge to all third 101 parties under the terms of this License. 102 103 c) If the modified program normally reads commands interactively 104 when run, you must cause it, when started running for such 105 interactive use in the most ordinary way, to print or display an 106 announcement including an appropriate copyright notice and a 107 notice that there is no warranty (or else, saying that you provide 108 a warranty) and that users may redistribute the program under 109 these conditions, and telling the user how to view a copy of this 110 License. (Exception: if the Program itself is interactive but 111 does not normally print such an announcement, your work based on 112 the Program is not required to print an announcement.) 113 114 These requirements apply to the modified work as a whole. If 115 identifiable sections of that work are not derived from the Program, 116 and can be reasonably considered independent and separate works in 117 themselves, then this License, and its terms, do not apply to those 118 sections when you distribute them as separate works. But when you 119 distribute the same sections as part of a whole which is a work based 120 on the Program, the distribution of the whole must be on the terms of 121 this License, whose permissions for other licensees extend to the 122 entire whole, and thus to each and every part regardless of who wrote it. 123 124 Thus, it is not the intent of this section to claim rights or contest 125 your rights to work written entirely by you; rather, the intent is to 126 exercise the right to control the distribution of derivative or 127 collective works based on the Program. 128 129 In addition, mere aggregation of another work not based on the Program 130 with the Program (or with a work based on the Program) on a volume of 131 a storage or distribution medium does not bring the other work under 132 the scope of this License. 133 134 3. You may copy and distribute the Program (or a work based on it, 135 under Section 2) in object code or executable form under the terms of 136 Sections 1 and 2 above provided that you also do one of the following: 137 138 a) Accompany it with the complete corresponding machine-readable 139 source code, which must be distributed under the terms of Sections 140 1 and 2 above on a medium customarily used for software interchange; or, 141 142 b) Accompany it with a written offer, valid for at least three 143 years, to give any third party, for a charge no more than your 144 cost of physically performing source distribution, a complete 145 machine-readable copy of the corresponding source code, to be 146 distributed under the terms of Sections 1 and 2 above on a medium 147 customarily used for software interchange; or, 148 149 c) Accompany it with the information you received as to the offer 150 to distribute corresponding source code. (This alternative is 151 allowed only for noncommercial distribution and only if you 152 received the program in object code or executable form with such 153 an offer, in accord with Subsection b above.) 154 155 The source code for a work means the preferred form of the work for 156 making modifications to it. For an executable work, complete source 157 code means all the source code for all modules it contains, plus any 158 associated interface definition files, plus the scripts used to 159 control compilation and installation of the executable. However, as a 160 special exception, the source code distributed need not include 161 anything that is normally distributed (in either source or binary 162 form) with the major components (compiler, kernel, and so on) of the 163 operating system on which the executable runs, unless that component 164 itself accompanies the executable. 165 166 If distribution of executable or object code is made by offering 167 access to copy from a designated place, then offering equivalent 168 access to copy the source code from the same place counts as 169 distribution of the source code, even though third parties are not 170 compelled to copy the source along with the object code. 171 172 4. You may not copy, modify, sublicense, or distribute the Program 173 except as expressly provided under this License. Any attempt 174 otherwise to copy, modify, sublicense or distribute the Program is 175 void, and will automatically terminate your rights under this License. 176 However, parties who have received copies, or rights, from you under 177 this License will not have their licenses terminated so long as such 178 parties remain in full compliance. 179 180 5. You are not required to accept this License, since you have not 181 signed it. However, nothing else grants you permission to modify or 182 distribute the Program or its derivative works. These actions are 183 prohibited by law if you do not accept this License. Therefore, by 184 modifying or distributing the Program (or any work based on the 185 Program), you indicate your acceptance of this License to do so, and 186 all its terms and conditions for copying, distributing or modifying 187 the Program or works based on it. 188 189 6. Each time you redistribute the Program (or any work based on the 190 Program), the recipient automatically receives a license from the 191 original licensor to copy, distribute or modify the Program subject to 192 these terms and conditions. You may not impose any further 193 restrictions on the recipients' exercise of the rights granted herein. 194 You are not responsible for enforcing compliance by third parties to 195 this License. 196 197 7. If, as a consequence of a court judgment or allegation of patent 198 infringement or for any other reason (not limited to patent issues), 199 conditions are imposed on you (whether by court order, agreement or 200 otherwise) that contradict the conditions of this License, they do not 201 excuse you from the conditions of this License. If you cannot 202 distribute so as to satisfy simultaneously your obligations under this 203 License and any other pertinent obligations, then as a consequence you 204 may not distribute the Program at all. For example, if a patent 205 license would not permit royalty-free redistribution of the Program by 206 all those who receive copies directly or indirectly through you, then 207 the only way you could satisfy both it and this License would be to 208 refrain entirely from distribution of the Program. 209 210 If any portion of this section is held invalid or unenforceable under 211 any particular circumstance, the balance of the section is intended to 212 apply and the section as a whole is intended to apply in other 213 circumstances. 214 215 It is not the purpose of this section to induce you to infringe any 216 patents or other property right claims or to contest validity of any 217 such claims; this section has the sole purpose of protecting the 218 integrity of the free software distribution system, which is 219 implemented by public license practices. Many people have made 220 generous contributions to the wide range of software distributed 221 through that system in reliance on consistent application of that 222 system; it is up to the author/donor to decide if he or she is willing 223 to distribute software through any other system and a licensee cannot 224 impose that choice. 225 226 This section is intended to make thoroughly clear what is believed to 227 be a consequence of the rest of this License. 228 229 8. If the distribution and/or use of the Program is restricted in 230 certain countries either by patents or by copyrighted interfaces, the 231 original copyright holder who places the Program under this License 232 may add an explicit geographical distribution limitation excluding 233 those countries, so that distribution is permitted only in or among 234 countries not thus excluded. In such case, this License incorporates 235 the limitation as if written in the body of this License. 236 237 9. The Free Software Foundation may publish revised and/or new versions 238 of the General Public License from time to time. Such new versions will 239 be similar in spirit to the present version, but may differ in detail to 240 address new problems or concerns. 241 242 Each version is given a distinguishing version number. If the Program 243 specifies a version number of this License which applies to it and "any 244 later version", you have the option of following the terms and conditions 245 either of that version or of any later version published by the Free 246 Software Foundation. If the Program does not specify a version number of 247 this License, you may choose any version ever published by the Free Software 248 Foundation. 249 250 10. If you wish to incorporate parts of the Program into other free 251 programs whose distribution conditions are different, write to the author 252 to ask for permission. For software which is copyrighted by the Free 253 Software Foundation, write to the Free Software Foundation; we sometimes 254 make exceptions for this. Our decision will be guided by the two goals 255 of preserving the free status of all derivatives of our free software and 256 of promoting the sharing and reuse of software generally. 257 258 NO WARRANTY 259 260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 REPAIR OR CORRECTION. 269 270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 POSSIBILITY OF SUCH DAMAGES. 279 280 END OF TERMS AND CONDITIONS 281 282 How to Apply These Terms to Your New Programs 283 284 If you develop a new program, and you want it to be of the greatest 285 possible use to the public, the best way to achieve this is to make it 286 free software which everyone can redistribute and change under these terms. 287 288 To do so, attach the following notices to the program. It is safest 289 to attach them to the start of each source file to most effectively 290 convey the exclusion of warranty; and each file should have at least 291 the "copyright" line and a pointer to where the full notice is found. 292 293 <one line to give the program's name and a brief idea of what it does.> 294 Copyright (C) <year> <name of author> 295 296 This program is free software; you can redistribute it and/or modify 297 it under the terms of the GNU General Public License as published by 298 the Free Software Foundation; either version 2 of the License, or 299 (at your option) any later version. 300 301 This program is distributed in the hope that it will be useful, 302 but WITHOUT ANY WARRANTY; without even the implied warranty of 303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 GNU General Public License for more details. 305 306 You should have received a copy of the GNU General Public License along 307 with this program; if not, write to the Free Software Foundation, Inc., 308 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 310 Also add information on how to contact you by electronic and paper mail. 311 312 If the program is interactive, make it output a short notice like this 313 when it starts in an interactive mode: 314 315 Gnomovision version 69, Copyright (C) year name of author 316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 This is free software, and you are welcome to redistribute it 318 under certain conditions; type `show c' for details. 319 320 The hypothetical commands `show w' and `show c' should show the appropriate 321 parts of the General Public License. Of course, the commands you use may 322 be called something other than `show w' and `show c'; they could even be 323 mouse-clicks or menu items--whatever suits your program. 324 325 You should also get your employer (if you work as a programmer) or your 326 school, if any, to sign a "copyright disclaimer" for the program, if 327 necessary. Here is a sample; alter the names: 328 329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 332 <signature of Ty Coon>, 1 April 1989 333 Ty Coon, President of Vice 334 335 This General Public License does not permit incorporating your program into 336 proprietary programs. If your program is a subroutine library, you may 337 consider it more useful to permit linking proprietary applications with the 338 library. If this is what you want to do, use the GNU Lesser General 339 Public License instead of this License. -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/README.md
r2801406 r3321269 46 46 e.g. `docker-compose run --rm test vendor/bin/phpunit` instead of `make test`. 47 47 48 ## C rafted by Inpsyde48 ## Copyright and License 49 49 50 The team at [Inpsyde][] is engineering the Web since 2006. 51 52 ## License 53 54 This module is provided under the [MIT](https://opensource.org/licenses/MIT) license. 55 50 This package is [free software](https://www.gnu.org/philosophy/free-sw.en.html) distributed under the terms of the GNU General Public License version 2 or (at your option) any later version. For the full license, see [LICENSE](./LICENSE). 56 51 57 52 ## Contributing … … 64 59 [PSR-17(HTTP Factory)]: https://packagist.org/providers/psr/http-factory-implementation 65 60 [PSR-18(HTTP Client)]: https://packagist.org/providers/psr/http-client-implementation 66 [ Inpsyde]: https://inpsyde.com61 [Syde]: https://syde.com -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/inc/services.php
r3260742 r3321269 82 82 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Phone\PhoneSerializer; 83 83 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Phone\PhoneSerializerInterface; 84 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelDeserializer;85 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelDeserializerInterface;86 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelFactory;87 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelFactoryInterface;88 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelSerializer;89 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelSerializerInterface;90 84 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Product\ProductDeserializer; 91 85 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Product\ProductDeserializerInterface; … … 210 204 }, 'payoneer_sdk.registration_factory' => static function (): RegistrationFactoryInterface { 211 205 return new RegistrationFactory(); 212 }, 'payoneer_sdk.processing_model_factory' => static function (): ProcessingModelFactoryInterface {213 return new ProcessingModelFactory();214 206 }, 'payoneer_sdk.networks_factory' => static function (): NetworksFactoryInterface { 215 207 return new NetworksFactory(); … … 300 292 /** @var ProductDeserializerInterface $productDeserializer */ 301 293 $productDeserializer = $container->get('payoneer_sdk.product_deserializer'); 302 /** @var ProcessingModelDeserializerInterface $processingModelDeserializer */303 $processingModelDeserializer = $container->get('payoneer_sdk.processing_model_deserializer');304 294 /** @var NetworksDeserializer $networksDeserializer */ 305 295 $networksDeserializer = $container->get('payoneer_sdk.networks_deserializer'); 306 return new ListDeserializer($listFactory, $callbackDeserializer, $customerDeserializer, $paymentDeserializer, $statusDeserializer, $redirectDeserializer, $identificationDeserializer, $styleDeserializer, $productDeserializer, $ processingModelDeserializer, $networksDeserializer);296 return new ListDeserializer($listFactory, $callbackDeserializer, $customerDeserializer, $paymentDeserializer, $statusDeserializer, $redirectDeserializer, $identificationDeserializer, $styleDeserializer, $productDeserializer, $networksDeserializer); 307 297 }, 'payoneer_sdk.redirect_deserializer' => static function (ContainerInterface $container): RedirectDeserializerInterface { 308 298 $redirectFactory = $container->get('payoneer_sdk.redirect_factory'); … … 323 313 /** @var PhoneSerializerInterface */ 324 314 return new CustomerSerializer($phoneSerializer, $addressSerializer, $registrationSerializer, $nameSerializer); 325 }, 'payoneer_sdk.processing_model_deserializer' => static function (ContainerInterface $container): ProcessingModelDeserializerInterface {326 /** @var ProcessingModelFactoryInterface $processingModelFactory */327 $processingModelFactory = $container->get('payoneer_sdk.processing_model_factory');328 return new ProcessingModelDeserializer($processingModelFactory);329 315 }, 'payoneer_sdk.identification_serializer' => static function (): IdentificationSerializerInterface { 330 316 return new IdentificationSerializer(); … … 370 356 /** @var ProductSerializerInterface $productSerializer */ 371 357 $productSerializer = $container->get('payoneer_sdk.product_serializer'); 372 /** @var ProcessingModelSerializerInterface $processingModelSerializer */373 $processingModelSerializer = $container->get('payoneer_sdk.processing_model_serializer');374 358 /** @var NetworksSerializer $networksSerializer */ 375 359 $networksSerializer = $container->get('payoneer_sdk.networks_serializer'); 376 return new ListSerializer($identificationSerializer, $paymentSerializer, $statusSerializer, $customerSerializer, $styleSerializer, $redirectSerializer, $productSerializer, $ processingModelSerializer, $networksSerializer);360 return new ListSerializer($identificationSerializer, $paymentSerializer, $statusSerializer, $customerSerializer, $styleSerializer, $redirectSerializer, $productSerializer, $networksSerializer); 377 361 }, 'payoneer_sdk.commands.update_request_path_template' => static function (): string { 378 362 return 'lists/%1$s'; … … 397 381 $validator = new InteractionCodeValidator($errorCodes); 398 382 return $validator; 399 }, 'payoneer_sdk.processing_model_serializer' => static function (): ProcessingModelSerializerInterface {400 return new ProcessingModelSerializer();401 383 }, 'payoneer_sdk.default_country' => static function (): string { 402 384 return 'US'; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/Customer.php
r3111876 r3321269 14 14 * Customer identifier given by merchant. 15 15 * 16 * @var string 16 * @var string|null 17 17 */ 18 18 protected $number; … … 56 56 * @param NameInterface|null $name Object containing customer name. 57 57 */ 58 public function __construct(string $number , array $phones = null, array $addresses = null, string $email = null, string $deliveryEmail = null, RegistrationInterface $registration = null, NameInterface $name = null)58 public function __construct(string $number = null, array $phones = null, array $addresses = null, string $email = null, string $deliveryEmail = null, RegistrationInterface $registration = null, NameInterface $name = null) 59 59 { 60 60 $this->number = $number; … … 71 71 public function getNumber(): string 72 72 { 73 if ($this->number === null) { 74 throw new ApiException('number field is not set'); 75 } 73 76 return $this->number; 74 77 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerDeserializer.php
r3111876 r3321269 51 51 public function deserializeCustomer(array $customerData): CustomerInterface 52 52 { 53 if (!isset($customerData['number'])) { 54 throw new ApiException('Data contains no expected number element.'); 55 } 56 $number = $customerData['number']; 53 $number = $customerData['number'] ?? null; 57 54 if (isset($customerData['phones'])) { 58 55 $phonesData = $customerData['phones']; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerDeserializerInterface.php
r3111876 r3321269 12 12 /** 13 13 * @param array { 14 * number : string,14 * number?: string, 15 15 * phones?: array { 16 16 * mobile: array { -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerFactory.php
r3111876 r3321269 11 11 * @inheritDoc 12 12 */ 13 public function createCustomer(string $number , array $phones = null, array $addresses = null, string $email = null, string $deliveryEmail = null, RegistrationInterface $registration = null, NameInterface $name = null): CustomerInterface13 public function createCustomer(string $number = null, array $phones = null, array $addresses = null, string $email = null, string $deliveryEmail = null, RegistrationInterface $registration = null, NameInterface $name = null): CustomerInterface 14 14 { 15 15 return new Customer($number, $phones, $addresses, $email, $deliveryEmail, $registration, $name); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerFactoryInterface.php
r3111876 r3321269 17 17 * Create a new Customer instance. 18 18 * 19 * @param string $number Customer identifier provided by merchant.19 * @param string|null $number Customer identifier provided by merchant. 20 20 * @param array{mobile: PhoneInterface}|null $phones Map of customer phones. 21 21 * @param array{billing: AddressInterface, shipping?: AddressInterface}|null $addresses Addresses. … … 29 29 * @throws ApiExceptionInterface If failed to create customer object. 30 30 */ 31 public function createCustomer(string $number , array $phones = null, array $addresses = null, string $email = null, string $deliveryEmail = null, RegistrationInterface $registration = null, NameInterface $name = null): CustomerInterface;31 public function createCustomer(string $number = null, array $phones = null, array $addresses = null, string $email = null, string $deliveryEmail = null, RegistrationInterface $registration = null, NameInterface $name = null): CustomerInterface; 32 32 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerInterface.php
r3111876 r3321269 15 15 /** 16 16 * @return string Customer identifier given by merchant. 17 * 18 * @throws ApiExceptionInterface If this field not set. 17 19 */ 18 20 public function getNumber(): string; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerSerializer.php
r3111876 r3321269 43 43 /** 44 44 * @inheritDoc 45 * 46 * @todo: consider refactoring 45 47 */ 48 // phpcs:ignore Inpsyde.CodeQuality.FunctionLength.TooLong 46 49 public function serializeCustomer(CustomerInterface $customer): array 47 50 { 48 $serializedCustomer = ['number' => $customer->getNumber()]; 51 $serializedCustomer = []; 52 try { 53 $serializedCustomer['number'] = $customer->getNumber(); 54 } catch (ApiExceptionInterface $apiException) { 55 //this is an optional field, so it's ok to not have it 56 } 49 57 try { 50 58 $customerPhones = $customer->getPhones(); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/Customer/CustomerSerializerInterface.php
r3111876 r3321269 15 15 * 16 16 * @return array { 17 * number : string,17 * number?: string, 18 18 * phones?: array{mobile: array{unstructuredNumber: string}}, 19 19 * addresses?: array{billing: AddressInterface, shipping?: AddressInterface}, -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListDeserializer.php
r3111876 r3321269 10 10 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Network\NetworksDeserializerInterface; 11 11 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Payment\PaymentDeserializerInterface; 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelDeserializerInterface;13 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Product\ProductDeserializerInterface; 14 13 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Redirect\RedirectDeserializerInterface; … … 54 53 protected $productDeserializer; 55 54 /** 56 * @var ProcessingModelDeserializerInterface57 */58 protected $processingModelDeserializer;59 /**60 55 * @var NetworksDeserializerInterface 61 56 */ … … 71 66 * @param StyleDeserializerInterface $styleDeserializer To create style instance from data map. 72 67 * @param ProductDeserializerInterface $productDeserializer To create product instances. 73 * @param ProcessingModelDeserializerInterface $processingModelDeserializer To create processing model instance from74 * data map.75 68 */ 76 public function __construct(ListFactoryInterface $listFactory, CallbackDeserializerInterface $callbackDeserializer, CustomerDeserializerInterface $customerDeserializer, PaymentDeserializerInterface $paymentDeserializer, StatusDeserializerInterface $statusDeserializer, RedirectDeserializerInterface $redirectDeserializer, IdentificationDeserializerInterface $identificationDeserializer, StyleDeserializerInterface $styleDeserializer, ProductDeserializerInterface $productDeserializer, ProcessingModelDeserializerInterface $processingModelDeserializer,NetworksDeserializerInterface $networksDeserializer)69 public function __construct(ListFactoryInterface $listFactory, CallbackDeserializerInterface $callbackDeserializer, CustomerDeserializerInterface $customerDeserializer, PaymentDeserializerInterface $paymentDeserializer, StatusDeserializerInterface $statusDeserializer, RedirectDeserializerInterface $redirectDeserializer, IdentificationDeserializerInterface $identificationDeserializer, StyleDeserializerInterface $styleDeserializer, ProductDeserializerInterface $productDeserializer, NetworksDeserializerInterface $networksDeserializer) 77 70 { 78 71 $this->listFactory = $listFactory; … … 85 78 $this->redirectDeserializer = $redirectDeserializer; 86 79 $this->productDeserializer = $productDeserializer; 87 $this->processingModelDeserializer = $processingModelDeserializer;88 80 $this->networksDeserializer = $networksDeserializer; 89 81 } … … 111 103 $redirect = isset($listData['redirect']) ? $this->redirectDeserializer->deserializeRedirect($listData['redirect']) : null; 112 104 $division = $listData['division'] ?? null; 113 $processingModel = isset($listData['processingModel']) ? $this->processingModelDeserializer->deserializeProcessingModel($listData['processingModel']) : null;114 105 $networks = isset($listData['networks']) ? $this->networksDeserializer->deserializeNetworks($listData['networks']) : null; 115 106 $products = array_map(function (array $productData) { 116 107 return $this->productDeserializer->deserializeProduct($productData); 117 108 }, $listData['products'] ?? []); 118 return $this->listFactory->createList($links, $identification, $status, $payment, $customer, $style, $redirect, $division, $products, $ processingModel, $networks);109 return $this->listFactory->createList($links, $identification, $status, $payment, $customer, $style, $redirect, $division, $products, $networks); 119 110 } 120 111 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListDeserializerInterface.php
r3111876 r3321269 45 45 * taxCode?: string, 46 46 * }[], 47 * division?: string, 48 * processingModel?: array{ 49 * code: string, 50 * type: string 51 * } 47 * division?: string 52 48 * } $listData 53 49 * -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListFactory.php
r3111876 r3321269 8 8 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Network\NetworksInterface; 9 9 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Payment\PaymentInterface; 10 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelInterface;11 10 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Redirect\RedirectInterface; 12 11 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Status\StatusInterface; … … 17 16 * @inheritDoc 18 17 */ 19 public function createList(array $links, IdentificationInterface $identification, StatusInterface $status, PaymentInterface $payment = null, CustomerInterface $customer = null, StyleInterface $style = null, RedirectInterface $redirect = null, string $division = null, array $products = null, ProcessingModelInterface $processingModel = null,NetworksInterface $networks = null): ListInterface18 public function createList(array $links, IdentificationInterface $identification, StatusInterface $status, PaymentInterface $payment = null, CustomerInterface $customer = null, StyleInterface $style = null, RedirectInterface $redirect = null, string $division = null, array $products = null, NetworksInterface $networks = null): ListInterface 20 19 { 21 return new ListSession($links, $identification, $status, $payment, $customer, $style, $redirect, $division, $products, $ processingModel, $networks);20 return new ListSession($links, $identification, $status, $payment, $customer, $style, $redirect, $division, $products, $networks); 22 21 } 23 22 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListFactoryInterface.php
r3111876 r3321269 10 10 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Payment\PaymentInterface; 11 11 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Product\ProductInterface; 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelInterface;13 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Redirect\RedirectInterface; 14 13 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Status\StatusInterface; … … 37 36 * @throws ApiExceptionInterface If something went wrong. 38 37 */ 39 public function createList(array $links, IdentificationInterface $identification, StatusInterface $status, PaymentInterface $payment = null, CustomerInterface $customer = null, StyleInterface $style = null, RedirectInterface $redirect = null, string $division = null, array $products = null, ProcessingModelInterface $processingModel = null,NetworksInterface $networks = null): ListInterface;38 public function createList(array $links, IdentificationInterface $identification, StatusInterface $status, PaymentInterface $payment = null, CustomerInterface $customer = null, StyleInterface $style = null, RedirectInterface $redirect = null, string $division = null, array $products = null, NetworksInterface $networks = null): ListInterface; 40 39 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListInterface.php
r3111876 r3321269 10 10 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Payment\PaymentInterface; 11 11 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Product\ProductInterface; 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelInterface;13 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Redirect\RedirectInterface; 14 13 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Status\StatusInterface; … … 90 89 public function getProducts(): array; 91 90 /** 92 * Return processing model93 *94 * @return ProcessingModelInterface95 *96 * @throws ApiExceptionInterface If no processing model set.97 */98 public function getProcessingModel(): ProcessingModelInterface;99 /**100 91 * Return networks 101 92 * -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListSerializer.php
r3111876 r3321269 9 9 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Network\NetworksSerializerInterface; 10 10 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Payment\PaymentSerializerInterface; 11 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelSerializerInterface;12 11 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Product\ProductInterface; 13 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Product\ProductSerializerInterface; … … 42 41 protected $redirectSerializer; 43 42 /** 44 * @var ProcessingModelSerializerInterface45 */46 private $processingModelSerializer;47 /**48 43 * @var ProductSerializerInterface 49 44 */ … … 62 57 * @param RedirectSerializerInterface $redirectSerializer To serialize redirect instance. 63 58 */ 64 public function __construct(IdentificationSerializerInterface $identificationSerializer, PaymentSerializerInterface $paymentSerializer, StatusSerializerInterface $statusSerializer, CustomerSerializerInterface $customerSerializer, StyleSerializerInterface $styleSerializer, RedirectSerializerInterface $redirectSerializer, ProductSerializerInterface $productSerializer, ProcessingModelSerializerInterface $processingModelSerializer,NetworksSerializerInterface $networksSerializer)59 public function __construct(IdentificationSerializerInterface $identificationSerializer, PaymentSerializerInterface $paymentSerializer, StatusSerializerInterface $statusSerializer, CustomerSerializerInterface $customerSerializer, StyleSerializerInterface $styleSerializer, RedirectSerializerInterface $redirectSerializer, ProductSerializerInterface $productSerializer, NetworksSerializerInterface $networksSerializer) 65 60 { 66 61 $this->identificationSerializer = $identificationSerializer; … … 70 65 $this->styleSerializer = $styleSerializer; 71 66 $this->redirectSerializer = $redirectSerializer; 72 $this->processingModelSerializer = $processingModelSerializer;73 67 $this->productSerializer = $productSerializer; 74 68 $this->networksSerializer = $networksSerializer; … … 116 110 } 117 111 try { 118 $processingModel = $listSession->getProcessingModel();119 $listData['processingModel'] = $this->processingModelSerializer->serializeProcessingModel($processingModel);120 } catch (ApiExceptionInterface $exception) {121 //Processing model is an optional parameter, so it's ok to have an exception here.122 }123 try {124 112 $networks = $listSession->getNetworks(); 125 113 $listData['networks'] = $this->networksSerializer->serializeNetworks($networks); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListSerializerInterface.php
r3111876 r3321269 34 34 * taxCode?: string, 35 35 * }[] 36 * division?: string, 37 * processingModel?: array{code: string, type: string}, 36 * division?: string 38 37 * } Serialized LIST session 39 38 */ -
payoneer-checkout/trunk/modules/inpsyde/payoneer-sdk/src/Api/Entities/ListSession/ListSession.php
r3111876 r3321269 10 10 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Payment\PaymentInterface; 11 11 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Product\ProductInterface; 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\ProcessingModel\ProcessingModelInterface;13 12 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Redirect\RedirectInterface; 14 13 use Syde\Vendor\Inpsyde\PayoneerSdk\Api\Entities\Status\StatusInterface; … … 49 48 protected $division; 50 49 /** 51 * @var ProcessingModelInterface|null52 */53 protected $processingModel;54 /**55 50 * @var ProductInterface[] 56 51 */ … … 70 65 * @param string|null $division Division name of this transaction 71 66 * @param ProductInterface[] $products Products in the current LIST session 72 * @param ProcessingModelInterface|null $processingModel73 67 */ 74 public function __construct(array $links, IdentificationInterface $identification, StatusInterface $status, PaymentInterface $payment = null, CustomerInterface $customer = null, StyleInterface $style = null, RedirectInterface $redirect = null, string $division = null, array $products = null, ProcessingModelInterface $processingModel = null,NetworksInterface $networks = null)68 public function __construct(array $links, IdentificationInterface $identification, StatusInterface $status, PaymentInterface $payment = null, CustomerInterface $customer = null, StyleInterface $style = null, RedirectInterface $redirect = null, string $division = null, array $products = null, NetworksInterface $networks = null) 75 69 { 76 70 $this->customer = $customer; … … 85 79 $this->products = $products; 86 80 } 87 $this->processingModel = $processingModel;88 81 $this->networks = $networks; 89 82 } … … 169 162 * @inheritDoc 170 163 */ 171 public function getProcessingModel(): ProcessingModelInterface172 {173 if (!$this->processingModel) {174 throw new ApiException('No processing model found in the LIST session');175 }176 return $this->processingModel;177 }178 /**179 * @inheritDoc180 */181 164 public function getNetworks(): NetworksInterface 182 165 { -
payoneer-checkout/trunk/modules/inpsyde/payoneer-settings/assets/admin-payment-methods.asset.php
r3120336 r3321269 3 3 namespace Syde\Vendor; 4 4 5 return array('dependencies' => array(), 'version' => ' a471735326cf6485a583');5 return array('dependencies' => array(), 'version' => '56c23b532049ed5b3065'); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-settings/assets/admin-payment-methods.js
r3120336 r3321269 1 !function(e,t){var a=e.PayoneerData,l=a.paymentMethods,o=a.helpTipMessage,n=a.generalSettingsUrl;l.forEach( (function(e){var a=t.querySelector('[data-gateway_id="'.concat(e,'"] .wc-payment-gateway-method-toggle-enabled'));a.querySelector(".woocommerce-input-toggle",a).style.opacity=.4;var l=t.createElement("span");l.className="woocommerce-help-tip",l.setAttribute("aria-label",o),l.setAttribute("data-tip",o),l.style.display="inline",l.style.verticalAlign="bottom",l.style.margin="0",a.appendChild(l),a.href=n}))}(window,document,jQuery);1 !function(e,t){var a=e.PayoneerData,l=a.paymentMethods,o=a.helpTipMessage,n=a.generalSettingsUrl;l.forEach(function(e){var a=t.querySelector('[data-gateway_id="'.concat(e,'"] .wc-payment-gateway-method-toggle-enabled'));a.querySelector(".woocommerce-input-toggle",a).style.opacity=.4;var l=t.createElement("span");l.className="woocommerce-help-tip",l.setAttribute("aria-label",o),l.setAttribute("data-tip",o),l.style.display="inline",l.style.verticalAlign="bottom",l.style.margin="0",a.appendChild(l),a.href=n})}(window,document,jQuery); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-settings/assets/admin-settings.asset.php
r3111876 r3321269 3 3 namespace Syde\Vendor; 4 4 5 return array('dependencies' => array(), 'version' => ' 2b8606b14cc812c5f545');5 return array('dependencies' => array(), 'version' => '8ceb6fd38758d8cf91cc'); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-settings/assets/admin-settings.js
r3111876 r3321269 1 !function(e,t,n){n( (function(){var e=function(e,t){var r=t.find("[group=sandbox_credentials]"),o=t.find("[group=live_credentials]");r.add(o).each((function(){n(this).attr("readonly","readonly")})),t.find("[group = ".concat(e,"]")).each((function(){n(this).removeAttr("readonly")}))},r=function(e){return e?"live_credentials":"sandbox_credentials"},o=n("#woocommerce_payoneer-checkout_live_mode"),a=o.closest("form");o.on("change",(function(){var t=this.checked,o=n(this).closest("form");e(r(t),o)})),e(r(o.prop("checked")),a);var i=function(){return confirm(PayoneerData.i18n.confirmReset)};t.querySelectorAll("button[data-target]").forEach((function(e){e.addEventListener("click",(function(n){t.querySelector(e.dataset.target).dispatchEvent(new CustomEvent("reset",{detail:e.dataset.default})),n.preventDefault()}))})),t.querySelectorAll("#mainform input").forEach((function(e){e.addEventListener("reset",(function(t){i()&&(e.value=t.detail)}))})),t.querySelectorAll("#mainform textarea").forEach((function(e){e.addEventListener("reset",(function(t){i()&&(e.innerHTML=t.detail,n(e).next(".CodeMirror")[0].CodeMirror.setValue(e.value),n(e).next(".CodeMirror")[0].CodeMirror.refresh())}))}))}))}(top,document,jQuery);1 !function(e,t,n){n(function(){var e=function(e,t){var r=t.find("[group=sandbox_credentials]"),o=t.find("[group=live_credentials]");r.add(o).each(function(){n(this).attr("readonly","readonly")}),t.find("[group = ".concat(e,"]")).each(function(){n(this).removeAttr("readonly")})},r=function(e){return e?"live_credentials":"sandbox_credentials"},o=n("#woocommerce_payoneer-checkout_live_mode"),a=o.closest("form");o.on("change",function(){var t=this.checked,o=n(this).closest("form");e(r(t),o)}),e(r(o.prop("checked")),a);var i=function(){return confirm(PayoneerData.i18n.confirmReset)};t.querySelectorAll("button[data-target]").forEach(function(e){e.addEventListener("click",function(n){t.querySelector(e.dataset.target).dispatchEvent(new CustomEvent("reset",{detail:e.dataset.default})),n.preventDefault()})}),t.querySelectorAll("#mainform input").forEach(function(e){e.addEventListener("reset",function(t){i()&&(e.value=t.detail)})}),t.querySelectorAll("#mainform textarea").forEach(function(e){e.addEventListener("reset",function(t){i()&&(e.innerHTML=t.detail,n(e).next(".CodeMirror")[0].CodeMirror.setValue(e.value),n(e).next(".CodeMirror")[0].CodeMirror.refresh())})})})}(top,document,jQuery); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-status-report/inc/services.php
r3111876 r3321269 9 9 namespace Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport; 10 10 11 use WP_REST_Request; 12 use WP_REST_Response; 11 13 use Syde\Vendor\Psr\Container\ContainerInterface; 14 use Syde\Vendor\Dhii\Services\Factories\Alias; 15 use Syde\Vendor\Dhii\Services\Factories\Constructor; 16 use Syde\Vendor\Dhii\Services\Factories\Value; 17 use Syde\Vendor\Dhii\Services\Factory; 18 use Syde\Vendor\Dhii\Services\Service; 19 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Data\SystemReportCollector; 20 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Data\SystemReportParamsDTO; 21 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Data\LogCollector\LogCollectorFactory; 22 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Email\SystemReportEmailSender; 23 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Email\SystemReportFormatter; 24 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Endpoint\SystemReportEndpointController; 25 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Permission\SystemReportPermissionHandler; 26 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\Controller\WpRestApiControllerInterface; 12 27 return static function (): array { 28 $moduleRoot = dirname(__DIR__); 13 29 return ['status-report.renderer' => static function (): Renderer { 14 30 return new Renderer(); 15 }, 'status-report.boolToHtml' => static function (): object {16 return new class17 {18 public function convert(bool $value): string19 {20 return $value ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">–</mark>';21 }22 };23 31 }, 'status-report.fields' => static function (ContainerInterface $container): array { 24 32 return [['label' => esc_html__('Shop country code', 'payoneer-checkout'), 'exported_label' => 'Shop country code', 'description' => esc_html__('Country / State value on Settings / General / Store Address.', 'payoneer-checkout'), 'value' => $container->get('inpsyde_payment_gateway.store_country')], ['label' => esc_html__('API username', 'payoneer-checkout'), 'exported_label' => 'API username', 'value' => $container->get('payoneer_settings.merchant_code')], ['label' => esc_html__('Payment flow', 'payoneer-checkout'), 'exported_label' => 'Payment flow', 'description' => esc_html__('Displays whether a plugin is using a hosted or an embedded payment flow', 'payoneer-checkout'), 'value' => $container->get('checkout.selected_payment_flow')]]; 25 }]; 33 }, 'status-report.options' => new Alias('core.options'), 'status-report.namespace' => new Alias('core.webhooks.namespace'), 'status-report.rest_route' => new Value('/system-report'), 'status-report.allowed_methods' => new Value(['POST']), 'status-report.html-template' => Service::fromFile("{$moduleRoot}/inc/html-template.php"), 'status-report.email.recipient' => new Value('l2checkoutsupport@payoneer.com'), 'status-report.email.subject' => new Value('Automated System Report - {SITE_NAME}'), 'status-report.email.message' => Service::fromFile("{$moduleRoot}/inc/email-message.php"), 'status-report.email.formatter' => new Constructor(SystemReportFormatter::class, ['core.plugin.version_string', 'status-report.html-template']), 'status-report.email.sender' => new Constructor(SystemReportEmailSender::class, ['status-report.email.recipient', 'status-report.email.subject', 'status-report.email.message', 'status-report.email.formatter', 'payoneer_settings.merchant']), 'status-report.background_processor' => new Factory([], static function (): callable { 34 return static function (SystemReportParamsDTO $params): array { 35 // Schedule the task as a background job: This is where the actual work happens. 36 $scheduled = wp_schedule_single_event(time(), 'payoneer_process_system_report', [$params], \true); 37 if (\true !== $scheduled) { 38 return ['success' => \false, 'message' => $scheduled->get_error_message()]; 39 } 40 return ['success' => \true]; 41 }; 42 }), 'status-report.controller' => new Constructor(SystemReportEndpointController::class, ['status-report.background_processor']), 'status-report.callback' => new Factory(['status-report.controller'], static function (WpRestApiControllerInterface $controller): callable { 43 return static fn(WP_REST_Request $request): WP_REST_Response => $controller->handleWpRestRequest($request); 44 }), 'status-report.permission_handler' => new Constructor(SystemReportPermissionHandler::class, ['status-report.options', 'payoneer_settings.merchant']), 'status-report.permission_callback' => new Factory(['status-report.permission_handler'], static function (SystemReportPermissionHandler $handler): callable { 45 return static fn(WP_REST_Request $request) => $handler->checkPermission($request); 46 }), 'status-report.log-file-collector-factory' => new Constructor(LogCollectorFactory::class, ['inpsyde_logger.logging_source']), 'status-report.collector' => new Constructor(SystemReportCollector::class, ['status-report.log-file-collector-factory', 'wp.order_finder']), 'status-report.settings.fields' => Service::fromFile("{$moduleRoot}/inc/fields.php")]; 26 47 }; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-status-report/src/Renderer.php
r3114998 r3321269 24 24 * @param string $title The title. 25 25 * @param StatusReportItem[] $items The items. 26 * @return false|string26 * @return string 27 27 */ 28 public function render(string $title, array $items) 28 public function render(string $title, array $items): string 29 29 { 30 30 ob_start(); … … 67 67 </table> 68 68 <?php 69 return ob_get_clean();69 return (string) ob_get_clean(); 70 70 } 71 71 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-status-report/src/StatusReportModule.php
r3111876 r3321269 6 6 use Syde\Vendor\Inpsyde\Modularity\Module\ServiceModule; 7 7 use Syde\Vendor\Inpsyde\Modularity\Module\ExecutableModule; 8 use Syde\Vendor\Inpsyde\Modularity\Module\ExtendingModule; 8 9 use Syde\Vendor\Inpsyde\Modularity\Module\ModuleClassNameIdTrait; 10 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Data\SystemReportCollectorInterface; 11 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Data\SystemReportParamsDTO; 12 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\StatusReport\Email\SystemReportEmailSenderInterface; 9 13 use Syde\Vendor\Psr\Container\ContainerInterface; 10 14 /** 11 15 * @psalm-import-type StatusReportItem from Renderer 12 16 */ 13 class StatusReportModule implements ServiceModule, ExecutableModule 17 class StatusReportModule implements ServiceModule, ExecutableModule, ExtendingModule 14 18 { 15 19 use ModuleClassNameIdTrait; … … 40 44 public function run(ContainerInterface $container): bool 41 45 { 46 /** 47 * Extend the default WooCommerce system status report. 48 * 49 * @see /wp-admin/admin.php?page=wc-status 50 */ 42 51 add_action('woocommerce_system_status_report', static function () use ($container) { 43 52 $statusReportRenderer = $container->get('status-report.renderer'); … … 45 54 /** @var StatusReportItem[] $statusReportItems */ 46 55 $statusReportItems = $container->get('status-report.fields'); 47 echo wp_kses_post((string) $statusReportRenderer->render(esc_html__('Payoneer Checkout', 'payoneer-checkout'), $statusReportItems)); 56 echo wp_kses_post($statusReportRenderer->render(esc_html__('Payoneer Checkout', 'payoneer-checkout'), $statusReportItems)); 57 }); 58 // Register REST API endpoint 59 add_action('rest_api_init', static function () use ($container) { 60 /** @var string $namespace */ 61 $namespace = $container->get('status-report.namespace'); 62 /** @var string $route */ 63 $route = $container->get('status-report.rest_route'); 64 /** @var string[] $methods */ 65 $methods = $container->get('status-report.allowed_methods'); 66 /** @var callable $callback */ 67 $callback = $container->get('status-report.callback'); 68 /** @var callable(): bool $permissionCallback */ 69 $permissionCallback = $container->get('status-report.permission_callback'); 70 /** 71 * The REST endpoint which triggers the system report mail. 72 * 73 * Endpoint: 74 * POST /wp-json/inpsyde/payoneer-checkout/system-report 75 */ 76 register_rest_route($namespace, $route, ['methods' => $methods, 'callback' => $callback, 'permission_callback' => $permissionCallback]); 77 }); 78 // Cron event handler. 79 add_action('payoneer_process_system_report', static function (SystemReportParamsDTO $params) use ($container) { 80 $collector = $container->get('status-report.collector'); 81 assert($collector instanceof SystemReportCollectorInterface); 82 $emailSender = $container->get('status-report.email.sender'); 83 assert($emailSender instanceof SystemReportEmailSenderInterface); 84 $reportData = $collector->collect($params); 85 $emailSender->sendReport($reportData, $params); 48 86 }); 49 87 return \true; 50 88 } 89 /** 90 * @inheritDoc 91 */ 92 public function extensions(): array 93 { 94 return ['payoneer_settings.settings_fields' => static function (array $previous, ContainerInterface $container): array { 95 /** @var array $settingsFields */ 96 $settingsFields = $container->get('status-report.settings.fields'); 97 return array_merge($previous, $settingsFields); 98 }]; 99 } 51 100 } -
payoneer-checkout/trunk/modules/inpsyde/payoneer-webhooks/inc/services.php
r3124685 r3321269 13 13 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\Controller\OrderPaymentWebhookStrategyHandler; 14 14 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\LogIncomingWebhookRequest; 15 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderFinder\HposOrderFinder;16 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderFinder\OrderFinderInterface;17 15 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderPaymentWebhookHandler\CustomerRegistrationHandler; 18 16 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderPaymentWebhookHandler\FailedPaymentHandler; … … 21 19 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderPaymentWebhookHandler\RefundedPaymentHandler; 22 20 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\Controller\WpRestApiControllerInterface; 23 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderFinder\AddTransactionIdFieldSupport;24 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderFinder\OrderFinder;25 21 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderWebhookFinder\OrderWebhookFinder; 26 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\RefundFinder\AddPayoutIdFieldSupport;27 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\RefundFinder\RefundFinder;28 use Syde\Vendor\Psr\Container\ContainerInterface;29 22 return static function (): array { 30 23 $moduleRoot = \dirname(__DIR__); … … 39 32 }; 40 33 }), 41 'webhooks.controller.payment_webhook_controller' => new Constructor(PaymentWebhookController::class, ['webhooks.order.security_header_field_name', 'w ebhooks.order_finder', 'webhooks.order_webhook_finder', 'webhooks.order.processed_id_field_name', 'webhooks.controller.payment_webhook_strategy_handler']),34 'webhooks.controller.payment_webhook_controller' => new Constructor(PaymentWebhookController::class, ['webhooks.order.security_header_field_name', 'wp.order_finder', 'webhooks.order_webhook_finder', 'webhooks.order.processed_id_field_name', 'webhooks.controller.payment_webhook_strategy_handler']), 42 35 'webhooks.controller.payment_webhook_strategy_handler' => new Constructor(OrderPaymentWebhookStrategyHandler::class, ['webhooks.failed_payment_handler', 'webhooks.chargeback_payment_handler', 'webhooks.refunded_payment_handler', 'webhooks.charged_payment_handler', 'webhooks.customer_registration_handler']), 43 36 'webhooks.log_incoming_webhooks_request' => new Constructor(LogIncomingWebhookRequest::class, ['webhooks.security_header_name']), 44 37 'webhooks.failed_payment_handler' => new Constructor(FailedPaymentHandler::class), 45 38 'webhooks.chargeback_payment_handler' => new Constructor(ChargeBackPaymentHandler::class), 46 'webhooks.refunded_payment_handler' => new Constructor(RefundedPaymentHandler::class, ['webhooks.order.charge_id_field_name', 'webhooks.order_refund.payout_id_field_name', 'w ebhooks.refund_finder']),39 'webhooks.refunded_payment_handler' => new Constructor(RefundedPaymentHandler::class, ['webhooks.order.charge_id_field_name', 'webhooks.order_refund.payout_id_field_name', 'wp.refund_finder']), 47 40 'webhooks.charged_payment_handler' => new Constructor(ChargedPaymentHandler::class, ['webhooks.order.charge_id_field_name']), 48 41 'webhooks.customer_registration_handler' => new Constructor(CustomerRegistrationHandler::class, ['webhooks.customer_registration_id_field_name']), 49 'webhooks.order_finder' => static function (ContainerInterface $container): OrderFinderInterface {50 $transactionIdFieldName = (string) $container->get('webhooks.order.transaction_id_field_name');51 $hposEnabled = (bool) $container->get('wc.hpos.is_enabled');52 return $hposEnabled ? new HposOrderFinder($transactionIdFieldName) : new OrderFinder($transactionIdFieldName);53 },54 'webhooks.refund_finder' => new Constructor(RefundFinder::class, ['webhooks.order_refund.payout_id_field_name']),55 42 'webhooks.order_webhook_finder' => new Constructor(OrderWebhookFinder::class, ['webhooks.order.processed_id_field_name']), 56 43 'webhooks.controller.webhooks_controller' => new Factory(['webhooks.controller.payment_webhook_controller'], static function (WpRestApiControllerInterface $paymentWebhookController): WpRestApiControllerInterface { … … 63 50 return [\WP_REST_Server::READABLE, \WP_REST_Server::CREATABLE]; 64 51 }, 65 'webhooks.add_transaction_id_field_support' => new Constructor(AddTransactionIdFieldSupport::class, ['webhooks.order.transaction_id_field_name']),66 'webhooks.add_payout_id_field_support' => new Constructor(AddPayoutIdFieldSupport::class, ['webhooks.order_refund.payout_id_field_name']),67 52 'webhooks.settings.fields' => Service::fromFile("{$moduleRoot}/inc/fields.php"), 68 53 'webhooks.security_header_name' => new Value('List-Security-Token'), -
payoneer-checkout/trunk/modules/inpsyde/payoneer-webhooks/src/Controller/PaymentWebhookController.php
r3124685 r3321269 4 4 namespace Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\Controller; 5 5 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\W ebhooks\OrderFinder\OrderFinderInterface;6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\OrderFinder\OrderFinderInterface; 7 7 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderWebhookFinder\OrderWebhookFinderInterface; 8 8 use WC_Order; … … 54 54 { 55 55 $transactionId = (string) $request->get_param('transactionId'); 56 $order = $this->orderFinder->findOrderByTransactionId($transactionId); 56 $orders = $this->orderFinder->findOrdersByTransactionId($transactionId, 20); 57 if (count($orders) > 1) { 58 do_action('payoneer-checkout.webhook_request.multiple_orders_found_for_transaction_id', ['transactionId' => $transactionId, 'orders' => array_map(static fn(WC_Order $order) => $order->get_id(), $orders)]); 59 } 60 $order = $orders[0]; 57 61 $longId = (string) $request->get_param('longId'); 58 62 if (!$order instanceof WC_Order) { -
payoneer-checkout/trunk/modules/inpsyde/payoneer-webhooks/src/OrderPaymentWebhookHandler/RefundedPaymentHandler.php
r3111876 r3321269 4 4 namespace Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Webhooks\OrderPaymentWebhookHandler; 5 5 6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\W ebhooks\RefundFinder\RefundFinderInterface;6 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\RefundFinder\RefundFinderInterface; 7 7 use WC_Order; 8 8 use WC_Order_Refund; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-webhooks/src/WebhooksModule.php
r3111876 r3321269 31 31 register_rest_route($namespace, $route, ['methods' => $methods, 'callback' => $callback, 'permission_callback' => $permissionCallback]); 32 32 }); 33 /** @var callable():void $addTransactionIdFieldSupport */34 $addTransactionIdFieldSupport = $container->get('webhooks.add_transaction_id_field_support');35 $addTransactionIdFieldSupport();36 /** @var callable():void $addPayoutIdFieldSupport */37 $addPayoutIdFieldSupport = $container->get('webhooks.add_payout_id_field_support');38 $addPayoutIdFieldSupport();39 33 /** @var callable(WP_Rest_Request):void $logIncomingWebhookRequest */ 40 34 $logIncomingWebhookRequest = $container->get('webhooks.log_incoming_webhooks_request'); -
payoneer-checkout/trunk/modules/inpsyde/payoneer-wp/inc/factories.php
r3305047 r3321269 42 42 } 43 43 return $wooCommerce->session instanceof \WC_Session; 44 }), 'wc.cart.is-available' => new Factory(['wc'], static fn(\WooCommerce $wooCommerce) => $wooCommerce->cart instanceof \WC_Cart)]; 44 }), 'wc.cart.is-available' => new Factory(['wc'], static fn(\WooCommerce $wooCommerce) => $wooCommerce->cart instanceof \WC_Cart), 'wc.is_checkout_pay_page' => new Factory(['wc'], static function (): bool { 45 return is_checkout_pay_page(); 46 }), 'wc.is_order_received_page' => new Factory(['wc'], static function (): bool { 47 return is_order_received_page(); 48 })]; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-wp/inc/services.php
r3305047 r3321269 7 7 use Syde\Vendor\Dhii\Collection\MutableContainerInterface; 8 8 use Syde\Vendor\Dhii\Services\Factories\Alias; 9 use Syde\Vendor\Dhii\Services\Factories\Constructor; 9 10 use Syde\Vendor\Dhii\Services\Factories\Value; 10 11 use Syde\Vendor\Dhii\Services\Factory; 12 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Checkout\RequestHeaderUtil; 11 13 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Core\Exception\PayoneerException; 12 14 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Environment\WpEnvironmentInterface; 13 15 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\NormalizingLocaleProviderISO639ISO3166; 14 16 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\LocaleProviderInterface; 17 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\OrderFinder\AddTransactionIdFieldSupport; 18 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\OrderFinder\HposOrderFinder; 19 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\OrderFinder\OrderFinder; 20 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\OrderFinder\OrderFinderInterface; 21 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\RefundFinder\AddPayoutIdFieldSupport; 22 use Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp\RefundFinder\RefundFinder; 23 use Syde\Vendor\Psr\Container\ContainerInterface; 15 24 use Syde\Vendor\WpOop\Containers\Options\BlogOptions; 16 25 use Syde\Vendor\WpOop\Containers\Options\SiteMeta; 17 26 return static function (): array { 18 return ['wp.random_seed' => new Factory([], static function (): string { 19 return \uniqid('', \true); 20 }), 'wp.current_locale.wp' => new Factory([], static function (): string { 21 return \determine_locale(); 22 }), 'wp.site.title' => new Factory([], static function (): string { 23 return \get_bloginfo('name', 'display'); 24 }), 'wp.current_locale.fallback' => new Value(''), 'wp.current_locale.provider' => new Factory(['wp.current_locale.wp', 'wp.current_locale.fallback'], static function (string $internalLocale, string $defaultLocale): LocaleProviderInterface { 25 return new NormalizingLocaleProviderISO639ISO3166($internalLocale, $defaultLocale); 26 }), 'wp.current_locale.normalized' => new Factory(['wp.current_locale.provider'], static function (LocaleProviderInterface $localeProvider): string { 27 return $localeProvider->provideLocale(); 28 }), 'wp.site_options.not_found_token' => new Alias('wp.random_seed'), 'wp.sites.current.id' => new Factory([], static function (): ?int { 29 return \is_multisite() ? \get_current_blog_id() : null; 30 }), 'wp.sites.current.options' => new Factory(['wp.sites.current.id', 'wp.site_options.not_found_token'], static function (?int $siteId, string $defaultToken): MutableContainerInterface { 31 $product = new BlogOptions($siteId, $defaultToken); 32 return $product; 33 }), 'wp.sites.current.meta' => new Factory(['wp.sites.current.id'], static function (?int $siteId): MutableContainerInterface { 34 $product = new SiteMeta($siteId); 35 return $product; 36 }), 'wp.http.wp_http_object' => new Factory([], static function (): \WP_Http { 37 return \_wp_http_get_object(); 38 }), 'wp.admin_url' => new Factory([], static function (): string { 39 return \admin_url(); 40 }), 'wp.is_admin' => new Factory([], static function (): bool { 41 return \is_admin(); 42 }), 'wp.is_ajax' => new Factory([], static function (): bool { 43 return \defined('DOING_AJAX') && \DOING_AJAX; 44 }), 'wp.is_frontend_request' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): bool { 45 return (!\is_admin() || \defined('DOING_AJAX')) && !\defined('DOING_CRON') && !\defined('REST_REQUEST') && !$wooCommerce->is_rest_api_request(); 46 }), 'wp.is_rest_api_request' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): bool { 47 return $wooCommerce->is_rest_api_request(); 48 }), 'wp.site_url' => new Factory([], static function (): string { 49 return \get_site_url(\get_current_blog_id()); 50 }), 'wp.is_debug' => new Value(\defined('WP_DEBUG') && \WP_DEBUG), 'wp.is_script_debug' => new Value(\defined('SCRIPT_DEBUG') && \SCRIPT_DEBUG), 'wp.user_id' => new Factory([], static function (): string { 51 return (string) \get_current_user_id(); 52 }), 'wc' => new Factory([], static function (): \WooCommerce { 53 if (!\did_action('woocommerce_init')) { 54 throw new \RuntimeException('"wc" service was accessed before the "woocommerce_init" hook'); 55 } 56 return \WC(); 57 }), 'wc.version' => new Factory(['core.wp_environment'], static function (WpEnvironmentInterface $wpEnvironment): string { 58 return $wpEnvironment->getWcVersion(); 59 }), 'wc.session' => new Factory(['wc', 'wc.session.is-available'], static function (\WooCommerce $wooCommerce, bool $isAvailable): \WC_Session { 60 if (!$isAvailable) { 61 throw new PayoneerException('WooCommerce session is not available.'); 62 } 63 return $wooCommerce->session; 64 }), 'wc.customer' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): \WC_Customer { 65 return $wooCommerce->customer; 66 }), 'wc.cart' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): \WC_Cart { 67 return $wooCommerce->cart; 68 }), 'wc.currency' => new Factory(['wc'], static function (): string { 69 return get_woocommerce_currency(); 70 }), 'wc.price_decimals' => new Factory(['wc'], static function (): int { 71 return \wc_get_price_decimals(); 72 }), 'wc.settings.price_include_tax' => new Factory(['wc'], static function (): bool { 73 return \wc_prices_include_tax(); 74 }), 'wc.is_fragment_update' => new Factory([], static function (): bool { 75 $wcAjaxAction = \filter_input(\INPUT_GET, 'wc-ajax', \FILTER_CALLBACK, ['options' => 'sanitize_text_field']); 76 return $wcAjaxAction === 'update_order_review' || $wcAjaxAction === 'update_checkout'; 77 }), 'wc.is_store_api_request' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): bool { 78 /** 79 * We really really wish to access raw data here. 80 * Wea re also doing only string comparisons and will not use the data 81 * for processing. Hence: 82 * phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash 83 * phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 84 */ 85 global $wp_rewrite; 86 \assert($wp_rewrite instanceof \WP_Rewrite); 87 if ($wp_rewrite->using_permalinks()) { 88 /** 89 * is_store_api_request is not available <=8.9.1. 90 * However, block checkout as a whole has been around far longer. 91 * So for older WC versions, we execute a copy of the method we have today 92 */ 93 if (!\method_exists($wooCommerce, 'is_store_api_request')) { 94 if (empty($_SERVER['REQUEST_URI'])) { 95 return \false; 27 return [ 28 'wp.random_seed' => new Factory([], static function (): string { 29 return \uniqid('', \true); 30 }), 31 'wp.current_locale.wp' => new Factory([], static function (): string { 32 return \determine_locale(); 33 }), 34 'wp.site.title' => new Factory([], static function (): string { 35 return \get_bloginfo('name', 'display'); 36 }), 37 'wp.current_locale.fallback' => new Value(''), 38 'wp.current_locale.provider' => new Factory(['wp.current_locale.wp', 'wp.current_locale.fallback'], static function (string $internalLocale, string $defaultLocale): LocaleProviderInterface { 39 return new NormalizingLocaleProviderISO639ISO3166($internalLocale, $defaultLocale); 40 }), 41 'wp.current_locale.normalized' => new Factory(['wp.current_locale.provider'], static function (LocaleProviderInterface $localeProvider): string { 42 return $localeProvider->provideLocale(); 43 }), 44 'wp.site_options.not_found_token' => new Alias('wp.random_seed'), 45 'wp.sites.current.id' => new Factory([], static function (): ?int { 46 return \is_multisite() ? \get_current_blog_id() : null; 47 }), 48 'wp.sites.current.options' => new Factory(['wp.sites.current.id', 'wp.site_options.not_found_token'], static function (?int $siteId, string $defaultToken): MutableContainerInterface { 49 $product = new BlogOptions($siteId, $defaultToken); 50 return $product; 51 }), 52 'wp.sites.current.meta' => new Factory(['wp.sites.current.id'], static function (?int $siteId): MutableContainerInterface { 53 $product = new SiteMeta($siteId); 54 return $product; 55 }), 56 'wp.http.wp_http_object' => new Factory([], static function (): \WP_Http { 57 return \_wp_http_get_object(); 58 }), 59 'wp.admin_url' => new Factory([], static function (): string { 60 return \admin_url(); 61 }), 62 'wp.is_admin' => new Factory([], static function (): bool { 63 return \is_admin(); 64 }), 65 'wp.is_ajax' => new Factory([], static function (): bool { 66 return \defined('DOING_AJAX') && \DOING_AJAX; 67 }), 68 'wp.is_frontend_request' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): bool { 69 return (!\is_admin() || \defined('DOING_AJAX')) && !\defined('DOING_CRON') && !\defined('REST_REQUEST') && !$wooCommerce->is_rest_api_request(); 70 }), 71 'wp.is_rest_api_request' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): bool { 72 return $wooCommerce->is_rest_api_request(); 73 }), 74 'wp.site_url' => new Factory([], static function (): string { 75 return \get_site_url(\get_current_blog_id()); 76 }), 77 'wp.is_debug' => new Value(\defined('WP_DEBUG') && \WP_DEBUG), 78 'wp.is_script_debug' => new Value(\defined('SCRIPT_DEBUG') && \SCRIPT_DEBUG), 79 'wp.user_id' => new Factory([], static function (): string { 80 return (string) \get_current_user_id(); 81 }), 82 'wc' => new Factory([], static function (): \WooCommerce { 83 if (!\did_action('woocommerce_init')) { 84 throw new \RuntimeException('"wc" service was accessed before the "woocommerce_init" hook'); 85 } 86 return \WC(); 87 }), 88 'wc.version' => new Factory(['core.wp_environment'], static function (WpEnvironmentInterface $wpEnvironment): string { 89 return $wpEnvironment->getWcVersion(); 90 }), 91 'wc.session' => new Factory(['wc', 'wc.session.is-available'], static function (\WooCommerce $wooCommerce, bool $isAvailable): \WC_Session { 92 if (!$isAvailable) { 93 throw new PayoneerException('WooCommerce session is not available.'); 94 } 95 return $wooCommerce->session; 96 }), 97 'wc.customer' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): \WC_Customer { 98 return $wooCommerce->customer; 99 }), 100 'wc.cart' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): \WC_Cart { 101 return $wooCommerce->cart; 102 }), 103 'wc.currency' => new Factory(['wc'], static function (): string { 104 return get_woocommerce_currency(); 105 }), 106 'wc.price_decimals' => new Factory(['wc'], static function (): int { 107 return \wc_get_price_decimals(); 108 }), 109 'wc.settings.price_include_tax' => new Factory(['wc'], static function (): bool { 110 return \wc_prices_include_tax(); 111 }), 112 'wc.is_fragment_update' => new Factory([], static function (): bool { 113 $wcAjaxAction = \filter_input(\INPUT_GET, 'wc-ajax', \FILTER_CALLBACK, ['options' => 'sanitize_text_field']); 114 return $wcAjaxAction === 'update_order_review' || $wcAjaxAction === 'update_checkout'; 115 }), 116 'wc.is_store_api_request' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): bool { 117 /** 118 * We really really wish to access raw data here. 119 * Wea re also doing only string comparisons and will not use the data 120 * for processing. Hence: 121 * phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash 122 * phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 123 */ 124 global $wp_rewrite; 125 \assert($wp_rewrite instanceof \WP_Rewrite); 126 if ($wp_rewrite->using_permalinks()) { 127 /** 128 * is_store_api_request is not available <=8.9.1. 129 * However, block checkout as a whole has been around far longer. 130 * So for older WC versions, we execute a copy of the method we have today 131 */ 132 if (!\method_exists($wooCommerce, 'is_store_api_request')) { 133 if (empty($_SERVER['REQUEST_URI'])) { 134 return \false; 135 } 136 // phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 137 return \false !== \strpos($_SERVER['REQUEST_URI'], \trailingslashit(\rest_get_url_prefix()) . 'wc/store/'); 96 138 } 97 // phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 98 return \false !== \strpos($_SERVER['REQUEST_URI'], \trailingslashit(\rest_get_url_prefix()) . 'wc/store/'); 99 } 100 return $wooCommerce->is_store_api_request(); 101 } 102 return \preg_match('/\/index\.php\?rest_route=\/wc\/store\//', isset($_SERVER['REQUEST_URI']) ? \urldecode($_SERVER['REQUEST_URI']) : '') === 1; 103 /** 104 * phpcs:enable WordPress.Security.ValidatedSanitizedInput.MissingUnslash 105 * phpcs:enable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 106 */ 107 }), 'wc.is_checkout_pay_page' => new Factory(['wc'], static function (): bool { 108 return is_checkout_pay_page(); 109 }), 'wc.is_order_received_page' => new Factory(['wc'], static function (): bool { 110 return is_order_received_page(); 111 }), 'wc.order_under_payment' => new Factory(['wc.order_awaiting_payment', 'wc.pay_for_order_id'], static function (int $orderAwaitingPayment, int $payForOrderId): int { 112 if ($payForOrderId) { 113 return $payForOrderId; 114 } 115 return $orderAwaitingPayment; 116 }), 'wc.order_awaiting_payment' => new Factory(['wc.session'], static function (\WC_Session $session): int { 117 /** @var int|false $orderAwaitingPayment */ 118 $orderAwaitingPayment = $session->get('order_awaiting_payment'); 119 return (int) $orderAwaitingPayment; 120 }), 'wc.pay_for_order_id' => new Factory(['wc'], static function (): int { 121 return (int) \get_query_var('order-pay'); 122 }), 'wc.order_item_types_for_product' => new Factory([], static function (): array { 123 return ['line_item', 'shipping', 'fee', 'coupon']; 124 }), 'wc.ajax_url' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): string { 125 return $wooCommerce->ajax_url(); 126 }), 'wc.countries' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): \WC_Countries { 127 return $wooCommerce->countries; 128 }), 'wc.shop_url' => new Factory([], static function (): string { 129 return (string) \get_permalink(\wc_get_page_id('shop')); 130 }), 'wc.admin_permission' => new Value('manage_woocommerce'), 'wc.hpos.is_enabled' => static function (): bool { 131 if (!\method_exists(OrderUtil::class, 'custom_orders_table_usage_is_enabled')) { 132 return \false; 133 } 134 /** 135 * @psalm-var mixed $enabled 136 */ 137 $enabled = OrderUtil::custom_orders_table_usage_is_enabled(); 138 //WooCommerce return types sometimes incorrect, better to make sure. 139 return \is_bool($enabled) ? $enabled : \wc_string_to_bool((string) $enabled); 140 }, 'wc.is_block_checkout' => fn() => \function_exists('has_block') && \has_block('woocommerce/checkout')]; 139 return $wooCommerce->is_store_api_request(); 140 } 141 return \preg_match('/\/index\.php\?rest_route=\/wc\/store\//', isset($_SERVER['REQUEST_URI']) ? \urldecode($_SERVER['REQUEST_URI']) : '') === 1; 142 /** 143 * phpcs:enable WordPress.Security.ValidatedSanitizedInput.MissingUnslash 144 * phpcs:enable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 145 */ 146 }), 147 'wc.order_awaiting_payment' => new Factory(['wc.session'], static function (\WC_Session $session): int { 148 /** @var int|false $orderAwaitingPayment */ 149 $orderAwaitingPayment = $session->get('order_awaiting_payment'); 150 return (int) $orderAwaitingPayment; 151 }), 152 'wc.pay_for_order_id.from_header' => new Factory([], static function (): int { 153 /** 154 * When using the Store API we currently rely on custom HHT header to pass 155 * information about the current checkout attempt. 156 * 157 * @todo: deal with the code duplication. Currently, we have the same logic 158 * for determining context in ListSessionManager. As we may get 159 * rid of contexts soon, I'm leaving it as is so far. 160 */ 161 $headerUtil = new RequestHeaderUtil(); 162 $paymentCheckoutHeader = 'x-payoneer-is-payment-checkout'; 163 $orderKey = $headerUtil->getHeader($paymentCheckoutHeader); 164 if (!empty($orderKey)) { 165 return (int) \wc_get_order_id_by_order_key($orderKey); 166 } 167 return 0; 168 }), 169 'wc.order_item_types_for_product' => new Factory([], static function (): array { 170 return ['line_item', 'shipping', 'fee', 'coupon']; 171 }), 172 'wc.ajax_url' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): string { 173 return $wooCommerce->ajax_url(); 174 }), 175 'wc.countries' => new Factory(['wc'], static function (\WooCommerce $wooCommerce): \WC_Countries { 176 return $wooCommerce->countries; 177 }), 178 'wc.shop_url' => new Factory([], static function (): string { 179 return (string) \get_permalink(\wc_get_page_id('shop')); 180 }), 181 'wc.admin_permission' => new Value('manage_woocommerce'), 182 'wc.hpos.is_enabled' => static function (): bool { 183 if (!\method_exists(OrderUtil::class, 'custom_orders_table_usage_is_enabled')) { 184 return \false; 185 } 186 /** 187 * @psalm-var mixed $enabled 188 */ 189 $enabled = OrderUtil::custom_orders_table_usage_is_enabled(); 190 //WooCommerce return types sometimes incorrect, better to make sure. 191 return \is_bool($enabled) ? $enabled : \wc_string_to_bool((string) $enabled); 192 }, 193 'wc.is_block_checkout' => fn() => \function_exists('has_block') && \has_block('woocommerce/checkout'), 194 /** Order finder */ 195 'wp.order_finder' => static function (ContainerInterface $container): OrderFinderInterface { 196 $transactionIdFieldName = (string) $container->get('webhooks.order.transaction_id_field_name'); 197 $hposEnabled = (bool) $container->get('wc.hpos.is_enabled'); 198 return $hposEnabled ? new HposOrderFinder($transactionIdFieldName) : new OrderFinder($transactionIdFieldName); 199 }, 200 'wp.add_transaction_id_field_support' => new Constructor(AddTransactionIdFieldSupport::class, ['webhooks.order.transaction_id_field_name']), 201 'wp.refund_finder' => new Constructor(RefundFinder::class, ['webhooks.order_refund.payout_id_field_name']), 202 'wp.add_payout_id_field_support' => new Constructor(AddPayoutIdFieldSupport::class, ['webhooks.order_refund.payout_id_field_name']), 203 ]; 141 204 }; -
payoneer-checkout/trunk/modules/inpsyde/payoneer-wp/src/WpModule.php
r3111876 r3321269 4 4 namespace Syde\Vendor\Inpsyde\PayoneerForWoocommerce\Wp; 5 5 6 use Syde\Vendor\Inpsyde\Modularity\Module\ExecutableModule; 6 7 use Syde\Vendor\Inpsyde\Modularity\Module\FactoryModule; 7 8 use Syde\Vendor\Inpsyde\Modularity\Module\ServiceModule; … … 10 11 * The WP core features module. 11 12 */ 12 class WpModule implements ServiceModule, FactoryModule 13 class WpModule implements ServiceModule, FactoryModule, ExecutableModule 13 14 { 14 15 /** … … 46 47 return $this->factories; 47 48 } 49 public function run(ContainerInterface $container): bool 50 { 51 /** @var callable():void $addTransactionIdFieldSupport */ 52 $addTransactionIdFieldSupport = $container->get('wp.add_transaction_id_field_support'); 53 $addTransactionIdFieldSupport(); 54 /** @var callable():void $addPayoutIdFieldSupport */ 55 $addPayoutIdFieldSupport = $container->get('wp.add_payout_id_field_support'); 56 $addPayoutIdFieldSupport(); 57 return \true; 58 } 48 59 } -
payoneer-checkout/trunk/payoneer-checkout.php
r3305047 r3321269 4 4 * Plugin Name: Payoneer Checkout 5 5 * Description: Payoneer Checkout for WooCommerce 6 * Version: 3. 3.26 * Version: 3.4.0 7 7 * Author: Payoneer 8 8 * Requires at least: 5.4 9 9 * Tested up to: 6.8.1 10 10 * WC requires at least: 5.0 11 * WC tested up to: 9. 8.511 * WC tested up to: 9.9.4 12 12 * Requires PHP: 7.4 13 13 * Author URI: https://www.payoneer.com/ … … 15 15 * Text Domain: payoneer-checkout 16 16 * Domain Path: /languages 17 * SHA: c3df2a6bd5c2faed6d9174a79708db2f25e6284a17 * SHA: 6c1baa930ce70151a2d5664830e77b82cabc9a3b 18 18 */ 19 19 declare (strict_types=1); -
payoneer-checkout/trunk/vendor/autoload.php
r3305047 r3321269 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit 110142e4fa6f6a2d282d7cc0c0e60c1d::getLoader();22 return ComposerAutoloaderInitc969959659ee1e06936dad4bf64e751f::getLoader(); -
payoneer-checkout/trunk/vendor/composer/autoload_classmap.php
r3305047 r3321269 377 377 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\AbstractContext' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/AbstractContext.php', 378 378 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ApiListSessionProvider' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ApiListSessionProvider.php', 379 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\CheckoutContext' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/CheckoutContext.php',380 379 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ContextInterface' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ContextInterface.php', 381 380 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionManager' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionManager.php', 382 381 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionManagerProxy' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionManagerProxy.php', 383 382 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionMiddleware' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionMiddleware.php', 384 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionPersistor' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionPersistor.php',385 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionPersistorMiddleware' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionPersistorMiddleware.php',386 383 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionProvider' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionProvider.php', 387 384 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionProviderMiddleware' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionProviderMiddleware.php', 388 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\NoopListSessionPersistor' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/NoopListSessionPersistor.php',389 385 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\PaymentContext' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/PaymentContext.php', 390 386 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\Runner' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/ListSession/Runner.php', 387 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\FetchingMiddleware' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/Middleware/FetchingMiddleware.php', 388 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\IsProcessingTrait' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/Middleware/IsProcessingTrait.php', 389 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\ListCache' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/Middleware/ListCache.php', 390 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\ListCacheInterface' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/Middleware/ListCacheInterface.php', 391 391 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\UpdatingMiddleware' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/Middleware/UpdatingMiddleware.php', 392 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\ValidatingMiddleware' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/Middleware/ValidatingMiddleware.php',393 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\WcOrderMiddleware' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/Middleware/WcOrderMiddleware.php',394 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\WcSessionMiddleware' => $baseDir . '/modules/inpsyde/payoneer-list-session/src/Middleware/WcSessionMiddleware.php',395 392 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Migration\\MigrationModule' => $baseDir . '/modules/inpsyde/payoneer-migrator/src/MigrationModule.php', 396 393 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Migration\\Migrator' => $baseDir . '/modules/inpsyde/payoneer-migrator/src/Migrator.php', … … 436 433 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Settings\\Merchant\\SaveMerchantCommandInterface' => $baseDir . '/modules/inpsyde/payoneer-settings/src/Merchant/SaveMerchantCommandInterface.php', 437 434 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Settings\\SettingsModule' => $baseDir . '/modules/inpsyde/payoneer-settings/src/SettingsModule.php', 435 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\DbLogCollector' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/DbLogCollector.php', 436 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\FileLogCollector' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/FileLogCollector.php', 437 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\LegacyFileLogCollector' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LegacyFileLogCollector.php', 438 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\LogCollectorFactory' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LogCollectorFactory.php', 439 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\LogCollectorInterface' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LogCollectorInterface.php', 440 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\SystemReportCollector' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/SystemReportCollector.php', 441 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\SystemReportCollectorInterface' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/SystemReportCollectorInterface.php', 442 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\SystemReportDataDTO' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/SystemReportDataDTO.php', 443 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\SystemReportParamsDTO' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Data/SystemReportParamsDTO.php', 444 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Email\\SystemReportEmailSender' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Email/SystemReportEmailSender.php', 445 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Email\\SystemReportEmailSenderInterface' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Email/SystemReportEmailSenderInterface.php', 446 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Email\\SystemReportFormatter' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Email/SystemReportFormatter.php', 447 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Email\\SystemReportFormatterInterface' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Email/SystemReportFormatterInterface.php', 448 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Endpoint\\SystemReportEndpointController' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Endpoint/SystemReportEndpointController.php', 449 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Permission\\SystemReportPermissionHandler' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Permission/SystemReportPermissionHandler.php', 438 450 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Renderer' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/Renderer.php', 439 451 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\StatusReportModule' => $baseDir . '/modules/inpsyde/payoneer-status-report/src/StatusReportModule.php', … … 448 460 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\Controller\\WpRestApiControllerInterface' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/Controller/WpRestApiControllerInterface.php', 449 461 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\LogIncomingWebhookRequest' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/LogIncomingWebhookRequest.php', 450 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\AbstractOrderFinder' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/AbstractOrderFinder.php',451 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\AddTransactionIdFieldSupport' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/AddTransactionIdFieldSupport.php',452 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\HposOrderFinder' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/HposOrderFinder.php',453 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\OrderFinder' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/OrderFinder.php',454 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\OrderFinderInterface' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/OrderFinderInterface.php',455 462 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderPaymentWebhookHandler\\ChargeBackPaymentHandler' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderPaymentWebhookHandler/ChargeBackPaymentHandler.php', 456 463 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderPaymentWebhookHandler\\ChargedPaymentHandler' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderPaymentWebhookHandler/ChargedPaymentHandler.php', … … 461 468 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderWebhookFinder\\OrderWebhookFinder' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderWebhookFinder/OrderWebhookFinder.php', 462 469 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderWebhookFinder\\OrderWebhookFinderInterface' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/OrderWebhookFinder/OrderWebhookFinderInterface.php', 463 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\RefundFinder\\AddPayoutIdFieldSupport' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/RefundFinder/AddPayoutIdFieldSupport.php',464 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\RefundFinder\\RefundFinder' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/RefundFinder/RefundFinder.php',465 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\RefundFinder\\RefundFinderInterface' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/RefundFinder/RefundFinderInterface.php',466 470 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\WebhookEntities' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/WebhookEntities.php', 467 471 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\WebhooksModule' => $baseDir . '/modules/inpsyde/payoneer-webhooks/src/WebhooksModule.php', 468 472 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\LocaleProviderInterface' => $baseDir . '/modules/inpsyde/payoneer-wp/src/LocaleProviderInterface.php', 469 473 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\NormalizingLocaleProviderISO639ISO3166' => $baseDir . '/modules/inpsyde/payoneer-wp/src/NormalizingLocaleProviderISO639ISO3166.php', 474 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\AbstractOrderFinder' => $baseDir . '/modules/inpsyde/payoneer-wp/src/OrderFinder/AbstractOrderFinder.php', 475 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\AddTransactionIdFieldSupport' => $baseDir . '/modules/inpsyde/payoneer-wp/src/OrderFinder/AddTransactionIdFieldSupport.php', 476 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\HposOrderFinder' => $baseDir . '/modules/inpsyde/payoneer-wp/src/OrderFinder/HposOrderFinder.php', 477 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\OrderFinder' => $baseDir . '/modules/inpsyde/payoneer-wp/src/OrderFinder/OrderFinder.php', 478 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\OrderFinderInterface' => $baseDir . '/modules/inpsyde/payoneer-wp/src/OrderFinder/OrderFinderInterface.php', 479 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\RefundFinder\\AddPayoutIdFieldSupport' => $baseDir . '/modules/inpsyde/payoneer-wp/src/RefundFinder/AddPayoutIdFieldSupport.php', 480 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\RefundFinder\\RefundFinder' => $baseDir . '/modules/inpsyde/payoneer-wp/src/RefundFinder/RefundFinder.php', 481 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\RefundFinder\\RefundFinderInterface' => $baseDir . '/modules/inpsyde/payoneer-wp/src/RefundFinder/RefundFinderInterface.php', 470 482 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\WpModule' => $baseDir . '/modules/inpsyde/payoneer-wp/src/WpModule.php', 471 483 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\ApiException' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/ApiException.php', … … 591 603 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\Phone\\PhoneSerializer' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/Phone/PhoneSerializer.php', 592 604 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\Phone\\PhoneSerializerInterface' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/Phone/PhoneSerializerInterface.php', 593 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModel' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModel.php',594 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelDeserializer' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelDeserializer.php',595 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelDeserializerInterface' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelDeserializerInterface.php',596 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelFactory' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelFactory.php',597 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelFactoryInterface' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelFactoryInterface.php',598 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelInterface' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelInterface.php',599 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelSerializer' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelSerializer.php',600 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelSerializerInterface' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelSerializerInterface.php',601 605 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\Product\\Product' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/Product/Product.php', 602 606 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\Product\\ProductDeserializer' => $baseDir . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/Product/ProductDeserializer.php', -
payoneer-checkout/trunk/vendor/composer/autoload_real.php
r3305047 r3321269 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 110142e4fa6f6a2d282d7cc0c0e60c1d5 class ComposerAutoloaderInitc969959659ee1e06936dad4bf64e751f 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 110142e4fa6f6a2d282d7cc0c0e60c1d', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInitc969959659ee1e06936dad4bf64e751f', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 110142e4fa6f6a2d282d7cc0c0e60c1d', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInitc969959659ee1e06936dad4bf64e751f', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 110142e4fa6f6a2d282d7cc0c0e60c1d::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInitc969959659ee1e06936dad4bf64e751f::getInitializer($loader)); 33 33 34 34 $loader->register(true); 35 35 36 $filesToLoad = \Composer\Autoload\ComposerStaticInit 110142e4fa6f6a2d282d7cc0c0e60c1d::$files;36 $filesToLoad = \Composer\Autoload\ComposerStaticInitc969959659ee1e06936dad4bf64e751f::$files; 37 37 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 38 if (empty($GLOBALS['__composer_autoload_files_ c3df2a6bd5c2faed6d9174a79708db2f25e6284a'][$fileIdentifier])) {39 $GLOBALS['__composer_autoload_files_ c3df2a6bd5c2faed6d9174a79708db2f25e6284a'][$fileIdentifier] = true;38 if (empty($GLOBALS['__composer_autoload_files_6c1baa930ce70151a2d5664830e77b82cabc9a3b'][$fileIdentifier])) { 39 $GLOBALS['__composer_autoload_files_6c1baa930ce70151a2d5664830e77b82cabc9a3b'][$fileIdentifier] = true; 40 40 41 41 require $file; -
payoneer-checkout/trunk/vendor/composer/autoload_static.php
r3305047 r3321269 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 110142e4fa6f6a2d282d7cc0c0e60c1d7 class ComposerStaticInitc969959659ee1e06936dad4bf64e751f 8 8 { 9 9 public static $files = array ( … … 611 611 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\AbstractContext' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/AbstractContext.php', 612 612 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ApiListSessionProvider' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ApiListSessionProvider.php', 613 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\CheckoutContext' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/CheckoutContext.php',614 613 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ContextInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ContextInterface.php', 615 614 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionManager' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionManager.php', 616 615 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionManagerProxy' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionManagerProxy.php', 617 616 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionMiddleware' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionMiddleware.php', 618 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionPersistor' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionPersistor.php',619 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionPersistorMiddleware' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionPersistorMiddleware.php',620 617 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionProvider' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionProvider.php', 621 618 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\ListSessionProviderMiddleware' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/ListSessionProviderMiddleware.php', 622 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\NoopListSessionPersistor' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/NoopListSessionPersistor.php',623 619 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\PaymentContext' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/PaymentContext.php', 624 620 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\ListSession\\Runner' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/ListSession/Runner.php', 621 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\FetchingMiddleware' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/Middleware/FetchingMiddleware.php', 622 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\IsProcessingTrait' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/Middleware/IsProcessingTrait.php', 623 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\ListCache' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/Middleware/ListCache.php', 624 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\ListCacheInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/Middleware/ListCacheInterface.php', 625 625 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\UpdatingMiddleware' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/Middleware/UpdatingMiddleware.php', 626 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\ValidatingMiddleware' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/Middleware/ValidatingMiddleware.php',627 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\WcOrderMiddleware' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/Middleware/WcOrderMiddleware.php',628 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\ListSession\\Middleware\\WcSessionMiddleware' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-list-session/src/Middleware/WcSessionMiddleware.php',629 626 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Migration\\MigrationModule' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-migrator/src/MigrationModule.php', 630 627 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Migration\\Migrator' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-migrator/src/Migrator.php', … … 670 667 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Settings\\Merchant\\SaveMerchantCommandInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-settings/src/Merchant/SaveMerchantCommandInterface.php', 671 668 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Settings\\SettingsModule' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-settings/src/SettingsModule.php', 669 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\DbLogCollector' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/DbLogCollector.php', 670 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\FileLogCollector' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/FileLogCollector.php', 671 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\LegacyFileLogCollector' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LegacyFileLogCollector.php', 672 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\LogCollectorFactory' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LogCollectorFactory.php', 673 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\LogCollector\\LogCollectorInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/LogCollector/LogCollectorInterface.php', 674 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\SystemReportCollector' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/SystemReportCollector.php', 675 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\SystemReportCollectorInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/SystemReportCollectorInterface.php', 676 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\SystemReportDataDTO' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/SystemReportDataDTO.php', 677 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Data\\SystemReportParamsDTO' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Data/SystemReportParamsDTO.php', 678 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Email\\SystemReportEmailSender' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Email/SystemReportEmailSender.php', 679 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Email\\SystemReportEmailSenderInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Email/SystemReportEmailSenderInterface.php', 680 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Email\\SystemReportFormatter' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Email/SystemReportFormatter.php', 681 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Email\\SystemReportFormatterInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Email/SystemReportFormatterInterface.php', 682 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Endpoint\\SystemReportEndpointController' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Endpoint/SystemReportEndpointController.php', 683 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Permission\\SystemReportPermissionHandler' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Permission/SystemReportPermissionHandler.php', 672 684 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\Renderer' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/Renderer.php', 673 685 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\StatusReport\\StatusReportModule' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-status-report/src/StatusReportModule.php', … … 682 694 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\Controller\\WpRestApiControllerInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/Controller/WpRestApiControllerInterface.php', 683 695 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\LogIncomingWebhookRequest' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/LogIncomingWebhookRequest.php', 684 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\AbstractOrderFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/AbstractOrderFinder.php',685 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\AddTransactionIdFieldSupport' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/AddTransactionIdFieldSupport.php',686 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\HposOrderFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/HposOrderFinder.php',687 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\OrderFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/OrderFinder.php',688 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderFinder\\OrderFinderInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderFinder/OrderFinderInterface.php',689 696 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderPaymentWebhookHandler\\ChargeBackPaymentHandler' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderPaymentWebhookHandler/ChargeBackPaymentHandler.php', 690 697 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderPaymentWebhookHandler\\ChargedPaymentHandler' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderPaymentWebhookHandler/ChargedPaymentHandler.php', … … 695 702 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderWebhookFinder\\OrderWebhookFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderWebhookFinder/OrderWebhookFinder.php', 696 703 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\OrderWebhookFinder\\OrderWebhookFinderInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/OrderWebhookFinder/OrderWebhookFinderInterface.php', 697 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\RefundFinder\\AddPayoutIdFieldSupport' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/RefundFinder/AddPayoutIdFieldSupport.php',698 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\RefundFinder\\RefundFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/RefundFinder/RefundFinder.php',699 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\RefundFinder\\RefundFinderInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/RefundFinder/RefundFinderInterface.php',700 704 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\WebhookEntities' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/WebhookEntities.php', 701 705 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Webhooks\\WebhooksModule' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-webhooks/src/WebhooksModule.php', 702 706 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\LocaleProviderInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/LocaleProviderInterface.php', 703 707 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\NormalizingLocaleProviderISO639ISO3166' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/NormalizingLocaleProviderISO639ISO3166.php', 708 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\AbstractOrderFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/OrderFinder/AbstractOrderFinder.php', 709 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\AddTransactionIdFieldSupport' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/OrderFinder/AddTransactionIdFieldSupport.php', 710 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\HposOrderFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/OrderFinder/HposOrderFinder.php', 711 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\OrderFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/OrderFinder/OrderFinder.php', 712 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\OrderFinder\\OrderFinderInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/OrderFinder/OrderFinderInterface.php', 713 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\RefundFinder\\AddPayoutIdFieldSupport' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/RefundFinder/AddPayoutIdFieldSupport.php', 714 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\RefundFinder\\RefundFinder' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/RefundFinder/RefundFinder.php', 715 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\RefundFinder\\RefundFinderInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/RefundFinder/RefundFinderInterface.php', 704 716 'Syde\\Vendor\\Inpsyde\\PayoneerForWoocommerce\\Wp\\WpModule' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-wp/src/WpModule.php', 705 717 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\ApiException' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/ApiException.php', … … 825 837 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\Phone\\PhoneSerializer' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/Phone/PhoneSerializer.php', 826 838 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\Phone\\PhoneSerializerInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/Phone/PhoneSerializerInterface.php', 827 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModel' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModel.php',828 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelDeserializer' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelDeserializer.php',829 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelDeserializerInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelDeserializerInterface.php',830 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelFactory' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelFactory.php',831 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelFactoryInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelFactoryInterface.php',832 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelInterface.php',833 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelSerializer' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelSerializer.php',834 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\ProcessingModel\\ProcessingModelSerializerInterface' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/ProcessingModel/ProcessingModelSerializerInterface.php',835 839 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\Product\\Product' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/Product/Product.php', 836 840 'Syde\\Vendor\\Inpsyde\\PayoneerSdk\\Api\\Entities\\Product\\ProductDeserializer' => __DIR__ . '/../..' . '/modules/inpsyde/payoneer-sdk/src/Api/Entities/Product/ProductDeserializer.php', … … 970 974 { 971 975 return \Closure::bind(function () use ($loader) { 972 $loader->prefixLengthsPsr4 = ComposerStaticInit 110142e4fa6f6a2d282d7cc0c0e60c1d::$prefixLengthsPsr4;973 $loader->prefixDirsPsr4 = ComposerStaticInit 110142e4fa6f6a2d282d7cc0c0e60c1d::$prefixDirsPsr4;974 $loader->classMap = ComposerStaticInit 110142e4fa6f6a2d282d7cc0c0e60c1d::$classMap;976 $loader->prefixLengthsPsr4 = ComposerStaticInitc969959659ee1e06936dad4bf64e751f::$prefixLengthsPsr4; 977 $loader->prefixDirsPsr4 = ComposerStaticInitc969959659ee1e06936dad4bf64e751f::$prefixDirsPsr4; 978 $loader->classMap = ComposerStaticInitc969959659ee1e06936dad4bf64e751f::$classMap; 975 979 976 980 }, null, ClassLoader::class); -
payoneer-checkout/trunk/vendor/composer/installed.json
r3260742 r3321269 781 781 { 782 782 "name": "inpsyde\/modularity", 783 "version": "1.1 1.0",784 "version_normalized": "1.1 1.0.0",783 "version": "1.12.0", 784 "version_normalized": "1.12.0.0", 785 785 "source": { 786 786 "type": "git", 787 787 "url": "https:\/\/github.com\/inpsyde\/modularity.git", 788 "reference": " c79bb3682f55e1a2ece67f36e70d04fa2ab8c65d"788 "reference": "e1ca1c81b7b663355906b586525d21ac5d46bc65" 789 789 }, 790 790 "dist": { 791 791 "type": "zip", 792 "url": "https:\/\/api.github.com\/repos\/inpsyde\/modularity\/zipball\/ c79bb3682f55e1a2ece67f36e70d04fa2ab8c65d",793 "reference": " c79bb3682f55e1a2ece67f36e70d04fa2ab8c65d",792 "url": "https:\/\/api.github.com\/repos\/inpsyde\/modularity\/zipball\/e1ca1c81b7b663355906b586525d21ac5d46bc65", 793 "reference": "e1ca1c81b7b663355906b586525d21ac5d46bc65", 794 794 "shasum": "", 795 795 "mirrors": [ … … 802 802 "require": { 803 803 "ext-json": "*", 804 "php": ">=7.4 <8.4",804 "php": ">=7.4", 805 805 "psr\/container": "^1.1.0 || ^2" 806 806 }, 807 807 "require-dev": { 808 808 "brain\/monkey": "^2.6.1", 809 "inpsyde\/php-coding-standards": "^2@dev", 810 "inpsyde\/wp-stubs-versions": "dev-latest", 809 "inpsyde\/wp-stubs-versions": "6.7", 811 810 "mikey179\/vfsstream": "^v1.6.11", 811 "phpstan\/phpstan": "^2.1.1", 812 "phpstan\/phpstan-deprecation-rules": "^2.0.1", 813 "phpstan\/phpstan-mockery": "^2.0.0", 814 "phpstan\/phpstan-phpunit": "^2.0.4", 812 815 "phpunit\/phpunit": "^9.6.19", 813 " roots\/wordpress-no-content": "@dev",814 " vimeo\/psalm": "^5.24.0"815 }, 816 "time": "202 4-11-28T09:34:00+00:00",816 "swissspidy\/phpstan-no-private": "^v1.0.0", 817 "syde\/phpcs": "^1.0.0" 818 }, 819 "time": "2025-05-09T12:13:17+00:00", 817 820 "type": "library", 818 821 "extra": { … … 842 845 "support": { 843 846 "issues": "https:\/\/github.com\/inpsyde\/modularity\/issues", 844 "source": "https:\/\/github.com\/inpsyde\/modularity\/tree\/1.1 1.0"847 "source": "https:\/\/github.com\/inpsyde\/modularity\/tree\/1.12.0" 845 848 }, 846 849 "install-path": "..\/inpsyde\/modularity" … … 848 851 { 849 852 "name": "inpsyde\/payment-gateway", 850 "version": "2. 4.1",851 "version_normalized": "2. 4.1.0",853 "version": "2.7.1", 854 "version_normalized": "2.7.1.0", 852 855 "source": { 853 856 "type": "git", 854 857 "url": "git@github.com:inpsyde\/payment-gateway.git", 855 "reference": " 48be2bbdb6c0056d587cc13b65acc375cb40ad32"858 "reference": "00260a21acbe2614e9ddcef5e0182b4dbbb3011b" 856 859 }, 857 860 "dist": { 858 861 "type": "zip", 859 "url": "https:\/\/api.github.com\/repos\/inpsyde\/payment-gateway\/zipball\/ 48be2bbdb6c0056d587cc13b65acc375cb40ad32",860 "reference": " 48be2bbdb6c0056d587cc13b65acc375cb40ad32",862 "url": "https:\/\/api.github.com\/repos\/inpsyde\/payment-gateway\/zipball\/00260a21acbe2614e9ddcef5e0182b4dbbb3011b", 863 "reference": "00260a21acbe2614e9ddcef5e0182b4dbbb3011b", 861 864 "shasum": "", 862 865 "mirrors": [ … … 884 887 "vimeo\/psalm": "^4.3" 885 888 }, 886 "time": "2025-0 2-26T20:08:41+00:00",889 "time": "2025-06-20T14:31:21+00:00", 887 890 "type": "inpsyde-module", 888 891 "extra": { … … 973 976 ], 974 977 "support": { 975 "source": "https:\/\/github.com\/inpsyde\/payment-gateway\/tree\/2. 4.1",978 "source": "https:\/\/github.com\/inpsyde\/payment-gateway\/tree\/2.7.1", 976 979 "issues": "https:\/\/github.com\/inpsyde\/payment-gateway\/issues" 977 980 }, … … 980 983 { 981 984 "name": "inpsyde\/payoneer-admin-banner", 982 "version": "dev- release\/3.3.0",983 "version_normalized": "dev- release\/3.3.0",985 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 986 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 984 987 "dist": { 985 988 "type": "path", … … 1032 1035 { 1033 1036 "name": "inpsyde\/payoneer-analytics", 1034 "version": "dev- release\/3.3.0",1035 "version_normalized": "dev- release\/3.3.0",1037 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1038 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1036 1039 "dist": { 1037 1040 "type": "path", … … 1081 1084 { 1082 1085 "name": "inpsyde\/payoneer-api", 1083 "version": "dev- release\/3.3.0",1084 "version_normalized": "dev- release\/3.3.0",1086 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1087 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1085 1088 "dist": { 1086 1089 "type": "path", … … 1130 1133 { 1131 1134 "name": "inpsyde\/payoneer-embedded-payment", 1132 "version": "dev- release\/3.3.0",1133 "version_normalized": "dev- release\/3.3.0",1135 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1136 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1134 1137 "dist": { 1135 1138 "type": "path", … … 1184 1187 { 1185 1188 "name": "inpsyde\/payoneer-hosted-payment", 1186 "version": "dev- release\/3.3.0",1187 "version_normalized": "dev- release\/3.3.0",1189 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1190 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1188 1191 "dist": { 1189 1192 "type": "path", … … 1237 1240 { 1238 1241 "name": "inpsyde\/payoneer-list-session", 1239 "version": "dev- release\/3.3.0",1240 "version_normalized": "dev- release\/3.3.0",1242 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1243 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1241 1244 "dist": { 1242 1245 "type": "path", … … 1279 1282 { 1280 1283 "name": "inpsyde\/payoneer-migrator", 1281 "version": "dev- release\/3.3.0",1282 "version_normalized": "dev- release\/3.3.0",1284 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1285 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1283 1286 "dist": { 1284 1287 "type": "path", … … 1327 1330 { 1328 1331 "name": "inpsyde\/payoneer-page-detector", 1329 "version": "dev- release\/3.3.0",1330 "version_normalized": "dev- release\/3.3.0",1332 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1333 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1331 1334 "dist": { 1332 1335 "type": "path", … … 1375 1378 { 1376 1379 "name": "inpsyde\/payoneer-payment-gateway-checkout", 1377 "version": "dev- release\/3.3.0",1378 "version_normalized": "dev- release\/3.3.0",1380 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1381 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1379 1382 "dist": { 1380 1383 "type": "path", … … 1426 1429 { 1427 1430 "name": "inpsyde\/payoneer-payment-methods", 1428 "version": "dev- release\/3.3.0",1429 "version_normalized": "dev- release\/3.3.0",1431 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1432 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1430 1433 "dist": { 1431 1434 "type": "path", … … 1477 1480 { 1478 1481 "name": "inpsyde\/payoneer-sdk", 1479 "version": "v 3.0.1",1480 "version_normalized": " 3.0.1.0",1482 "version": "v4.1.0", 1483 "version_normalized": "4.1.0.0", 1481 1484 "source": { 1482 1485 "type": "git", 1483 1486 "url": "git@github.com:inpsyde\/payoneer-sdk.git", 1484 "reference": " 98b31667d643446cddd0bf3a1f623c133bef2cd0"1487 "reference": "096f3db439f7d77bef2d165dbecd406cc4210550" 1485 1488 }, 1486 1489 "dist": { 1487 1490 "type": "zip", 1488 "url": "https:\/\/api.github.com\/repos\/inpsyde\/payoneer-sdk\/zipball\/ 98b31667d643446cddd0bf3a1f623c133bef2cd0",1489 "reference": " 98b31667d643446cddd0bf3a1f623c133bef2cd0",1491 "url": "https:\/\/api.github.com\/repos\/inpsyde\/payoneer-sdk\/zipball\/096f3db439f7d77bef2d165dbecd406cc4210550", 1492 "reference": "096f3db439f7d77bef2d165dbecd406cc4210550", 1490 1493 "shasum": "", 1491 1494 "mirrors": [ … … 1524 1527 "webmozart\/path-util": "^2.3@stable" 1525 1528 }, 1526 "time": "2025-0 1-23T10:46:21+00:00",1529 "time": "2025-06-23T07:27:08+00:00", 1527 1530 "type": "inpsyde-module", 1528 1531 "installation-source": "dist", … … 1539 1542 "notification-url": "https:\/\/repo.packagist.com\/inpsyde\/downloads\/", 1540 1543 "license": [ 1541 "MIT" 1542 ], 1543 "authors": [ 1544 { 1545 "name": "Inpsyde", 1546 "email": "hello@inpsyde.com" 1544 "GPL-2.0-or-later" 1545 ], 1546 "authors": [ 1547 { 1548 "name": "Syde GmbH", 1549 "homepage": "https:\/\/syde.com\/", 1550 "email": "hello@syde.com", 1551 "role": "Company" 1547 1552 } 1548 1553 ], 1549 1554 "description": "Payoneer SDK module for inpsyde\/modularity.", 1550 1555 "support": { 1551 "source": "https:\/\/github.com\/inpsyde\/payoneer-sdk\/tree\/v 3.0.1",1556 "source": "https:\/\/github.com\/inpsyde\/payoneer-sdk\/tree\/v4.1.0", 1552 1557 "issues": "https:\/\/github.com\/inpsyde\/payoneer-sdk\/issues" 1553 1558 }, … … 1556 1561 { 1557 1562 "name": "inpsyde\/payoneer-settings", 1558 "version": "dev- release\/3.3.0",1559 "version_normalized": "dev- release\/3.3.0",1563 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1564 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1560 1565 "dist": { 1561 1566 "type": "path", … … 1605 1610 { 1606 1611 "name": "inpsyde\/payoneer-status-report", 1607 "version": "dev- release\/3.3.0",1608 "version_normalized": "dev- release\/3.3.0",1612 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1613 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1609 1614 "dist": { 1610 1615 "type": "path", … … 1652 1657 { 1653 1658 "name": "inpsyde\/payoneer-third-party-compat", 1654 "version": "dev- release\/3.3.0",1655 "version_normalized": "dev- release\/3.3.0",1659 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1660 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1656 1661 "dist": { 1657 1662 "type": "path", … … 1692 1697 { 1693 1698 "name": "inpsyde\/payoneer-webhooks", 1694 "version": "dev- release\/3.3.0",1695 "version_normalized": "dev- release\/3.3.0",1699 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1700 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1696 1701 "dist": { 1697 1702 "type": "path", … … 1745 1750 { 1746 1751 "name": "inpsyde\/payoneer-websdk", 1747 "version": "dev- release\/3.3.0",1748 "version_normalized": "dev- release\/3.3.0",1752 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1753 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1749 1754 "dist": { 1750 1755 "type": "path", … … 1795 1800 { 1796 1801 "name": "inpsyde\/payoneer-wp", 1797 "version": "dev- release\/3.3.0",1798 "version_normalized": "dev- release\/3.3.0",1802 "version": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1803 "version_normalized": "dev-fix\/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site", 1799 1804 "dist": { 1800 1805 "type": "path", … … 2606 2611 { 2607 2612 "name": "sniccowp\/php-scoper-wordpress-excludes", 2608 "version": "6. 7.2",2609 "version_normalized": "6. 7.2.0",2613 "version": "6.8.1", 2614 "version_normalized": "6.8.1.0", 2610 2615 "source": { 2611 2616 "type": "git", 2612 2617 "url": "https:\/\/github.com\/snicco\/php-scoper-wordpress-excludes.git", 2613 "reference": " 1e65b207d6f4753904774430ccfc06cb6bfa486e"2618 "reference": "c2c18f89a9aa2d7ef1998d233b9ed00d0deff5dd" 2614 2619 }, 2615 2620 "dist": { 2616 2621 "type": "zip", 2617 "url": "https:\/\/api.github.com\/repos\/snicco\/php-scoper-wordpress-excludes\/zipball\/ 1e65b207d6f4753904774430ccfc06cb6bfa486e",2618 "reference": " 1e65b207d6f4753904774430ccfc06cb6bfa486e",2622 "url": "https:\/\/api.github.com\/repos\/snicco\/php-scoper-wordpress-excludes\/zipball\/c2c18f89a9aa2d7ef1998d233b9ed00d0deff5dd", 2623 "reference": "c2c18f89a9aa2d7ef1998d233b9ed00d0deff5dd", 2619 2624 "shasum": "", 2620 2625 "mirrors": [ … … 2628 2633 "php": "^7.4", 2629 2634 "php-stubs\/wordpress-globals": "0.2.0", 2630 "php-stubs\/wordpress-stubs": "6. 7.2",2635 "php-stubs\/wordpress-stubs": "6.8.1", 2631 2636 "sniccowp\/php-scoper-excludes": "dev-master" 2632 2637 }, 2633 "time": "2025-0 2-06T00:29:24+00:00",2638 "time": "2025-05-03T00:01:53+00:00", 2634 2639 "type": "library", 2635 2640 "installation-source": "dist", … … 2656 2661 "support": { 2657 2662 "issues": "https:\/\/github.com\/snicco\/php-scoper-wordpress-excludes\/issues", 2658 "source": "https:\/\/github.com\/snicco\/php-scoper-wordpress-excludes\/tree\/6. 7.2"2663 "source": "https:\/\/github.com\/snicco\/php-scoper-wordpress-excludes\/tree\/6.8.1" 2659 2664 }, 2660 2665 "install-path": "..\/sniccowp\/php-scoper-wordpress-excludes" … … 2662 2667 { 2663 2668 "name": "symfony\/polyfill-php80", 2664 "version": "v1.3 1.0",2665 "version_normalized": "1.3 1.0.0",2669 "version": "v1.32.0", 2670 "version_normalized": "1.32.0.0", 2666 2671 "source": { 2667 2672 "type": "git", 2668 2673 "url": "https:\/\/github.com\/symfony\/polyfill-php80.git", 2669 "reference": " 60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"2674 "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" 2670 2675 }, 2671 2676 "dist": { 2672 2677 "type": "zip", 2673 "url": "https:\/\/api.github.com\/repos\/symfony\/polyfill-php80\/zipball\/ 60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",2674 "reference": " 60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",2678 "url": "https:\/\/api.github.com\/repos\/symfony\/polyfill-php80\/zipball\/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", 2679 "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", 2675 2680 "shasum": "", 2676 2681 "mirrors": [ … … 2684 2689 "php": ">=7.2" 2685 2690 }, 2686 "time": "202 4-09-09T11:45:10+00:00",2691 "time": "2025-01-02T08:10:11+00:00", 2687 2692 "type": "library", 2688 2693 "extra": { 2689 2694 "thanks": { 2690 " name": "symfony\/polyfill",2691 " url": "https:\/\/github.com\/symfony\/polyfill"2695 "url": "https:\/\/github.com\/symfony\/polyfill", 2696 "name": "symfony\/polyfill" 2692 2697 } 2693 2698 }, … … 2731 2736 ], 2732 2737 "support": { 2733 "source": "https:\/\/github.com\/symfony\/polyfill-php80\/tree\/v1.3 1.0"2738 "source": "https:\/\/github.com\/symfony\/polyfill-php80\/tree\/v1.32.0" 2734 2739 }, 2735 2740 "funding": [ -
payoneer-checkout/trunk/vendor/composer/installed.php
r3305047 r3321269 3 3 namespace Syde\Vendor; 4 4 5 return array('root' => array('name' => 'inpsyde/payoneer-checkout', 'pretty_version' => 'dev-release/3. 3.2', 'version' => 'dev-release/3.3.2', 'reference' => 'c3df2a6bd5c2faed6d9174a79708db2f25e6284a', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('composer/installers' => array('pretty_version' => 'v2.3.0', 'version' => '2.3.0.0', 'reference' => '12fb2dfe5e16183de69e784a7b84046c43d97e8e', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), 'dev_requirement' => \false), 'container-interop/service-provider' => array('pretty_version' => 'v0.4.1', 'version' => '0.4.1.0', 'reference' => 'e04441ca21ef03e10dce70b0af29269281eec6dc', 'type' => 'library', 'install_path' => __DIR__ . '/../container-interop/service-provider', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/collections-interface' => array('pretty_version' => 'v0.3.0', 'version' => '0.3.0.0', 'reference' => '74464a969b340d16889eacd9eadc9817f7e7f47a', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/collections-interface', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/containers' => array('pretty_version' => 'v0.1.5', 'version' => '0.1.5.0', 'reference' => '1568cb2def9dee213c5846c4618f9d6b2cebbdef', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/containers', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/package-interface' => array('pretty_version' => 'v0.1.0-alpha4', 'version' => '0.1.0.0-alpha4', 'reference' => 'bcc73f4285eead9b482dbb89662b723abf49298b', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/package-interface', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/services' => array('pretty_version' => 'v0.1.1-alpha3', 'version' => '0.1.1.0-alpha3', 'reference' => '1a17b6b2cb2fdef0c0b541c8992188d9740746ce', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/services', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/validation-interface' => array('pretty_version' => 'v0.3.0-alpha3', 'version' => '0.3.0.0-alpha3', 'reference' => '0e73c7bf3d2421ceb79331c60a9bc1b1d5eb65a6', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/validation-interface', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/validator' => array('pretty_version' => 'v0.1.0-alpha1', 'version' => '0.1.0.0-alpha1', 'reference' => 'e10fba08398e33e123ada3d5fe0d147a72525cc2', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/validator', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/versions' => array('pretty_version' => 'v0.1.0-alpha3', 'version' => '0.1.0.0-alpha3', 'reference' => '120b22b248d0b46e41bac93bf3394516c9d55730', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/versions', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/assets' => array('pretty_version' => '2.9.0', 'version' => '2.9.0.0', 'reference' => '2b2d2ac359383e24284388bf54a6ff4f122d3c67', 'type' => 'library', 'install_path' => __DIR__ . '/../inpsyde/assets', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/logger' => array('pretty_version' => 'v1.4.0', 'version' => '1.4.0.0', 'reference' => 'ea22ad6862a771239e02d2a33b4fafb095dc4e30', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/logger', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/modularity' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => 'c79bb3682f55e1a2ece67f36e70d04fa2ab8c65d', 'type' => 'library', 'install_path' => __DIR__ . '/../inpsyde/modularity', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payment-gateway' => array('pretty_version' => '2.4.1', 'version' => '2.4.1.0', 'reference' => '48be2bbdb6c0056d587cc13b65acc375cb40ad32', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payment-gateway', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-admin-banner' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '9fbfb5ad20c6f3eded0540fa088393a6f5ba01a2', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-admin-banner', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-analytics' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => 'cea259f74a42805a8c8c824975ecf7ebd4d6854c', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-analytics', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-api' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '3141a286544a5828ba411f19187ecbc0776d1198', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-api', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-checkout' => array('pretty_version' => 'dev-release/3.3.2', 'version' => 'dev-release/3.3.2', 'reference' => 'c3df2a6bd5c2faed6d9174a79708db2f25e6284a', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-embedded-payment' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '6ce354bfcb78e98026dc6c5b152b4e0b13af1ae0', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-embedded-payment', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-hosted-payment' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '786b9784805e8830d240d21f8ea93bbc2a4818e3', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-hosted-payment', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-list-session' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '76755c87c3df513673d5b74ca3877e66f07abda4', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-list-session', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-migrator' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => 'fa868f933c3e348befcfaf459735e300ca7b5350', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-migrator', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-page-detector' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '0a3c51c69790735837a4e7884d74cd0656f6fe99', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-page-detector', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-payment-gateway-checkout' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '9db2a7daa57ba440f50de2e0345faa3d8db5babe', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-payment-gateway-checkout', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-payment-methods' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '5ce35ddeeb2f88faea898b97d6ebc2988874eb84', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-payment-methods', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-sdk' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'reference' => '98b31667d643446cddd0bf3a1f623c133bef2cd0', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-sdk', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-settings' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => 'cb601f00438927dad370ce92c403744c8fa35cf7', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-settings', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-status-report' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '78bc7cf91e905f1d99ca13478d4af2842796c328', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-status-report', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-third-party-compat' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => 'cd3262cd2bac6f6d5b253abf0edda9051a1cedd5', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-third-party-compat', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-webhooks' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => '3e8c63f9a746abfc79234e7ad85d4e58790b6276', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-webhooks', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-websdk' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => 'fd04181b18ca9ef28d66c267bcbcbe1991105e07', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-websdk', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-wp' => array('pretty_version' => 'dev-release/3.3.0', 'version' => 'dev-release/3.3.0', 'reference' => 'f6967b69c11ee362a2c20e7c240f4fe5f2cf5d0f', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-wp', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/psr-18-wp-http-client' => array('pretty_version' => 'v0.1.0-alpha4', 'version' => '0.1.0.0-alpha4', 'reference' => '8dd172262c95fc3fb4716b14a54c9406254ba441', 'type' => 'library', 'install_path' => __DIR__ . '/../inpsyde/psr-18-wp-http-client', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/wp-context' => array('pretty_version' => '1.5.1', 'version' => '1.5.1.0', 'reference' => '1350ada72517f5d374bff9409b4ea5a02377ec1a', 'type' => 'library', 'install_path' => __DIR__ . '/../inpsyde/wp-context', 'aliases' => array(), 'dev_requirement' => \false), 'nyholm/psr7' => array('pretty_version' => '1.8.2', 'version' => '1.8.2.0', 'reference' => 'a71f2b11690f4b24d099d6b16690a90ae14fc6f3', 'type' => 'library', 'install_path' => __DIR__ . '/../nyholm/psr7', 'aliases' => array(), 'dev_requirement' => \false), 'oomphinc/composer-installers-extender' => array('pretty_version' => '2.0.1', 'version' => '2.0.1.0', 'reference' => 'cbf4b6f9a24153b785d09eee755b995ba87bd5f9', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../oomphinc/composer-installers-extender', 'aliases' => array(), 'dev_requirement' => \false), 'php-http/message-factory-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/container' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-client' => array('pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '^1.0')), 'psr/http-factory' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-factory-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '1.1', 'version' => '1.1.0.0', 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-server-handler' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'reference' => '84c4fb66179be4caaf8e97bd239203245302e7d4', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-server-handler', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-server-middleware' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'reference' => 'c1481f747daaa6a0782775cd6a8c26a1bf4a3829', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-server-middleware', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'sniccowp/php-scoper-wordpress-excludes' => array('pretty_version' => '6.7.2', 'version' => '6.7.2.0', 'reference' => '1e65b207d6f4753904774430ccfc06cb6bfa486e', 'type' => 'library', 'install_path' => __DIR__ . '/../sniccowp/php-scoper-wordpress-excludes', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '60328e362d4c2c802a54fcbf04f9d3fb892b4cf8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => \false), 'wp-oop/containers' => array('pretty_version' => 'v0.1.1-alpha3', 'version' => '0.1.1.0-alpha3', 'reference' => '01f52a9bb347e28aa25e80bd777d6e8b56451d9e', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-oop/containers', 'aliases' => array(), 'dev_requirement' => \false)));5 return array('root' => array('name' => 'inpsyde/payoneer-checkout', 'pretty_version' => 'dev-release/3.4.0', 'version' => 'dev-release/3.4.0', 'reference' => '6c1baa930ce70151a2d5664830e77b82cabc9a3b', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('composer/installers' => array('pretty_version' => 'v2.3.0', 'version' => '2.3.0.0', 'reference' => '12fb2dfe5e16183de69e784a7b84046c43d97e8e', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), 'dev_requirement' => \false), 'container-interop/service-provider' => array('pretty_version' => 'v0.4.1', 'version' => '0.4.1.0', 'reference' => 'e04441ca21ef03e10dce70b0af29269281eec6dc', 'type' => 'library', 'install_path' => __DIR__ . '/../container-interop/service-provider', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/collections-interface' => array('pretty_version' => 'v0.3.0', 'version' => '0.3.0.0', 'reference' => '74464a969b340d16889eacd9eadc9817f7e7f47a', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/collections-interface', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/containers' => array('pretty_version' => 'v0.1.5', 'version' => '0.1.5.0', 'reference' => '1568cb2def9dee213c5846c4618f9d6b2cebbdef', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/containers', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/package-interface' => array('pretty_version' => 'v0.1.0-alpha4', 'version' => '0.1.0.0-alpha4', 'reference' => 'bcc73f4285eead9b482dbb89662b723abf49298b', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/package-interface', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/services' => array('pretty_version' => 'v0.1.1-alpha3', 'version' => '0.1.1.0-alpha3', 'reference' => '1a17b6b2cb2fdef0c0b541c8992188d9740746ce', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/services', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/validation-interface' => array('pretty_version' => 'v0.3.0-alpha3', 'version' => '0.3.0.0-alpha3', 'reference' => '0e73c7bf3d2421ceb79331c60a9bc1b1d5eb65a6', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/validation-interface', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/validator' => array('pretty_version' => 'v0.1.0-alpha1', 'version' => '0.1.0.0-alpha1', 'reference' => 'e10fba08398e33e123ada3d5fe0d147a72525cc2', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/validator', 'aliases' => array(), 'dev_requirement' => \false), 'dhii/versions' => array('pretty_version' => 'v0.1.0-alpha3', 'version' => '0.1.0.0-alpha3', 'reference' => '120b22b248d0b46e41bac93bf3394516c9d55730', 'type' => 'library', 'install_path' => __DIR__ . '/../dhii/versions', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/assets' => array('pretty_version' => '2.9.0', 'version' => '2.9.0.0', 'reference' => '2b2d2ac359383e24284388bf54a6ff4f122d3c67', 'type' => 'library', 'install_path' => __DIR__ . '/../inpsyde/assets', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/logger' => array('pretty_version' => 'v1.4.0', 'version' => '1.4.0.0', 'reference' => 'ea22ad6862a771239e02d2a33b4fafb095dc4e30', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/logger', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/modularity' => array('pretty_version' => '1.12.0', 'version' => '1.12.0.0', 'reference' => 'e1ca1c81b7b663355906b586525d21ac5d46bc65', 'type' => 'library', 'install_path' => __DIR__ . '/../inpsyde/modularity', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payment-gateway' => array('pretty_version' => '2.7.1', 'version' => '2.7.1.0', 'reference' => '00260a21acbe2614e9ddcef5e0182b4dbbb3011b', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payment-gateway', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-admin-banner' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '9fbfb5ad20c6f3eded0540fa088393a6f5ba01a2', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-admin-banner', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-analytics' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => 'cea259f74a42805a8c8c824975ecf7ebd4d6854c', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-analytics', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-api' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '3141a286544a5828ba411f19187ecbc0776d1198', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-api', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-checkout' => array('pretty_version' => 'dev-release/3.4.0', 'version' => 'dev-release/3.4.0', 'reference' => '6c1baa930ce70151a2d5664830e77b82cabc9a3b', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-embedded-payment' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '6ce354bfcb78e98026dc6c5b152b4e0b13af1ae0', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-embedded-payment', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-hosted-payment' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '786b9784805e8830d240d21f8ea93bbc2a4818e3', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-hosted-payment', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-list-session' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '76755c87c3df513673d5b74ca3877e66f07abda4', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-list-session', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-migrator' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => 'fa868f933c3e348befcfaf459735e300ca7b5350', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-migrator', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-page-detector' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '0a3c51c69790735837a4e7884d74cd0656f6fe99', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-page-detector', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-payment-gateway-checkout' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '9db2a7daa57ba440f50de2e0345faa3d8db5babe', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-payment-gateway-checkout', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-payment-methods' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '5ce35ddeeb2f88faea898b97d6ebc2988874eb84', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-payment-methods', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-sdk' => array('pretty_version' => 'v4.1.0', 'version' => '4.1.0.0', 'reference' => '096f3db439f7d77bef2d165dbecd406cc4210550', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-sdk', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-settings' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => 'cb601f00438927dad370ce92c403744c8fa35cf7', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-settings', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-status-report' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '78bc7cf91e905f1d99ca13478d4af2842796c328', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-status-report', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-third-party-compat' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => 'cd3262cd2bac6f6d5b253abf0edda9051a1cedd5', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-third-party-compat', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-webhooks' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => '3e8c63f9a746abfc79234e7ad85d4e58790b6276', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-webhooks', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-websdk' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => 'fd04181b18ca9ef28d66c267bcbcbe1991105e07', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-websdk', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/payoneer-wp' => array('pretty_version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'version' => 'dev-fix/PN-2320-no-scripts-present-when-plugin-activated-on-a-multisite-site', 'reference' => 'f6967b69c11ee362a2c20e7c240f4fe5f2cf5d0f', 'type' => 'inpsyde-module', 'install_path' => __DIR__ . '/../../modules/inpsyde/payoneer-wp', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/psr-18-wp-http-client' => array('pretty_version' => 'v0.1.0-alpha4', 'version' => '0.1.0.0-alpha4', 'reference' => '8dd172262c95fc3fb4716b14a54c9406254ba441', 'type' => 'library', 'install_path' => __DIR__ . '/../inpsyde/psr-18-wp-http-client', 'aliases' => array(), 'dev_requirement' => \false), 'inpsyde/wp-context' => array('pretty_version' => '1.5.1', 'version' => '1.5.1.0', 'reference' => '1350ada72517f5d374bff9409b4ea5a02377ec1a', 'type' => 'library', 'install_path' => __DIR__ . '/../inpsyde/wp-context', 'aliases' => array(), 'dev_requirement' => \false), 'nyholm/psr7' => array('pretty_version' => '1.8.2', 'version' => '1.8.2.0', 'reference' => 'a71f2b11690f4b24d099d6b16690a90ae14fc6f3', 'type' => 'library', 'install_path' => __DIR__ . '/../nyholm/psr7', 'aliases' => array(), 'dev_requirement' => \false), 'oomphinc/composer-installers-extender' => array('pretty_version' => '2.0.1', 'version' => '2.0.1.0', 'reference' => 'cbf4b6f9a24153b785d09eee755b995ba87bd5f9', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../oomphinc/composer-installers-extender', 'aliases' => array(), 'dev_requirement' => \false), 'php-http/message-factory-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/container' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-client' => array('pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '^1.0')), 'psr/http-factory' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-factory-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '1.1', 'version' => '1.1.0.0', 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-server-handler' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'reference' => '84c4fb66179be4caaf8e97bd239203245302e7d4', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-server-handler', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-server-middleware' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'reference' => 'c1481f747daaa6a0782775cd6a8c26a1bf4a3829', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-server-middleware', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'sniccowp/php-scoper-wordpress-excludes' => array('pretty_version' => '6.8.1', 'version' => '6.8.1.0', 'reference' => 'c2c18f89a9aa2d7ef1998d233b9ed00d0deff5dd', 'type' => 'library', 'install_path' => __DIR__ . '/../sniccowp/php-scoper-wordpress-excludes', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.32.0', 'version' => '1.32.0.0', 'reference' => '0cc9dd0f17f61d8131e7df6b84bd344899fe2608', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => \false), 'wp-oop/containers' => array('pretty_version' => 'v0.1.1-alpha3', 'version' => '0.1.1.0-alpha3', 'reference' => '01f52a9bb347e28aa25e80bd777d6e8b56451d9e', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-oop/containers', 'aliases' => array(), 'dev_requirement' => \false))); -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Container/ContainerConfigurator.php
r3206335 r3321269 6 6 use Syde\Vendor\Psr\Container\ContainerInterface; 7 7 /** 8 * @p salm-import-type Service from \Inpsyde\Modularity\Module\ServiceModule9 * @p salm-import-type ExtendingService from \Inpsyde\Modularity\Module\ExtendingModule8 * @phpstan-import-type Service from \Inpsyde\Modularity\Module\ServiceModule 9 * @phpstan-import-type ExtendingService from \Inpsyde\Modularity\Module\ExtendingModule 10 10 */ 11 11 class ContainerConfigurator … … 101 101 * @return ContainerInterface 102 102 * 103 * @p salm-assert ContainerInterface $this->compiledContainer103 * @phpstan-assert ContainerInterface $this->compiledContainer 104 104 */ 105 105 public function createReadOnlyContainer(): ContainerInterface -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Container/PackageProxyContainer.php
r3206335 r3321269 38 38 * @return bool 39 39 * 40 * @p salm-assert-if-true ContainerInterface $this->container41 * @p salm-assert-if-false null $this->container40 * @phpstan-assert-if-true ContainerInterface $this->container 41 * @phpstan-assert-if-false null $this->container 42 42 */ 43 43 private function tryContainer(): bool … … 55 55 * @return void 56 56 * 57 * @p salm-assert ContainerInterface $this->container57 * @phpstan-assert ContainerInterface $this->container 58 58 */ 59 59 private function assertPackageBooted(string $id): void -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Container/ReadOnlyContainer.php
r3206335 r3321269 7 7 use Syde\Vendor\Psr\Container\NotFoundExceptionInterface; 8 8 /** 9 * @p salm-import-type Service from \Inpsyde\Modularity\Module\ServiceModule10 * @p salm-import-type ExtendingService from \Inpsyde\Modularity\Module\ExtendingModule9 * @phpstan-import-type Service from \Inpsyde\Modularity\Module\ServiceModule 10 * @phpstan-import-type ExtendingService from \Inpsyde\Modularity\Module\ExtendingModule 11 11 */ 12 12 class ReadOnlyContainer implements ContainerInterface … … 24 24 * @param array<string, Service> $services 25 25 * @param array<string, bool> $factoryIds 26 * @param ServiceExtensions|array $extensions26 * @param ServiceExtensions|array<string, ExtendingService> $extensions 27 27 * @param ContainerInterface[] $containers 28 28 */ -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Container/ServiceExtensions.php
r3206335 r3321269 6 6 use Syde\Vendor\Psr\Container\ContainerInterface as Container; 7 7 /** 8 * @p salm-import-type ExtendingService from \Inpsyde\Modularity\Module\ExtendingModule8 * @phpstan-import-type ExtendingService from \Inpsyde\Modularity\Module\ExtendingModule 9 9 */ 10 10 class ServiceExtensions … … 17 17 /** 18 18 * @param string $type 19 * 19 20 * @return string 20 21 */ … … 26 27 * @param string $extensionId 27 28 * @param ExtendingService $extender 29 * 28 30 * @return static 29 31 */ 30 32 public function add(string $extensionId, callable $extender): ServiceExtensions 31 33 { 32 isset($this->extensions[$extensionId]) or $this->extensions[$extensionId] = []; 34 if (!isset($this->extensions[$extensionId])) { 35 $this->extensions[$extensionId] = []; 36 } 33 37 $this->extensions[$extensionId][] = $extender; 34 38 return $this; … … 36 40 /** 37 41 * @param string $extensionId 42 * 38 43 * @return bool 39 44 */ … … 46 51 * @param string $id 47 52 * @param Container $container 53 * 48 54 * @return mixed 49 55 */ … … 57 63 * @param mixed $service 58 64 * @param Container $container 65 * 59 66 * @return mixed 60 67 */ … … 70 77 * @param object $service 71 78 * @param Container $container 72 * @param array $extendedClasses 79 * @param string[] $extendedClasses 80 * 73 81 * @return mixed 74 82 * 75 * phpcs:disable Generic.Metrics.CyclomaticComplexity76 * phpcs:disable Inpsyde.CodeQuality.ReturnTypeDeclaration83 * phpcs:disable SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh 84 * phpcs:disable Syde.Functions.ReturnTypeDeclaration.NoReturnType 77 85 */ 78 86 protected function resolveByType(string $className, object $service, Container $container, array $extendedClasses = []) 79 87 { 80 // phpcs:enable Generic.Metrics.CyclomaticComplexity81 // phpcs:enable Inpsyde.CodeQuality.ReturnTypeDeclaration88 // phpcs:enable SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh 89 // phpcs:enable Syde.Functions.ReturnTypeDeclaration.NoReturnType 82 90 $extendedClasses[] = $className; 83 91 /** @var array<class-string, list<ExtendingService>> $allCallbacks */ … … 89 97 } 90 98 // 2nd group of extensions: targeting parent classes 91 $parents = class_parents($service, \false); 92 $parents === \false and $parents = []; 99 $parents = class_parents($service, \false) ?: []; 93 100 foreach ($parents as $parentName) { 94 101 $byParent = $this->extensions[self::typeId($parentName)] ?? null; … … 98 105 } 99 106 // 3rd group of extensions: targeting implemented interfaces 100 $interfaces = class_implements($service, \false); 101 $interfaces === \false and $interfaces = []; 107 $interfaces = class_implements($service, \false) ?: []; 102 108 foreach ($interfaces as $interfaceName) { 103 109 $byInterface = $this->extensions[self::typeId($interfaceName)] ?? null; … … 137 143 * @param Container $container 138 144 * @param list<ExtendingService> $extenders 145 * 139 146 * @return list{mixed, int} 140 147 */ -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Module/ExtendingModule.php
r3206335 r3321269 6 6 use Syde\Vendor\Psr\Container\ContainerInterface; 7 7 /** 8 * @p salm-type ExtendingService = callable(mixed $service, ContainerInterface $container):mixed8 * @phpstan-type ExtendingService callable(mixed $service, ContainerInterface $container): mixed 9 9 */ 10 10 interface ExtendingModule extends Module -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Module/FactoryModule.php
r3206335 r3321269 5 5 6 6 /** 7 * @p salm-import-type Service from ServiceModule7 * @phpstan-import-type Service from ServiceModule 8 8 */ 9 9 interface FactoryModule extends Module -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Module/ServiceModule.php
r3206335 r3321269 6 6 use Syde\Vendor\Psr\Container\ContainerInterface; 7 7 /** 8 * @p salm-type Service = callable(ContainerInterface $container):mixed8 * @phpstan-type Service callable(ContainerInterface $container): mixed 9 9 */ 10 10 interface ServiceModule extends Module -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Package.php
r3206335 r3321269 6 6 use Syde\Vendor\Inpsyde\Modularity\Container\ContainerConfigurator; 7 7 use Syde\Vendor\Inpsyde\Modularity\Container\PackageProxyContainer; 8 use Syde\Vendor\Inpsyde\Modularity\Module\ExecutableModule; 8 9 use Syde\Vendor\Inpsyde\Modularity\Module\ExtendingModule; 9 use Syde\Vendor\Inpsyde\Modularity\Module\ExecutableModule;10 10 use Syde\Vendor\Inpsyde\Modularity\Module\FactoryModule; 11 11 use Syde\Vendor\Inpsyde\Modularity\Module\Module; … … 14 14 use Syde\Vendor\Psr\Container\ContainerInterface; 15 15 /** 16 * @p salm-import-type Service from \Inpsyde\Modularity\Module\ServiceModule17 * @p salm-import-type ExtendingService from \Inpsyde\Modularity\Module\ExtendingModule16 * @phpstan-import-type Service from \Inpsyde\Modularity\Module\ServiceModule 17 * @phpstan-import-type ExtendingService from \Inpsyde\Modularity\Module\ExtendingModule 18 18 */ 19 19 class Package … … 168 168 public static function new(Properties $properties, ContainerInterface ...$containers): Package 169 169 { 170 return new self($properties, ... array_values($containers));170 return new self($properties, ...$containers); 171 171 } 172 172 /** 173 173 * @param Properties $properties 174 * @param list<ContainerInterface>$containers174 * @param ContainerInterface ...$containers 175 175 */ 176 176 private function __construct(Properties $properties, ContainerInterface ...$containers) … … 213 213 * @param Package $package 214 214 * @return bool 215 *216 * phpcs:disable Inpsyde.CodeQuality.FunctionLength217 215 */ 218 216 public function connect(Package $package): bool 219 217 { 220 // phpcs:enable Inpsyde.CodeQuality.FunctionLength221 218 try { 222 219 if ($package === $this) { … … 399 396 /** @var null|array<string, Service|ExtendingService> $services */ 400 397 $services = null; 401 /** @var null|callable(string, Service|ExtendingService) $addCallback */398 /** @var null|callable(string, Service|ExtendingService): void $addCallback */ 402 399 $addCallback = null; 403 400 switch ($status) { … … 444 441 private function moduleProgress(string $moduleId, string $status, ?array $serviceIds = null): void 445 442 { 446 isset($this->moduleStatus[$status]) or $this->moduleStatus[$status] = []; 443 if (!isset($this->moduleStatus[$status])) { 444 $this->moduleStatus[$status] = []; 445 } 447 446 $this->moduleStatus[$status][] = $moduleId; 448 447 if ($serviceIds === null || $serviceIds === [] || !$this->properties->isDebug()) { … … 591 590 * @param string $reason 592 591 * @param bool $throw 593 * @return ($throw is true ? never: false)592 * @return bool 594 593 */ 595 594 private function handleConnectionFailure(string $packageName, string $reason, bool $throw): bool … … 643 642 if (apply_filters('deprecated_argument_trigger_error', \true)) { 644 643 do_action('wp_trigger_error_run', $function, $message, \E_USER_DEPRECATED); 644 // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error 645 645 trigger_error(esc_html($message), \E_USER_DEPRECATED); 646 646 } -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Properties/BaseProperties.php
r3206335 r3321269 18 18 * @param array<string, mixed> $properties 19 19 */ 20 protected function __construct(string $baseName, string $basePath, string $baseUrl = null, array $properties = [])20 protected function __construct(string $baseName, string $basePath, ?string $baseUrl = null, array $properties = []) 21 21 { 22 22 $baseName = $this->sanitizeBaseName($baseName); … … 32 32 /** 33 33 * @param string $name 34 * 34 35 * @return lowercase-string 35 36 */ 36 37 protected function sanitizeBaseName(string $name): string 37 38 { 38 substr_count($name, '/') and $name = dirname($name); 39 if (substr_count($name, '/')) { 40 $name = dirname($name); 41 } 39 42 return strtolower(pathinfo($name, \PATHINFO_FILENAME)); 40 43 } … … 133 136 } 134 137 /** 135 * @return array138 * @return string[] 136 139 */ 137 140 public function tags(): array … … 142 145 * @param string $key 143 146 * @param mixed $default 147 * 144 148 * @return mixed 145 149 */ … … 150 154 /** 151 155 * @param string $key 156 * 152 157 * @return bool 153 158 */ … … 163 168 { 164 169 if ($this->isDebug === null) { 165 /** @psalm-suppress TypeDoesNotContainType */166 170 $this->isDebug = defined('WP_DEBUG') && \WP_DEBUG; 167 171 } -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Properties/LibraryProperties.php
r3206335 r3321269 4 4 namespace Syde\Vendor\Inpsyde\Modularity\Properties; 5 5 6 /** 7 * @phpstan-type ComposerAuthor array{ 8 * name: string, 9 * email?: string, 10 * homepage?: string, 11 * role?: string, 12 * } 13 * @phpstan-type ComposerData array{ 14 * name: string, 15 * version?: string, 16 * require?: array<string, string>, 17 * require-dev?: array<string, string>, 18 * description?: string, 19 * keywords?: string[], 20 * authors?: ComposerAuthor[], 21 * extra?: array{modularity?: array<string, string>}, 22 * } 23 */ 6 24 class LibraryProperties extends BaseProperties 7 25 { … … 11 29 * @param string $composerJsonFile 12 30 * @param string|null $baseUrl 31 * 13 32 * @return LibraryProperties 14 33 * 15 * phpcs:disable Generic.Metrics.CyclomaticComplexity34 * phpcs:disable SlevomatCodingStandard.Complexity 16 35 */ 17 36 public static function new(string $composerJsonFile, ?string $baseUrl = null): LibraryProperties 18 37 { 19 // phpcs:enable Generic.Metrics.CyclomaticComplexity 20 if (!\is_file($composerJsonFile) || !\is_readable($composerJsonFile)) { 21 throw new \Exception(esc_html("File {$composerJsonFile} does not exist or is not readable.")); 22 } 23 $content = (string) file_get_contents($composerJsonFile); 24 /** @var array $composerJsonData */ 25 $composerJsonData = json_decode($content, \true); 38 // phpcs:enable SlevomatCodingStandard.Complexity 39 $composerJsonData = self::readComposerJsonData($composerJsonFile); 26 40 $properties = Properties::DEFAULT_PROPERTIES; 27 41 $properties[self::PROP_DESCRIPTION] = $composerJsonData['description'] ?? ''; 28 42 $properties[self::PROP_TAGS] = $composerJsonData['keywords'] ?? []; 29 43 $authors = $composerJsonData['authors'] ?? []; 30 is_array($authors) or $authors = []; 44 if (!is_array($authors)) { 45 $authors = []; 46 } 31 47 $names = []; 32 48 foreach ($authors as $author) { … … 48 64 // Custom settings which can be stored in composer.json "extra.modularity" 49 65 $extra = $composerJsonData['extra']['modularity'] ?? []; 50 is_array($extra) or $extra = []; 66 if (!is_array($extra)) { 67 $extra = []; 68 } 51 69 foreach (self::EXTRA_KEYS as $key) { 52 70 $properties[$key] = $extra[$key] ?? ''; … … 68 86 /** 69 87 * @param string $url 88 * 70 89 * @return static 71 90 */ … … 79 98 } 80 99 /** 81 * @param array $composerJsonData 82 * @return list{string, string} 100 * @param ComposerData $composerJsonData 101 * 102 * @return array{string, string} 83 103 */ 84 pr ivatestatic function buildNames(array $composerJsonData): array104 protected static function buildNames(array $composerJsonData): array 85 105 { 86 106 $composerName = (string) ($composerJsonData['name'] ?? ''); 87 107 $packageNamePieces = explode('/', $composerName, 2); 88 108 $basename = implode('-', $packageNamePieces); 89 // From " inpsyde/foo-bar-baz" to "Inpsyde Foo Bar Baz"109 // From "syde/foo-bar-baz" to "Syde Foo Bar Baz" 90 110 $name = mb_convert_case(str_replace(['-', '_', '.'], ' ', implode(' ', $packageNamePieces)), \MB_CASE_TITLE); 91 111 return [$basename, $name]; … … 101 121 * `>= 7.1 < 8` returns `7.1` 102 122 * 103 * @param array$composerData123 * @param ComposerData $composerData 104 124 * @param string $key 125 * 105 126 * @return string 106 *107 * phpcs:disable Generic.Metrics.CyclomaticComplexity108 127 */ 109 pr ivatestatic function extractPhpVersion(array $composerData, string $key = 'require'): string128 protected static function extractPhpVersion(array $composerData, string $key = 'require'): string 110 129 { 111 // phpcs:enable Generic.Metrics.CyclomaticComplexity112 130 $nextKey = $key === 'require' ? 'require-dev' : null; 113 131 $base = $composerData[$key] ?? null; … … 134 152 /** 135 153 * @param string $version 154 * 136 155 * @return string 137 156 */ 138 pr ivatestatic function parseVersion(string $version): string157 protected static function parseVersion(string $version): string 139 158 { 140 159 $version = trim($version); … … 156 175 return ''; 157 176 } 177 /** 178 * @param string $composerJsonFile 179 * 180 * @return ComposerData 181 * @throws \Exception 182 */ 183 private static function readComposerJsonData(string $composerJsonFile): array 184 { 185 if (!\is_file($composerJsonFile) || !\is_readable($composerJsonFile)) { 186 throw new \Exception(esc_html("File {$composerJsonFile} does not exist or is not readable.")); 187 } 188 $content = (string) file_get_contents($composerJsonFile); 189 /** @var ComposerData $composerJsonData */ 190 $composerJsonData = json_decode($content, \true); 191 if (json_last_error() !== \JSON_ERROR_NONE) { 192 throw new \Exception(esc_html("Error reading file {$composerJsonFile}: " . json_last_error_msg())); 193 } 194 return $composerJsonData; 195 } 158 196 } -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Properties/PluginProperties.php
r3206335 r3321269 82 82 } 83 83 /** 84 * @return array84 * @return string[] 85 85 */ 86 86 public function requiresPlugins(): array -
payoneer-checkout/trunk/vendor/inpsyde/modularity/src/Properties/Properties.php
r3206335 r3321269 90 90 * Optional. Specify the minimum required PHP version. 91 91 * 92 * @return string 92 * @return string|null 93 93 */ 94 94 public function requiresPhp(): ?string; … … 97 97 * Plugins do not have support for "tags"/"keywords" in header. 98 98 * 99 * @return array99 * @return string[] 100 100 * 101 101 * @see https://developer.wordpress.org/reference/classes/wp_theme/#properties -
payoneer-checkout/trunk/vendor/scoper-autoload.php
r3305047 r3321269 30 30 } 31 31 } 32 humbug_phpscoper_expose_class('Stringable', 'Syde\Vendor\Stringable'); 33 humbug_phpscoper_expose_class('Attribute', 'Syde\Vendor\Attribute'); 34 humbug_phpscoper_expose_class('ValueError', 'Syde\Vendor\ValueError'); 35 humbug_phpscoper_expose_class('PhpToken', 'Syde\Vendor\PhpToken'); 32 36 humbug_phpscoper_expose_class('UnhandledMatchError', 'Syde\Vendor\UnhandledMatchError'); 33 humbug_phpscoper_expose_class('Attribute', 'Syde\Vendor\Attribute');34 humbug_phpscoper_expose_class('Stringable', 'Syde\Vendor\Stringable');35 humbug_phpscoper_expose_class('PhpToken', 'Syde\Vendor\PhpToken');36 humbug_phpscoper_expose_class('ValueError', 'Syde\Vendor\ValueError');37 37 38 38 // Function aliases. For more information see: -
payoneer-checkout/trunk/vendor/sniccowp/php-scoper-wordpress-excludes/generated/exclude-wordpress-classes.json
r3260742 r3321269 377 377 "WP_oEmbed_Controller", 378 378 "WP_Paused_Extensions_Storage", 379 "WP_PHPMailer", 379 380 "WP_Plugins_List_Table", 380 381 "WP_Plugin_Dependencies", … … 473 474 "WP_Site_Icon", 474 475 "WP_Site_Query", 476 "WP_Speculation_Rules", 475 477 "WP_Styles", 476 478 "WP_Style_Engine", … … 502 504 "WP_Upgrader", 503 505 "WP_Upgrader_Skin", 506 "WP_URL_Pattern_Prefixer", 504 507 "WP_User", 505 508 "WP_Users_List_Table", -
payoneer-checkout/trunk/vendor/sniccowp/php-scoper-wordpress-excludes/generated/exclude-wordpress-functions.json
r3260742 r3321269 84 84 "apply_block_core_search_border_styles", 85 85 "apply_block_hooks_to_content", 86 "apply_block_hooks_to_content_from_post_object", 86 87 "apply_filters", 87 88 "apply_filters_deprecated", … … 139 140 "block_core_navigation_get_most_recently_published_navigation", 140 141 "block_core_navigation_get_post_ids", 141 "block_core_navigation_insert_hooked_blocks",142 "block_core_navigation_insert_hooked_blocks_into_rest_response",143 142 "block_core_navigation_link_build_css_colors", 144 143 "block_core_navigation_link_build_css_font_sizes", … … 148 147 "block_core_navigation_link_render_submenu_icon", 149 148 "block_core_navigation_maybe_use_classic_menu_fallback", 150 "block_core_navigation_mock_parsed_block",151 149 "block_core_navigation_parse_blocks_from_menu_items", 152 "block_core_navigation_remove_serialized_parent_block",153 150 "block_core_navigation_render_submenu_icon", 154 "block_core_navigation_set_ignored_hooked_blocks_metadata",155 151 "block_core_navigation_sort_menu_items_by_parent_id", 156 152 "block_core_navigation_submenu_build_css_colors", … … 158 154 "block_core_navigation_submenu_render_submenu_icon", 159 155 "block_core_navigation_typographic_presets_backcompatibility", 160 "block_core_navigation_update_ignore_hooked_blocks_meta",161 156 "block_core_page_list_build_css_colors", 162 157 "block_core_page_list_build_css_font_sizes", … … 1187 1182 "is_plugin_page", 1188 1183 "is_plugin_paused", 1184 "is_post_embeddable", 1189 1185 "is_post_publicly_viewable", 1190 1186 "is_post_status_viewable", … … 1541 1537 "register_block_core_query_pagination_previous", 1542 1538 "register_block_core_query_title", 1539 "register_block_core_query_total", 1543 1540 "register_block_core_read_more", 1544 1541 "register_block_core_rss", … … 1675 1672 "render_block_core_query_pagination_previous", 1676 1673 "render_block_core_query_title", 1674 "render_block_core_query_total", 1677 1675 "render_block_core_read_more", 1678 1676 "render_block_core_rss", … … 2361 2359 "wp_allow_comment", 2362 2360 "wp_apply_alignment_support", 2361 "wp_apply_aria_label_support", 2363 2362 "wp_apply_border_support", 2364 2363 "wp_apply_colors_support", … … 2618 2617 "wp_enqueue_stored_styles", 2619 2618 "wp_enqueue_style", 2619 "wp_ensure_editable_role", 2620 2620 "wp_exif_date2ts", 2621 2621 "wp_exif_frac2dec", … … 2624 2624 "wp_ext2type", 2625 2625 "wp_extract_urls", 2626 "wp_fast_hash", 2626 2627 "wp_favicon_request", 2627 2628 "wp_filesize", … … 2788 2789 "wp_get_sitemap_providers", 2789 2790 "wp_get_sites", 2791 "wp_get_speculation_rules", 2792 "wp_get_speculation_rules_configuration", 2790 2793 "wp_get_split_term", 2791 2794 "wp_get_split_terms", … … 2854 2857 "wp_increase_content_media_count", 2855 2858 "wp_initialize_site", 2859 "wp_initialize_site_preview_hooks", 2856 2860 "wp_initialize_theme_preview_hooks", 2857 2861 "wp_initial_constants", … … 3087 3091 "wp_parse_widget_id", 3088 3092 "wp_password_change_notification", 3093 "wp_password_needs_rehash", 3089 3094 "wp_paused_plugins", 3090 3095 "wp_paused_themes", … … 3132 3137 "wp_print_scripts", 3133 3138 "wp_print_script_tag", 3139 "wp_print_speculation_rules", 3134 3140 "wp_print_styles", 3135 3141 "wp_print_theme_file_tree", … … 3169 3175 "wp_register", 3170 3176 "wp_register_alignment_support", 3177 "wp_register_aria_label_support", 3171 3178 "wp_register_background_support", 3172 3179 "wp_register_block_metadata_collection", 3173 3180 "wp_register_block_style_variations_from_theme_json_partials", 3181 "wp_register_block_types_from_metadata_collection", 3174 3182 "wp_register_border_support", 3175 3183 "wp_register_colors_support", … … 3230 3238 "wp_render_elements_support", 3231 3239 "wp_render_elements_support_styles", 3240 "wp_render_empty_block_template_warning", 3232 3241 "wp_render_layout_support_flag", 3233 3242 "wp_render_position_support", … … 3326 3335 "wp_shortlink_wp_head", 3327 3336 "wp_should_add_elements_class_name", 3337 "wp_should_load_block_assets_on_demand", 3328 3338 "wp_should_load_block_editor_scripts_and_styles", 3329 3339 "wp_should_load_separate_core_block_assets", … … 3418 3428 "wp_unique_filename", 3419 3429 "wp_unique_id", 3430 "wp_unique_id_from_values", 3420 3431 "wp_unique_post_slug", 3421 3432 "wp_unique_prefixed_id", … … 3479 3490 "wp_validate_site_data", 3480 3491 "wp_validate_user_request_key", 3492 "wp_verify_fast_hash", 3481 3493 "wp_verify_nonce", 3482 3494 "wp_version_check", … … 3777 3789 "_wp_get_post_revision_version", 3778 3790 "_wp_get_presets_class_name", 3791 "_wp_get_site_editor_redirection_url", 3779 3792 "_wp_get_user_contactmethods", 3780 3793 "_wp_handle_upload", -
payoneer-checkout/trunk/vendor/symfony/polyfill-php80/PhpToken.php
r3114998 r3321269 27 27 public $text; 28 28 /** 29 * @var int29 * @var -1|positive-int 30 30 */ 31 31 public $line; … … 34 34 */ 35 35 public $pos; 36 /** 37 * @param -1|positive-int $line 38 */ 36 39 public function __construct(int $id, string $text, int $line = -1, int $position = -1) 37 40 { … … 69 72 } 70 73 /** 71 * @return static[]74 * @return list<static> 72 75 */ 73 76 public static function tokenize(string $code, int $flags = 0): array
Note: See TracChangeset
for help on using the changeset viewer.