Changeset 3804971
- Timestamp:
- 11/16/2026 11:28:53 AM (10 days ago)
- Location:
- paymos-easy-digital-downloads
- Files:
-
- 116 added
- 22 edited
-
tags/1.7.8 (added)
-
tags/1.7.8/CHANGELOG.md (added)
-
tags/1.7.8/LICENSE (added)
-
tags/1.7.8/README.md (added)
-
tags/1.7.8/assets (added)
-
tags/1.7.8/assets/img (added)
-
tags/1.7.8/assets/img/paymos.svg (added)
-
tags/1.7.8/assets/js (added)
-
tags/1.7.8/assets/js/connect.js (added)
-
tags/1.7.8/assets/js/refunds.js (added)
-
tags/1.7.8/composer.json (added)
-
tags/1.7.8/includes (added)
-
tags/1.7.8/includes/Autoloader.php (added)
-
tags/1.7.8/includes/Config.php (added)
-
tags/1.7.8/includes/ConnectController.php (added)
-
tags/1.7.8/includes/ConnectStateStore.php (added)
-
tags/1.7.8/includes/CredentialStore.php (added)
-
tags/1.7.8/includes/EventStorageException.php (added)
-
tags/1.7.8/includes/EventStore.php (added)
-
tags/1.7.8/includes/Gateway.php (added)
-
tags/1.7.8/includes/Logger.php (added)
-
tags/1.7.8/includes/PaymentMapper.php (added)
-
tags/1.7.8/includes/PaymentRepository.php (added)
-
tags/1.7.8/includes/RefundAdapter.php (added)
-
tags/1.7.8/includes/RefundCopy.php (added)
-
tags/1.7.8/includes/RefundGuard.php (added)
-
tags/1.7.8/includes/RefundIntentStore.php (added)
-
tags/1.7.8/includes/StorefrontHooks.php (added)
-
tags/1.7.8/includes/WebhookController.php (added)
-
tags/1.7.8/paymos-easy-digital-downloads.php (added)
-
tags/1.7.8/readme.txt (added)
-
tags/1.7.8/uninstall.php (added)
-
tags/1.7.8/vendor (added)
-
tags/1.7.8/vendor/autoload.php (added)
-
tags/1.7.8/vendor/paymos (added)
-
tags/1.7.8/vendor/paymos/php-sdk (added)
-
tags/1.7.8/vendor/paymos/php-sdk/LICENSE (added)
-
tags/1.7.8/vendor/paymos/php-sdk/bundle-manifest.json (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Client.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/ClientConfig.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Connect (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Connect/DeviceConnectClient.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/ApiException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/AuthException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/ConflictException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/DuplicateEventException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/EventInProgressException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/GoneException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/NotFoundException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/PermissionException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/RateLimitException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/ServerException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/SignatureMismatchException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/TimestampSkewException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/UnavailableException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Exception/ValidationException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http/CurlTransport.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http/HttpResponse.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http/MockTransport.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http/RequestSigner.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http/RetryPolicy.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http/RetryingTransport.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http/TransportInterface.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Http/WordPressTransport.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/IdempotencyKey.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/AesGcmEnvelope.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/AmountGuard.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/CredentialSet.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/EffectClaim.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/ExternalRefundObservation.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/InvoiceReconciler.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/InvoiceReconciliationResult.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/InvoiceRenewal.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/InvoiceReplacement.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/InvoiceReplacementBlockedException.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/InvoiceReplacementResult.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/InvoiceReverseVerifier.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/InvoiceVerificationResult.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/NativeProjectionResult.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/NativeRefundProjectorInterface.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/RefundCoordinator.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/RefundCopy.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/RefundDiscovery.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/RefundIntent.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/RefundIntentPage.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/RefundIntentStoreInterface.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/RefundRecipientIdentity.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/RefundStates.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/StatusMapper.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/VerifiedRefund.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/WordPressEncryptedOption.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Plugin/WordPressOrderLock.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources/Balances.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources/BaseResource.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources/Invoices.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources/PaymentChannelDeposits.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources/PaymentChannels.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources/Refunds.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources/System.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Resources/Withdrawals.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Version.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook/CommitAwareEventStoreInterface.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook/EventStoreInterface.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook/InMemoryEventStore.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook/MultiEnvironmentWebhookVerifier.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook/VerifiedWebhookEvent.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook/WebhookEvent.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook/WebhookEventProcessor.php (added)
-
tags/1.7.8/vendor/paymos/php-sdk/src/Webhook/WebhookVerifier.php (added)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/assets/js/connect.js (modified) (6 diffs)
-
trunk/assets/js/refunds.js (modified) (2 diffs)
-
trunk/composer.json (modified) (1 diff)
-
trunk/includes/ConnectController.php (modified) (5 diffs)
-
trunk/includes/ConnectStateStore.php (modified) (4 diffs)
-
trunk/includes/EventStorageException.php (added)
-
trunk/includes/EventStore.php (modified) (9 diffs)
-
trunk/includes/Gateway.php (modified) (3 diffs)
-
trunk/includes/PaymentMapper.php (modified) (1 diff)
-
trunk/includes/PaymentRepository.php (modified) (1 diff)
-
trunk/includes/RefundAdapter.php (modified) (7 diffs)
-
trunk/includes/WebhookController.php (modified) (3 diffs)
-
trunk/paymos-easy-digital-downloads.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/paymos/php-sdk/bundle-manifest.json (modified) (7 diffs)
-
trunk/vendor/paymos/php-sdk/src/Http/RetryingTransport.php (modified) (1 diff)
-
trunk/vendor/paymos/php-sdk/src/Plugin/NativeRefundProjectorInterface.php (modified) (1 diff)
-
trunk/vendor/paymos/php-sdk/src/Plugin/RefundCoordinator.php (modified) (1 diff)
-
trunk/vendor/paymos/php-sdk/src/Resources/BaseResource.php (modified) (2 diffs)
-
trunk/vendor/paymos/php-sdk/src/Resources/Refunds.php (modified) (1 diff)
-
trunk/vendor/paymos/php-sdk/src/Version.php (modified) (1 diff)
-
trunk/vendor/paymos/php-sdk/src/Webhook/WebhookVerifier.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
paymos-easy-digital-downloads/trunk/CHANGELOG.md
r3787430 r3804971 8 8 9 9 ## [Unreleased] 10 11 ## [1.7.8] - 2026-11-15 12 13 - chore: rebuild canonical CMS package 14 15 ## [1.7.7] - 2026-11-15 16 17 - fix(plugins): guard PHP 8.5 setAccessible deprecations and Drupal SDK path in tests 18 - fix(refunds): decouple refund RBAC from Withdraw and unify 12 CMS refund adapters 19 - chore: rebuild canonical CMS package 20 21 ## [1.7.6] - 2026-11-14 22 23 - fix(woocommerce,edd): a network error during Connect keeps the flow alive 24 25 ## [1.7.5] - 2026-11-14 26 27 - chore: rebuild canonical CMS package 28 29 ## [1.7.4] - 2026-11-14 30 31 - chore: rebuild canonical CMS package 32 33 ## [1.7.3] - 2026-11-13 34 35 - merge: integrate Windows WIP onto origin/main (CMS binding, SDK preview, dashboard, plugins, specs) 36 - chore: bundle Paymos PHP SDK v1.10.2 37 38 ## [1.7.2] - 2026-11-13 39 40 - chore: rebuild canonical CMS package 41 42 ## [1.7.1] - 2026-11-13 43 44 - chore: bundle Paymos PHP SDK v1.10.1 45 - chore: rebuild canonical CMS package 46 47 ## [1.7.0] - 2026-11-13 48 49 - fix(plugins): unblock WordPress checks and align native recovery tests 50 - feat(notifications): rewrite all 71 email and 52 Telegram RU templates, lifecycle series, and R01-R34 audit fixes 51 - chore: bundle Paymos PHP SDK v1.10.0 52 - chore: rebuild canonical CMS package 53 54 ## [1.6.5] - 2026-11-08 55 56 - chore: rebuild canonical CMS package 57 58 ## [1.6.4] - 2026-11-08 59 60 - chore: rebuild canonical CMS package 61 62 ## [1.6.3] - 2026-11-07 63 64 - chore: rebuild canonical CMS package 10 65 11 66 ## [1.6.2] - 2026-11-06 -
paymos-easy-digital-downloads/trunk/assets/js/connect.js
r3787430 r3804971 3 3 var config = window.PaymosEddConnect; 4 4 if (!config) return; 5 var labels = config.labels; 5 6 6 7 // Set when the browser refused the approval tab and the merchant has to open it … … 9 10 var awaitingManualApproval = false; 10 11 11 function post(action ) {12 function post(action, flowId) { 12 13 var body = new URLSearchParams({ action: action, nonce: config.nonce }); 14 if (flowId) body.set('flow_id', flowId); 13 15 return fetch(config.ajaxUrl, { method: 'POST', credentials: 'same-origin', headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' }, body: body.toString() }) 14 16 .then(function (response) { return response.json(); }); … … 32 34 link.target = '_blank'; 33 35 link.rel = 'noopener noreferrer'; 34 link.textContent = 'Open the approval page';35 node.appendChild(document.createTextNode( 'Your browser blocked the approval tab.'));36 link.textContent = labels.approval_link; 37 node.appendChild(document.createTextNode(labels.blocked_tab + ' ')); 36 38 node.appendChild(link); 37 node.appendChild(document.createTextNode(' Code:' + userCode));39 node.appendChild(document.createTextNode(' ' + labels.code + ' ' + userCode)); 38 40 } 39 function poll(interval) { 41 function terminalError(message) { 42 awaitingManualApproval = false; 43 status(message, true, true); 44 var button = document.getElementById('paymos-edd-connect-button'); 45 if (button) button.disabled = false; 46 } 47 48 function poll(interval, flowId) { 40 49 window.setTimeout(function check() { 41 post(config.pollAction ).then(function (response) {42 if (!response.success) { status((response.data && response.data.message) || 'Paymos connection failed.', true); return; }50 post(config.pollAction, flowId).then(function (response) { 51 if (!response.success) { terminalError((response.data && response.data.message) || labels.failed); return; } 43 52 if (response.data.status === 'connected') { 44 53 awaitingManualApproval = false; 45 status( 'Paymos connected. Reloading…', false, true);54 status(labels.connected, false, true); 46 55 window.setTimeout(function () { window.location.reload(); }, 700); 47 56 return; 48 57 } 49 status('Waiting for approval in Paymos…', false); 50 window.setTimeout(check, response.data.status === 'slow_down' ? interval + 5000 : interval); 51 }).catch(function () { status('Paymos connection failed.', true); }); 58 // retry: Paymos could not be reached this time. The request is kept, so back off like slow_down. 59 var retry = response.data.status === 'retry'; 60 status((retry && response.data.message) || labels.waiting, false); 61 window.setTimeout(check, retry || response.data.status === 'slow_down' ? interval + 5000 : interval); 62 }).catch(function () { terminalError(labels.failed); }); 52 63 }, interval); 53 64 } … … 58 69 button.disabled = true; 59 70 awaitingManualApproval = false; 60 status( 'Starting secure connection…', false, true);71 status(labels.starting, false, true); 61 72 62 73 // Open the tab now, while the click is still a trusted user activation. Browsers … … 69 80 70 81 post(config.startAction).then(function (response) { 71 if (!response.success) throw new Error((response.data && response.data.message) || 'Paymos connection failed.');82 if (!response.success) throw new Error((response.data && response.data.message) || labels.failed); 72 83 if (tab && !tab.closed) { 73 84 tab.location = response.data.verification_url; 74 status( 'Waiting for approval. Code:' + response.data.user_code, false, true);85 status(labels.waiting + ' ' + labels.code + ' ' + response.data.user_code, false, true); 75 86 } else { 76 87 manualApproval(response.data.verification_url, response.data.user_code); … … 78 89 // Polling starts either way: a merchant who opens the link manually must still 79 90 // have their approval picked up. 80 poll(Math.max(1, Number(response.data.interval || 5)) * 1000 );91 poll(Math.max(1, Number(response.data.interval || 5)) * 1000, response.data.flow_id); 81 92 }).catch(function (error) { 82 93 if (tab && !tab.closed) tab.close(); 83 status(error.message || 'Paymos connection failed.', true, true); 84 button.disabled = false; 94 terminalError(error.message || labels.failed); 85 95 }); 86 96 }); -
paymos-easy-digital-downloads/trunk/assets/js/refunds.js
r3787430 r3804971 15 15 if (response.data && response.data.paymos_refund) { window.location.reload(); return; } 16 16 status.text(response.data && response.data.message ? response.data.message : labels.request_failed); refresh(); 17 }).fail(function () { status.text(labels.unknown || ''); }); 17 }).fail(function (xhr) { 18 var data = xhr.responseJSON && xhr.responseJSON.data; 19 status.text(data && data.message ? data.message : (labels.unknown || '')); 20 // Recover only an existing intent before permitting another attempt. 21 $.post(ajaxurl, {action: 'paymos_edd_refund', order_id: state.order_id, security: state.security, 22 mode: 'recover', paymos_refund_token: state.tokens[mode]}) 23 .done(function (response) { 24 if (response.data && response.data.paymos_refund) { window.location.reload(); return; } 25 refresh(); 26 }).fail(function () { refresh(); }); 27 }); 18 28 // Keep the same token after a timeout. A new click recovers this exact intent. 19 29 }); … … 22 32 $.post(ajaxurl, {action: 'paymos_edd_refund', order_id: state.order_id, security: state.security, mode: 'summary'}) 23 33 .done(function (response) { 24 if (!response.success) { status.text( labels.request_failed); return; }34 if (!response.success) { status.text(response.data && response.data.message ? response.data.message : labels.request_failed); return; } 25 35 var value = response.data, asset = value.refund_asset || {}; 26 summary.text((labels.full) + ': ' + (value.full_refund_amount || '0') + ' / ' 27 + (labels.overpayment) + ': ' + (value.overpayment_refund_amount || '0') 36 var amountsKnown = value.full_refund_amount != null && value.overpayment_refund_amount != null; 37 summary.text((amountsKnown ? (labels.full) + ': ' + value.full_refund_amount + ' / ' 38 + (labels.overpayment) + ': ' + value.overpayment_refund_amount : labels.server_calculates) 28 39 + ' ' + (asset.currency || '') + '/' + (asset.network || '') 29 40 + (value.sender_address ? ' → ' + value.sender_address : '')); 30 41 buttons.full.prop('disabled', value.can_refund_full !== true); 31 42 buttons.overpayment.prop('disabled', value.can_refund_overpayment !== true); 43 }).fail(function (xhr) { 44 var data = xhr.responseJSON && xhr.responseJSON.data; 45 if (!status.text()) { status.text(data && data.message ? data.message : labels.request_failed); } 32 46 }); 33 47 } -
paymos-easy-digital-downloads/trunk/composer.json
r3787430 r3804971 6 6 "require": { 7 7 "php": ">=7.4", 8 "paymos/php-sdk": "^1. 9.1"8 "paymos/php-sdk": "^1.10.0" 9 9 }, 10 10 "autoload": { -
paymos-easy-digital-downloads/trunk/includes/ConnectController.php
r3787430 r3804971 40 40 'startAction' => self::START_ACTION, 41 41 'pollAction' => self::POLL_ACTION, 42 'labels' => array( 43 'approval_link' => __('Open the approval page', 'paymos-easy-digital-downloads'), 44 'blocked_tab' => __('Your browser blocked the approval tab.', 'paymos-easy-digital-downloads'), 45 'code' => __('Code:', 'paymos-easy-digital-downloads'), 46 'failed' => __('Paymos connection failed.', 'paymos-easy-digital-downloads'), 47 'connected' => __('Paymos connected. Reloading…', 'paymos-easy-digital-downloads'), 48 'waiting' => __('Waiting for approval in Paymos…', 'paymos-easy-digital-downloads'), 49 'starting' => __('Starting secure connection…', 'paymos-easy-digital-downloads'), 50 ), 42 51 )); 43 52 } … … 45 54 public static function start() 46 55 { 56 check_ajax_referer(self::NONCE_ACTION, 'nonce'); 47 57 self::authorize(); 48 58 try { 49 59 $state = self::client()->start('easy-digital-downloads', self::sourceUrl(), self::settingsUrl()); 50 ConnectStateStore::save($state);60 $flowId = ConnectStateStore::save($state); 51 61 wp_send_json_success(array( 52 62 'verification_url' => $state['verification_url'], 53 63 'user_code' => $state['user_code'], 54 64 'interval' => $state['interval'], 65 'flow_id' => $flowId, 55 66 )); 56 67 } catch (\Throwable $exception) { 57 wp_send_json_error(array('message' => $exception->getMessage()), 400); 68 Logger::error('Paymos connection failed: ' . $exception->getMessage()); 69 wp_send_json_error(array('message' => __('Paymos connection failed.', 'paymos-easy-digital-downloads')), 400); 58 70 } 59 71 } … … 61 73 public static function poll() 62 74 { 75 check_ajax_referer(self::NONCE_ACTION, 'nonce'); 63 76 self::authorize(); 77 $flowId = isset($_POST['flow_id']) && is_string($_POST['flow_id']) 78 ? sanitize_text_field(wp_unslash($_POST['flow_id'])) : ''; 79 // A generated hex token needs no normalization: never accept a different raw value. 80 if ($flowId !== '' && ($_POST['flow_id'] !== $flowId || preg_match('/\A[a-f0-9]{32}\z/', $flowId) !== 1)) { 81 $flowId = ''; 82 } 64 83 try { 65 84 $state = ConnectStateStore::load(); 66 if (!isset($state['device_code'])) { 85 if (!isset($state['device_code'], $state['flow_id']) || $flowId === '' 86 || !hash_equals($state['flow_id'], $flowId)) { 67 87 throw new \RuntimeException('No active Paymos connection request.'); 68 88 } 69 $result = self::client()->poll((string) $state['device_code']); 89 try { 90 $result = self::client()->poll((string) $state['device_code']); 91 } catch (\Throwable $exception) { 92 // A network or server failure says nothing about the device code: keep the request 93 // and let the page poll again until Paymos answers or the request expires locally. 94 Logger::error('Paymos connection poll failed, retrying: ' . $exception->getMessage()); 95 wp_send_json_success(array('status' => 'retry', 'message' => $exception->getMessage())); 96 return; 97 } 70 98 if ($result['status'] === 'connected') { 71 99 if ($result['plugin'] !== 'edd' … … 76 104 throw new \RuntimeException('Paymos connection response does not match this store.'); 77 105 } 78 CredentialStore::save($result['credentials']); 79 ConnectStateStore::clear(); 106 if (!ConnectStateStore::complete($flowId, $result['credentials'])) { 107 throw new \RuntimeException('Paymos connection request was replaced.'); 108 } 80 109 Config::reset_for_tests(); 81 110 wp_send_json_success(array('status' => 'connected')); 111 return; 82 112 } 83 113 if (in_array($result['status'], array('authorization_pending', 'slow_down'), true)) { 84 114 wp_send_json_success(array('status' => $result['status'])); 115 return; 85 116 } 86 ConnectStateStore::clear( );87 wp_send_json_error(array('message' => 'Paymos connection was denied or expired.'), 409);117 ConnectStateStore::clear($flowId); 118 wp_send_json_error(array('message' => __('Paymos connection was denied or expired.', 'paymos-easy-digital-downloads')), 409); 88 119 } catch (\Throwable $exception) { 89 ConnectStateStore::clear(); 90 wp_send_json_error(array('message' => $exception->getMessage()), 400); 120 try { ConnectStateStore::clear($flowId); } catch (\Throwable $cleanupError) { /* Preserve the original failure. */ } 121 Logger::error('Paymos connection failed: ' . $exception->getMessage()); 122 wp_send_json_error(array('message' => __('Paymos connection failed.', 'paymos-easy-digital-downloads')), 400); 91 123 } 92 124 } … … 94 126 private static function authorize() 95 127 { 96 check_ajax_referer(self::NONCE_ACTION, 'nonce');97 128 if (!current_user_can('manage_shop_settings')) { 98 wp_send_json_error(array('message' => 'Access denied.'), 403);129 wp_send_json_error(array('message' => __('Access denied.', 'paymos-easy-digital-downloads')), 403); 99 130 } 100 131 } -
paymos-easy-digital-downloads/trunk/includes/ConnectStateStore.php
r3787430 r3804971 6 6 7 7 use Paymos\Plugin\WordPressEncryptedOption; 8 use Paymos\Plugin\WordPressOrderLock; 8 9 9 10 defined('ABSPATH') || exit; … … 20 21 } 21 22 $state['expires_at'] = (int) $state['started_at'] + (int) $state['expires_in']; 22 WordPressEncryptedOption::save(self::OPTION_KEY, self::AAD, array( 23 'schema' => 1, 24 'state' => $state, 25 )); 23 $state['flow_id'] = bin2hex(random_bytes(16)); 24 return self::locked(static function () use ($state) { 25 WordPressEncryptedOption::save(self::OPTION_KEY, self::AAD, array('schema' => 1, 'state' => $state)); 26 return $state['flow_id']; 27 }); 26 28 } 27 29 28 30 public static function load() 31 { 32 return self::locked(static function () { return self::read(); }); 33 } 34 35 private static function read() 29 36 { 30 37 $payload = WordPressEncryptedOption::load(self::OPTION_KEY, self::AAD); … … 38 45 } 39 46 if (!isset($payload['state']['expires_at']) || time() >= (int) $payload['state']['expires_at']) { 40 self::clear();47 WordPressEncryptedOption::delete(self::OPTION_KEY); 41 48 return array(); 42 49 } … … 44 51 } 45 52 46 public static function clear( )53 public static function clear($flowId) 47 54 { 48 WordPressEncryptedOption::delete(self::OPTION_KEY); 55 return self::finish($flowId, null); 56 } 57 58 public static function complete($flowId, array $credentials) 59 { 60 return self::finish($flowId, $credentials); 61 } 62 63 private static function finish($flowId, $credentials) 64 { 65 return self::locked(static function () use ($flowId, $credentials) { 66 $state = self::read(); 67 if (!is_string($flowId) || $flowId === '' || !isset($state['flow_id']) 68 || !hash_equals($state['flow_id'], $flowId)) { 69 return false; 70 } 71 if ($credentials !== null) { 72 CredentialStore::save($credentials); 73 } 74 WordPressEncryptedOption::delete(self::OPTION_KEY); 75 return true; 76 }); 77 } 78 79 private static function locked(callable $operation) 80 { 81 $lock = new WordPressOrderLock('edd-connect', self::OPTION_KEY); 82 if (!$lock->acquire()) { 83 throw new \RuntimeException('Paymos connection state is busy.'); 84 } 85 try { 86 // A previous poll may have cached the old option before a new start. 87 wp_cache_delete(self::OPTION_KEY, 'options'); 88 wp_cache_delete('alloptions', 'options'); 89 wp_cache_delete('notoptions', 'options'); 90 $lock->assertOwned(); 91 return $operation(); 92 } finally { 93 $lock->release(); 94 } 49 95 } 50 96 } -
paymos-easy-digital-downloads/trunk/includes/EventStore.php
r3787430 r3804971 80 80 // phpcs:enable WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter 81 81 if ($created === false) { 82 throw new \RuntimeException('Paymos event storage is unavailable.');82 throw new EventStorageException('Paymos event storage is unavailable.'); 83 83 } 84 84 // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- Uncached native schema inspection during the versioned upgrade. 85 85 $column = $wpdb->get_row($wpdb->prepare('SHOW COLUMNS FROM %i LIKE %s', $table, 'owner_token'), ARRAY_A); 86 self::assertReadSucceeded(); 86 87 // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- Versioned owner-token migration in the integration-owned table. 87 88 if (!is_array($column) && $wpdb->query($wpdb->prepare("ALTER TABLE %i ADD owner_token char(32) NOT NULL DEFAULT ''", $table)) === false) { 88 throw new \RuntimeException('Paymos event storage upgrade failed.');89 throw new EventStorageException('Paymos event storage upgrade failed.'); 89 90 } 90 91 update_option(self::SCHEMA_OPTION, self::SCHEMA_VERSION, false); … … 96 97 self::ensureTable(); 97 98 if ($this->pendingHash !== '') { 98 throw new \RuntimeException('Paymos event reservation is already owned.');99 throw new EventStorageException('Paymos event reservation is already owned.'); 99 100 } 100 101 self::purgeExpired(); … … 108 109 )); 109 110 if ($inserted === false) { 110 throw new \RuntimeException('Paymos event reservation failed.');111 throw new EventStorageException('Paymos event reservation failed.'); 111 112 } 112 113 if ($inserted !== 1) { 113 114 // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- Read the current owner for a fenced compare-and-swap, never a cached lease. 114 115 $row = $wpdb->get_row($wpdb->prepare('SELECT owner_token,status,expires_at FROM %i WHERE event_hash=%s', self::tableName(), $hash), ARRAY_A); 116 self::assertReadSucceeded(); 115 117 if (!is_array($row) || (int) $row['expires_at'] > $now) { 116 118 return false; … … 123 125 )); 124 126 if ($inserted === false) { 125 throw new \RuntimeException('Paymos event reservation failed.');127 throw new EventStorageException('Paymos event reservation failed.'); 126 128 } 127 129 if ($inserted !== 1) { … … 141 143 // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- Deduplication requires current committed state from SQL. 142 144 $row = $wpdb->get_row($wpdb->prepare('SELECT status,expires_at FROM %i WHERE event_hash=%s', self::tableName(), md5((string) $eventId)), ARRAY_A); 145 self::assertReadSucceeded(); 143 146 return is_array($row) && $row['status'] === 'committed' && (int) $row['expires_at'] > time(); 144 147 } … … 159 162 )); 160 163 if ($updated !== 1) { 161 throw new \RuntimeException('Paymos event reservation ownership was lost.');164 throw new EventStorageException('Paymos event reservation ownership was lost.'); 162 165 } 163 166 $this->clearPending(); … … 175 178 $this->clearPending(); 176 179 if ($deleted === false) { 177 throw new \RuntimeException('Paymos event reservation release failed.');180 throw new EventStorageException('Paymos event reservation release failed.'); 178 181 } 179 182 } … … 186 189 // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- Prepared indexed cleanup removes at most 100 expired rows. 187 190 if ($wpdb->query($wpdb->prepare('DELETE FROM %i WHERE expires_at<=%d ORDER BY expires_at ASC LIMIT 100', self::tableName(), time())) === false) { 188 throw new \RuntimeException('Paymos expired event cleanup failed.');191 throw new EventStorageException('Paymos expired event cleanup failed.'); 189 192 } 190 193 } … … 210 213 foreach (array('query', 'prepare', 'get_row') as $method) { 211 214 if (!is_object($wpdb) || !method_exists($wpdb, $method)) { 212 throw new \RuntimeException('Paymos requires durable database event storage.'); 213 } 215 throw new EventStorageException('Paymos requires durable database event storage.'); 216 } 217 } 218 } 219 220 private static function assertReadSucceeded() 221 { 222 global $wpdb; 223 if (!empty($wpdb->last_error)) { 224 throw new EventStorageException('Paymos event storage read failed.'); 214 225 } 215 226 } -
paymos-easy-digital-downloads/trunk/includes/Gateway.php
r3787430 r3804971 285 285 $lock->assertOwned(); 286 286 self::assertCreatedInvoice($invoice, PaymentRepository::getMeta($paymentId, '_paymos_invoice_id')); 287 // Bind a recovered response before renewal archives this generation. 288 PaymentRepository::updateMeta($paymentId, '_paymos_invoice_id', $invoice['invoice_id']); 287 289 if (InvoiceRenewal::isRequired($invoice)) { 288 290 // An idempotent create can return the same closed invoice on a … … 446 448 throw new \RuntimeException('Paymos previous invoice needs manual review.'); 447 449 } 450 PaymentRepository::updateMeta($paymentId, '_paymos_invoice_id', $oldInvoiceId); 448 451 } 449 452 return self::storeNewIntent($paymentId, $environment, $config, $amount, $currency, $clientId, $lock); … … 452 455 private static function storeNewIntent($paymentId, $environment, array $config, $amount, $currency, $clientId, WordPressOrderLock $lock) 453 456 { 457 $lock->assertOwned(); 458 PaymentRepository::archiveInvoiceBinding($paymentId); 454 459 $external = 'edd_' . (int) $paymentId . '_' . bin2hex(random_bytes(16)); 455 460 $lock->assertOwned(); -
paymos-easy-digital-downloads/trunk/includes/PaymentMapper.php
r3787430 r3804971 51 51 $previousStatus = in_array($legacyStatus, array('underpaid', 'expired', 'cancelled'), true) ? $legacyStatus : ''; 52 52 } 53 $this->recordEvent($paymentId, $event, $eventType); 53 if ($action !== StatusMapper::ACTION_NOTE_PAID_LATE) { 54 $this->recordEvent($paymentId, $event, $eventType); 55 } 54 56 55 57 if (PaymentRepository::isProtected($paymentId) && $action !== StatusMapper::ACTION_NOTE_PAID_LATE) { -
paymos-easy-digital-downloads/trunk/includes/PaymentRepository.php
r3787430 r3804971 44 44 $value = get_post_meta((int) $paymentId, (string) $key, true); 45 45 return is_scalar($value) ? (string) $value : ''; 46 } 47 48 /** Save the exact old identity before clearing the current invoice generation. */ 49 public static function archiveInvoiceBinding($paymentId) 50 { 51 $invoiceId = self::getMeta($paymentId, '_paymos_invoice_id'); 52 if ($invoiceId === '') { 53 return; 54 } 55 $binding = array('invoice_id' => $invoiceId); 56 foreach (array('external_order_id', 'project_id', 'environment', 'invoice_amount', 'invoice_currency') as $field) { 57 $value = self::getMeta($paymentId, '_paymos_' . $field); 58 if ($value === '') { 59 throw new \RuntimeException('Paymos previous invoice binding is incomplete.'); 60 } 61 $binding[str_replace('invoice_', '', $field)] = $value; 62 } 63 $stored = self::getMeta($paymentId, '_paymos_invoice_history'); 64 $history = $stored === '' ? array() : json_decode($stored, true); 65 if (!is_array($history)) { 66 throw new \RuntimeException('Paymos invoice binding history is invalid.'); 67 } 68 $history[$invoiceId] = $binding; 69 self::updateMeta($paymentId, '_paymos_invoice_history', json_encode($history, JSON_THROW_ON_ERROR)); 70 } 71 72 public static function historicalInvoiceBinding($paymentId, $invoiceId) 73 { 74 $history = json_decode(self::getMeta($paymentId, '_paymos_invoice_history'), true); 75 return is_array($history) && isset($history[$invoiceId]) && is_array($history[$invoiceId]) 76 ? $history[$invoiceId] : array(); 46 77 } 47 78 -
paymos-easy-digital-downloads/trunk/includes/RefundAdapter.php
r3787430 r3804971 127 127 'mode' => $mode, 'full_draft' => $draft, 128 128 )); 129 if (($reason = $this->preflight($intent)) !== null) { throw new \RuntimeException(esc_html($reason)); } 129 if (($reason = $this->preflight($intent)) !== null) { 130 $message = $reason === \Paymos\Plugin\NativeRefundProjectorInterface::PREFLIGHT_RETRY 131 ? 'refund_preflight_unavailable' 132 : $reason; 133 throw new \RuntimeException(esc_html($message)); 134 } 130 135 $intent = $this->store->createIntent($intent); // Commits before coordinator HTTP. 131 136 $this->coordinator($intent)->submit($intent->operationId()); 132 137 $this->reconcile($intent->operationId()); 133 138 return $this->store->getIntent($intent->operationId()); 139 }); 140 } 141 142 /** Recover a saved AJAX request without creating another intent. */ 143 public function recover(string $paymentKey, string $token): ?array 144 { 145 if (!preg_match('/^[a-zA-Z0-9_-]{16,64}$/D', $token)) { throw new \RuntimeException('refund_request_invalid'); } 146 return $this->store->withPaymentLock($paymentKey, function () use ($paymentKey, $token) { 147 $intent = $this->store->findByRequestToken($this->installationId(), $token); 148 if ($intent === null) { return null; } 149 if ($intent->paymentKey() !== $paymentKey) { throw new \RuntimeException('refund_request_conflict'); } 150 $this->assertMapping($this->store->loadOrder(), $intent); 151 $this->reconcile($intent->operationId()); 152 return $this->view($this->store->getIntent($intent->operationId())); 134 153 }); 135 154 } … … 145 164 $this->assertOriginalPaid($order); 146 165 if ($intent->fullDraft() !== null) { $this->assertDraft($order, $intent->fullDraft()); } 147 $invoice = $this->client($intent->environment())->invoices()->get($intent->invoiceId()); 166 try { 167 $invoice = $this->client($intent->environment())->invoices()->get($intent->invoiceId()); 168 } catch (\Paymos\Exception\ApiException $error) { 169 if ($error->statusCode() === 429 || $error->statusCode() >= 500) { 170 return \Paymos\Plugin\NativeRefundProjectorInterface::PREFLIGHT_RETRY; 171 } 172 return $error->errorCode() !== '' ? $error->errorCode() : $error->getMessage(); 173 } catch (\RuntimeException $error) { 174 return \Paymos\Plugin\NativeRefundProjectorInterface::PREFLIGHT_RETRY; 175 } 148 176 $this->store->assertOwned(); 149 177 $this->assertInvoice($invoice, $order); … … 153 181 if ($intent->fullDraft() !== null) { $this->assertDraft($fresh, $intent->fullDraft()); } 154 182 $summary = $this->invoiceSummary($invoice); 183 if (!array_key_exists('refund_summary', $invoice)) { 184 $summary = $this->suppressCompletedOverpayment($summary, $intent->paymentKey()); 185 } 155 186 $flag = $intent->mode() === RefundStates::FULL ? 'can_refund_full' : 'can_refund_overpayment'; 156 187 if (!isset($summary[$flag]) || $summary[$flag] !== true) { … … 407 438 if ($external['review_reason'] !== null || $external['observation']['mode'] === RefundStates::FULL) { throw new \RuntimeException('refund_external_requires_review'); } 408 439 } 440 if (!array_key_exists('refund_summary', $invoice)) { 441 $summary = $this->suppressCompletedOverpayment($summary, $this->store->paymentKey()); 442 } 409 443 } catch (\Throwable $error) { $summary['can_refund_full'] = false; $summary['can_refund_overpayment'] = false; $summary['local_unavailable_reason'] = $error->getMessage(); } 410 444 return $summary; 411 445 }); 446 } 447 448 private function suppressCompletedOverpayment(array $summary, string $paymentKey): array 449 { 450 foreach ($this->store->forPayment($paymentKey) as $intent) { 451 if ($intent->mode() === RefundStates::OVERPAYMENT && $intent->cashState() === RefundStates::COMPLETED) { 452 $summary['can_refund_overpayment'] = false; 453 } 454 } 455 foreach ($this->store->externalForPayment($paymentKey) as $external) { 456 if ($external['observation']['mode'] === RefundStates::OVERPAYMENT 457 && $external['observation']['status'] === RefundStates::COMPLETED) { 458 $summary['can_refund_overpayment'] = false; 459 } 460 } 461 return $summary; 412 462 } 413 463 … … 424 474 'can_refund_full' => $paid, 425 475 'can_refund_overpayment' => $overpaid, 426 'full_refund_amount' => isset($payment['paid']) && is_string($payment['paid']) ? $payment['paid'] : ($paid ? (string) ($invoice['order']['amount'] ?? '0') : '0'), 427 'overpayment_refund_amount' => $overpaid && isset($payment['paid']) && is_string($payment['paid']) ? $payment['paid'] : '0', 476 // Gross does not establish the remaining cash after earlier refunds. 477 'full_refund_amount' => null, 478 'overpayment_refund_amount' => null, 428 479 'refund_asset' => isset($payment['currency'], $payment['network']) 429 480 ? array('currency' => $payment['currency'], 'network' => $payment['network']) : null, … … 737 788 $adapter = $adapter ?: new self(); 738 789 if ($mode === 'summary') { wp_send_json_success($adapter->summary((string) $id)); return; } 790 if ($mode === 'recover' && !$native) { 791 wp_send_json_success(array('paymos_refund' => $adapter->recover((string) $id, $token))); return; 792 } 739 793 $intent = $adapter->request((string) $id, $mode, $token, $input); 740 794 if ($native) { wp_send_json_error(array('message' => RefundCopy::message($adapter->view($intent)), 'paymos_refund' => $adapter->view($intent))); return; } … … 754 808 $settings = array('order_id' => $id, 'security' => wp_create_nonce('paymos_edd_refund_' . $id), 755 809 'labels' => array_merge(RefundCopy::labels(), array('full' => RefundCopy::text('full_action'), 756 'overpayment' => RefundCopy::text('overpayment_action'))), 810 'overpayment' => RefundCopy::text('overpayment_action'), 811 'server_calculates' => __('Paymos calculates the available refund amount when you submit the request.', 'paymos-easy-digital-downloads'))), 757 812 'tokens' => array('full' => wp_generate_uuid4(), 'overpayment' => wp_generate_uuid4())); 758 813 try { -
paymos-easy-digital-downloads/trunk/includes/WebhookController.php
r3787430 r3804971 79 79 Logger::error('Paymos webhook timestamp skew.'); 80 80 return new \WP_REST_Response(array('error' => 'bad_timestamp'), 401); 81 } catch (EventStorageException $e) { 82 try { $eventStore->release(); } catch (\Throwable $releaseError) { /* Preserve the storage failure. */ } 83 Logger::error('Paymos event storage failed: ' . $e->getMessage()); 84 return new \WP_REST_Response(array('error' => 'storage_failed'), 500); 81 85 } catch (\Throwable $e) { 82 86 try { … … 107 111 PaymentRepository::refresh($paymentId); 108 112 PaymentRepository::assertPaymosPayment($paymentId); 113 // Current pending intents recover by exact POST below; a missing invoice ID 114 // does not make their late-payment event a historical generation. 115 if ($event->type() === 'invoice.paid_late' 116 && PaymentRepository::getMeta($paymentId, '_paymos_external_order_id') !== $event->externalOrderId()) { 117 $binding = PaymentRepository::historicalInvoiceBinding($paymentId, $event->invoiceId()); 118 if (($binding['environment'] ?? '') !== $environment 119 || ($binding['external_order_id'] ?? '') !== $event->externalOrderId() 120 || !(new InvoiceReverseVerifier(self::client($environment)))->verify($event, $binding)->isVerified()) { 121 throw new \RuntimeException('Paymos historical invoice verification failed.'); 122 } 123 $lock->assertOwned(); 124 (new PaymentMapper())->apply($paymentId, $event->toArray(), $lock); 125 return; 126 } 109 127 self::assertPaymentMatchesEvent($paymentId, $event, $environment, $lock); 110 128 self::reverseVerifyTerminalEvent($event, $paymentId, $environment); … … 216 234 if (!isset($config[$required]) || !is_scalar($config[$required]) || trim((string) $config[$required]) === '') { 217 235 // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Diagnostic exception is caught and logged, never rendered as HTML. 218 throw new \RuntimeException('Paymos connected credentials are missing ' . $required . ' for ' . (string) $environment . '.');236 throw new EventStorageException('Paymos connected credentials are missing ' . $required . ' for ' . (string) $environment . '.'); 219 237 } 220 238 } -
paymos-easy-digital-downloads/trunk/paymos-easy-digital-downloads.php
r3787430 r3804971 4 4 * Plugin URI: https://paymos.io/docs/cms-easy-digital-downloads 5 5 * Description: Accept stablecoin payments in Easy Digital Downloads through Paymos. 6 * Version: 1. 6.26 * Version: 1.7.8 7 7 * Author: Paymos 8 8 * Author URI: https://paymos.io … … 18 18 define('PAYMOS_EDD_PLUGIN_FILE', __FILE__); 19 19 define('PAYMOS_EDD_PLUGIN_DIR', plugin_dir_path(__FILE__)); 20 define('PAYMOS_EDD_PLUGIN_VERSION', '1. 6.2');20 define('PAYMOS_EDD_PLUGIN_VERSION', '1.7.8'); 21 21 22 22 require_once PAYMOS_EDD_PLUGIN_DIR . 'includes/Autoloader.php'; -
paymos-easy-digital-downloads/trunk/readme.txt
r3787430 r3804971 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 6.27 Stable tag: 1.7.8 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 47 47 == Changelog == 48 48 49 = 1.6.2 = 50 * fix(cms): align marketplace manifests, refund copy, store links, and release guards 51 * chore: bundle Paymos PHP SDK v1.9.1 49 = 1.7.8 = 52 50 * chore: rebuild canonical CMS package 53 51 54 = 1.6.1 = 55 * fix(plugins): use wp_add_inline_script, sanitize nonces before wp_verify_nonce, and guard curl_close on PHP 8+ 56 * chore: bundle Paymos PHP SDK v1.9.1 57 58 * Moved optional Paymos diagnostics from PHP error_log to the EDD debug log, with masking for supported key patterns. Logging remains off by default. 59 60 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 61 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 62 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 63 64 Fixed: 65 * Entries that were present, non-empty and still English — `Connect Paymos` in 66 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 67 Chinese — and one string missing from every catalogue 68 (`in the invoice currency`, the fallback in the underpayment notice). 69 * A late non-final webhook could reopen a finished order. Webhooks are 70 delivered at least once and in no particular order, and only paid orders were 71 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 72 the invoice had already ended underpaid, expired or cancelled moved the order 73 back into an open state. Nothing leaves a final status on the server, so once 74 one is recorded for an invoice every later event for it is ignored and the 75 final status stays recorded. 76 * A new invoice now resets the Paymos status recorded on the payment, so an 77 event for it is never taken for a stale one after an earlier final status. 78 * A webhook retry that arrived while the first delivery was still being 79 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 80 retries, while a slow reverse-verification call can take longer; the retry was 81 acknowledged as delivered, and if the first attempt then failed the event was 82 lost. An event that is only locked, not yet committed, is now answered 409 so 83 Paymos tries again, and the lock the first delivery holds is left alone. 84 85 = 1.6.0 = 86 * feat(refunds): finalize clean merchant refunds spec, SDKs, CMS plugins, and targeted test scripts 87 * wip: snapshot shared working tree before merging main 88 * wip(refunds): merchant refund plugin work (CMS adapters, PHP SDK, tests) - unverified WIP snapshot 89 * chore: bundle Paymos PHP SDK v1.9.0 52 = 1.7.7 = 53 * fix(plugins): guard PHP 8.5 setAccessible deprecations and Drupal SDK path in tests 54 * fix(refunds): decouple refund RBAC from Withdraw and unify 12 CMS refund adapters 90 55 * chore: rebuild canonical CMS package 91 56 92 * Moved optional Paymos diagnostics from PHP error_log to the EDD debug log, with masking for supported key patterns. Logging remains off by default. 57 = 1.7.6 = 58 * fix(woocommerce,edd): a network error during Connect keeps the flow alive 93 59 94 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 95 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 96 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 97 98 Fixed: 99 * Entries that were present, non-empty and still English — `Connect Paymos` in 100 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 101 Chinese — and one string missing from every catalogue 102 (`in the invoice currency`, the fallback in the underpayment notice). 103 * A late non-final webhook could reopen a finished order. Webhooks are 104 delivered at least once and in no particular order, and only paid orders were 105 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 106 the invoice had already ended underpaid, expired or cancelled moved the order 107 back into an open state. Nothing leaves a final status on the server, so once 108 one is recorded for an invoice every later event for it is ignored and the 109 final status stays recorded. 110 * A new invoice now resets the Paymos status recorded on the payment, so an 111 event for it is never taken for a stale one after an earlier final status. 112 * A webhook retry that arrived while the first delivery was still being 113 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 114 retries, while a slow reverse-verification call can take longer; the retry was 115 acknowledged as delivered, and if the first attempt then failed the event was 116 lost. An event that is only locked, not yet committed, is now answered 409 so 117 Paymos tries again, and the lock the first delivery holds is left alone. 118 119 = 1.5.4 = 120 * chore: bundle Paymos PHP SDK v1.8.1 121 122 * Moved optional Paymos diagnostics from PHP error_log to the EDD debug log, with masking for supported key patterns. Logging remains off by default. 123 124 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 125 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 126 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 127 128 Fixed: 129 * Entries that were present, non-empty and still English — `Connect Paymos` in 130 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 131 Chinese — and one string missing from every catalogue 132 (`in the invoice currency`, the fallback in the underpayment notice). 133 * A late non-final webhook could reopen a finished order. Webhooks are 134 delivered at least once and in no particular order, and only paid orders were 135 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 136 the invoice had already ended underpaid, expired or cancelled moved the order 137 back into an open state. Nothing leaves a final status on the server, so once 138 one is recorded for an invoice every later event for it is ignored and the 139 final status stays recorded. 140 * A new invoice now resets the Paymos status recorded on the payment, so an 141 event for it is never taken for a stale one after an earlier final status. 142 * A webhook retry that arrived while the first delivery was still being 143 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 144 retries, while a slow reverse-verification call can take longer; the retry was 145 acknowledged as delivered, and if the first attempt then failed the event was 146 lost. An event that is only locked, not yet committed, is now answered 409 so 147 Paymos tries again, and the lock the first delivery holds is left alone. 148 149 = 1.5.3 = 60 = 1.7.5 = 150 61 * chore: rebuild canonical CMS package 151 62 152 * Moved optional Paymos diagnostics from PHP error_log to the EDD debug log, with masking for supported key patterns. Logging remains off by default. 153 154 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 155 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 156 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 157 158 Fixed: 159 * Entries that were present, non-empty and still English — `Connect Paymos` in 160 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 161 Chinese — and one string missing from every catalogue 162 (`in the invoice currency`, the fallback in the underpayment notice). 163 * A late non-final webhook could reopen a finished order. Webhooks are 164 delivered at least once and in no particular order, and only paid orders were 165 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 166 the invoice had already ended underpaid, expired or cancelled moved the order 167 back into an open state. Nothing leaves a final status on the server, so once 168 one is recorded for an invoice every later event for it is ignored and the 169 final status stays recorded. 170 * A new invoice now resets the Paymos status recorded on the payment, so an 171 event for it is never taken for a stale one after an earlier final status. 172 * A webhook retry that arrived while the first delivery was still being 173 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 174 retries, while a slow reverse-verification call can take longer; the retry was 175 acknowledged as delivered, and if the first attempt then failed the event was 176 lost. An event that is only locked, not yet committed, is now answered 409 so 177 Paymos tries again, and the lock the first delivery holds is left alone. 178 179 = 1.5.2 = 180 * fix(edd): validate refund controls and prepare directory database queries 181 182 * Moved optional Paymos diagnostics from PHP error_log to the EDD debug log, with masking for supported key patterns. Logging remains off by default. 183 184 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 185 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 186 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 187 188 Fixed: 189 * Entries that were present, non-empty and still English — `Connect Paymos` in 190 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 191 Chinese — and one string missing from every catalogue 192 (`in the invoice currency`, the fallback in the underpayment notice). 193 * A late non-final webhook could reopen a finished order. Webhooks are 194 delivered at least once and in no particular order, and only paid orders were 195 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 196 the invoice had already ended underpaid, expired or cancelled moved the order 197 back into an open state. Nothing leaves a final status on the server, so once 198 one is recorded for an invoice every later event for it is ignored and the 199 final status stays recorded. 200 * A new invoice now resets the Paymos status recorded on the payment, so an 201 event for it is never taken for a stale one after an earlier final status. 202 * A webhook retry that arrived while the first delivery was still being 203 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 204 retries, while a slow reverse-verification call can take longer; the retry was 205 acknowledged as delivered, and if the first attempt then failed the event was 206 lost. An event that is only locked, not yet committed, is now answered 409 so 207 Paymos tries again, and the lock the first delivery holds is left alone. 208 209 = 1.5.1 = 210 * fix(plugins): require helper-complete PHP SDK for refunds 211 212 * Moved optional Paymos diagnostics from PHP error_log to the EDD debug log, with masking for supported key patterns. Logging remains off by default. 213 214 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 215 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 216 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 217 218 Fixed: 219 * Entries that were present, non-empty and still English — `Connect Paymos` in 220 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 221 Chinese — and one string missing from every catalogue 222 (`in the invoice currency`, the fallback in the underpayment notice). 223 * A late non-final webhook could reopen a finished order. Webhooks are 224 delivered at least once and in no particular order, and only paid orders were 225 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 226 the invoice had already ended underpaid, expired or cancelled moved the order 227 back into an open state. Nothing leaves a final status on the server, so once 228 one is recorded for an invoice every later event for it is ignored and the 229 final status stays recorded. 230 * A new invoice now resets the Paymos status recorded on the payment, so an 231 event for it is never taken for a stale one after an earlier final status. 232 * A webhook retry that arrived while the first delivery was still being 233 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 234 retries, while a slow reverse-verification call can take longer; the retry was 235 acknowledged as delivered, and if the first attempt then failed the event was 236 lost. An event that is only locked, not yet committed, is now answered 409 so 237 Paymos tries again, and the lock the first delivery holds is left alone. 238 239 = 1.5.0 = 240 * fix(ton): return friendly addresses with existing webhook schema 241 * feat(edd): native refund adapter for full and overpayment refunds 242 * fix(edd): refuse native refunds that bypass the Paymos gateway 243 * fix(edd): prepare clean WordPress.org distribution 244 * chore: bundle Paymos PHP SDK v1.8.0 63 = 1.7.4 = 245 64 * chore: rebuild canonical CMS package 246 65 247 * Moved optional Paymos diagnostics from PHP error_log to the EDD debug log, with masking for supported key patterns. Logging remains off by default. 66 = 1.7.3 = 67 * merge: integrate Windows WIP onto origin/main (CMS binding, SDK preview, dashboard, plugins, specs) 68 * chore: bundle Paymos PHP SDK v1.10.2 248 69 249 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 250 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 251 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 252 253 Fixed: 254 * Entries that were present, non-empty and still English — `Connect Paymos` in 255 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 256 Chinese — and one string missing from every catalogue 257 (`in the invoice currency`, the fallback in the underpayment notice). 258 * A late non-final webhook could reopen a finished order. Webhooks are 259 delivered at least once and in no particular order, and only paid orders were 260 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 261 the invoice had already ended underpaid, expired or cancelled moved the order 262 back into an open state. Nothing leaves a final status on the server, so once 263 one is recorded for an invoice every later event for it is ignored and the 264 final status stays recorded. 265 * A new invoice now resets the Paymos status recorded on the payment, so an 266 event for it is never taken for a stale one after an earlier final status. 267 * A webhook retry that arrived while the first delivery was still being 268 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 269 retries, while a slow reverse-verification call can take longer; the retry was 270 acknowledged as delivered, and if the first attempt then failed the event was 271 lost. An event that is only locked, not yet committed, is now answered 409 so 272 Paymos tries again, and the lock the first delivery holds is left alone. 273 274 = 1.4.10 = 70 = 1.7.2 = 275 71 * chore: rebuild canonical CMS package 276 72 277 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 278 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 279 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 280 281 Fixed: 282 * Entries that were present, non-empty and still English — `Connect Paymos` in 283 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 284 Chinese — and one string missing from every catalogue 285 (`in the invoice currency`, the fallback in the underpayment notice). 286 * A late non-final webhook could reopen a finished order. Webhooks are 287 delivered at least once and in no particular order, and only paid orders were 288 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 289 the invoice had already ended underpaid, expired or cancelled moved the order 290 back into an open state. Nothing leaves a final status on the server, so once 291 one is recorded for an invoice every later event for it is ignored and the 292 final status stays recorded. 293 * A new invoice now resets the Paymos status recorded on the payment, so an 294 event for it is never taken for a stale one after an earlier final status. 295 * A webhook retry that arrived while the first delivery was still being 296 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 297 retries, while a slow reverse-verification call can take longer; the retry was 298 acknowledged as delivered, and if the first attempt then failed the event was 299 lost. An event that is only locked, not yet committed, is now answered 409 so 300 Paymos tries again, and the lock the first delivery holds is left alone. 301 302 = 1.4.9 = 73 = 1.7.1 = 74 * chore: bundle Paymos PHP SDK v1.10.1 303 75 * chore: rebuild canonical CMS package 304 76 305 * Compare amounts as exact decimals and require complete invoice snapshots plus API confirmation before changing payment state. 306 * Serialize order updates and recover when native payment completion returns `false` from save or status updates. 307 * Check ownership when updating event reservations, and purge at most 100 expired records per reservation. 77 = 1.7.0 = 78 * fix(plugins): unblock WordPress checks and align native recovery tests 79 * feat(notifications): rewrite all 71 email and 52 Telegram RU templates, lifecycle series, and R01-R34 audit fixes 80 * chore: bundle Paymos PHP SDK v1.10.0 81 * chore: rebuild canonical CMS package 308 82 309 Fixed: 310 * Entries that were present, non-empty and still English — `Connect Paymos` in 311 German and Spanish, the plugin name in Turkish and Chinese, `Webhook URL` in 312 Chinese — and one string missing from every catalogue 313 (`in the invoice currency`, the fallback in the underpayment notice). 314 * A late non-final webhook could reopen a finished order. Webhooks are 315 delivered at least once and in no particular order, and only paid orders were 316 guarded: an `invoice.underpaid_waiting` or `invoice.confirming` arriving after 317 the invoice had already ended underpaid, expired or cancelled moved the order 318 back into an open state. Nothing leaves a final status on the server, so once 319 one is recorded for an invoice every later event for it is ignored and the 320 final status stays recorded. 321 * A new invoice now resets the Paymos status recorded on the payment, so an 322 event for it is never taken for a stale one after an earlier final status. 323 * A webhook retry that arrived while the first delivery was still being 324 processed was answered 200 "duplicate". Paymos gives a delivery 10 seconds and 325 retries, while a slow reverse-verification call can take longer; the retry was 326 acknowledged as delivered, and if the first attempt then failed the event was 327 lost. An event that is only locked, not yet committed, is now answered 409 so 328 Paymos tries again, and the lock the first delivery holds is left alone. 83 = 1.6.5 = 84 * chore: rebuild canonical CMS package 329 85 -
paymos-easy-digital-downloads/trunk/vendor/paymos/php-sdk/bundle-manifest.json
r3787430 r3804971 2 2 "schema": 1, 3 3 "package": "paymos/php-sdk", 4 "version": "1. 9.1",5 "tag": "v1. 9.1",6 "source_commit": "6 149157ab3059793314346b4655f546dcd2e2794",7 "sha256": " e5d187daf306e288b24ecce47ad9cf8a984be1bda720028eba6a19d9115f98b4",4 "version": "1.10.2", 5 "tag": "v1.10.2", 6 "source_commit": "6729b2fe8d3bdb9b284e04f6be100f737949f575", 7 "sha256": "587c9cfecb6c369fd121f1b82bf365c123984bce7beba4e4be81a06fcd9067a3", 8 8 "files": [ 9 9 { … … 119 119 { 120 120 "path": "src/Http/RetryingTransport.php", 121 "sha256": " 0fbbb4d38539c0e24334c28a6f8e071d350d70d6cbaadb03d6b559715ce507dc",122 "size": 2549121 "sha256": "be993bb9f8a8e67d503b9c13323f053e9222f7581de53a10c070958a6237ba32", 122 "size": 3176 123 123 }, 124 124 { … … 214 214 { 215 215 "path": "src/Plugin/NativeRefundProjectorInterface.php", 216 "sha256": " 395fffe53791853206bf57499bd98d7af331c9141779f7bc37bbd838cacabe3e",217 "size": 1 418216 "sha256": "ab10b3c942089870f349f5d455d29426cc0321c3310ed1f00cd1e5445c0d7b4d", 217 "size": 1672 218 218 }, 219 219 { 220 220 "path": "src/Plugin/RefundCoordinator.php", 221 "sha256": "4 4f00de23d044e6ad4cccd62896c2c9302b37d43bb956cf1302e77584a224475",222 "size": 11 079221 "sha256": "4c1e60bdfd6132b7eb5e266ddc5325b2ae30a113159618ad5b5f4dc7aace27b1", 222 "size": 11380 223 223 }, 224 224 { … … 284 284 { 285 285 "path": "src/Resources/BaseResource.php", 286 "sha256": " 2071a0c53d4696cc092197b1a2916c488f6ac6c2b1f1def1911d7abb82dc7ac1",287 "size": 5 039286 "sha256": "1539cfad31fe7e91f11de32b9c637a4cb143d8224c8eb350511ad3e81ee283b4", 287 "size": 5422 288 288 }, 289 289 { … … 304 304 { 305 305 "path": "src/Resources/Refunds.php", 306 "sha256": " 28aadaaef2aca45bd3f09d3e8cb3500e4ee3a5a1a9470f2f0fe5192d5f91a002",307 "size": 3 634306 "sha256": "5e8e7c4f74b504ba9324c96909b588a431f9207ec6b727250236f9396fd11381", 307 "size": 3963 308 308 }, 309 309 { … … 319 319 { 320 320 "path": "src/Version.php", 321 "sha256": " 3b07dc520c5d740286fcda161a6a78b13e1c9f13e96052cbf38e85870524c2f3",322 "size": 11 2321 "sha256": "576b8df424acfcef573705613b348ddda0c08b363e529979e9ea65eec372b6d5", 322 "size": 113 323 323 }, 324 324 { … … 359 359 { 360 360 "path": "src/Webhook/WebhookVerifier.php", 361 "sha256": " d688f4e94fcc0cdf6574bc64fd07e0cc438a0f54ea9c7c2e7eff94fa93752ea2",362 "size": 5 424361 "sha256": "89cce396de58d28a16bc8e161f0ada4b0db37903c06d1a833f480f147b60a199", 362 "size": 5509 363 363 } 364 364 ] -
paymos-easy-digital-downloads/trunk/vendor/paymos/php-sdk/src/Http/RetryingTransport.php
r3787430 r3804971 21 21 public function request($method, $url, array $headers, $body, $timeoutSeconds) 22 22 { 23 return $this->requestWithHeaderFactory($method, $url, static function () use ($headers) { 24 return $headers; 25 }, $body, $timeoutSeconds); 26 } 27 28 /** Rebuild timestamp-dependent authentication immediately before each physical attempt. */ 29 public function requestWithHeaderFactory($method, $url, callable $headerFactory, $body, $timeoutSeconds) 30 { 23 31 $attempt = 0; 24 32 25 33 do { 34 $headers = $this->inner instanceof self ? null : $headerFactory(); 26 35 try { 27 $response = $this->inner->request($method, $url, $headers, $body, $timeoutSeconds); 36 $response = $this->inner instanceof self 37 ? $this->inner->requestWithHeaderFactory($method, $url, $headerFactory, $body, $timeoutSeconds) 38 : $this->inner->request($method, $url, $headers, $body, $timeoutSeconds); 28 39 } catch (\RuntimeException $error) { 29 40 if (!$this->policy->shouldRetryTransportError($method) -
paymos-easy-digital-downloads/trunk/vendor/paymos/php-sdk/src/Plugin/NativeRefundProjectorInterface.php
r3787430 r3804971 7 7 interface NativeRefundProjectorInterface 8 8 { 9 /** Read unavailable before any cash POST: keep the saved intent retryable with the same key. */ 10 public const PREFLIGHT_RETRY = 'refund_preflight_retry'; 11 9 12 /** 10 13 * Fresh mapping, connection capability, full original paid total/refunded=0 and saved defaults. 11 14 * Return a review reason on ambiguity/manual changes; null permits the first POST. 15 * Return PREFLIGHT_RETRY for a transient provider read failure before the first POST. 12 16 * A replay of an unknown request must remain possible when new submissions are disabled. 13 17 */ -
paymos-easy-digital-downloads/trunk/vendor/paymos/php-sdk/src/Plugin/RefundCoordinator.php
r3787430 r3804971 113 113 if ($initial) { 114 114 $reason = $this->projector->preflight($intent); 115 if ($reason === NativeRefundProjectorInterface::PREFLIGHT_RETRY) { 116 $this->store->recordState($intent->operationId(), RefundStates::NOT_SUBMITTED, 117 RefundStates::PROJECTION_NONE, $reason); 118 return RefundStates::NOT_SUBMITTED; 119 } 115 120 if ($reason !== null) { 116 121 $this->review($intent, $reason); -
paymos-easy-digital-downloads/trunk/vendor/paymos/php-sdk/src/Resources/BaseResource.php
r3787430 r3804971 8 8 use Paymos\Exception\ApiException; 9 9 use Paymos\Http\RequestSigner; 10 use Paymos\Http\RetryingTransport; 10 11 use Paymos\Http\TransportInterface; 11 12 use Paymos\Version; … … 51 52 $signedQuery = $query === '' ? '' : '?' . ltrim((string) $query, '?'); 52 53 53 $timestamp = (string) call_user_func($this->clock); 54 $headers = array( 55 'Authorization' => RequestSigner::authorizationHeader( 56 $this->config->apiKey(), 57 $this->config->apiSecret(), 58 $timestamp, 59 $method, 60 $path, 61 $signedQuery, 62 $body 63 ), 64 'X-Request-Timestamp' => $timestamp, 65 'Content-Type' => 'application/json', 66 'Accept' => 'application/json', 67 'User-Agent' => 'paymos-php/' . Version::VERSION, 68 ); 54 $headerFactory = function () use ($method, $path, $signedQuery, $body) { 55 $timestamp = (string) call_user_func($this->clock); 56 return array( 57 'Authorization' => RequestSigner::authorizationHeader( 58 $this->config->apiKey(), 59 $this->config->apiSecret(), 60 $timestamp, 61 $method, 62 $path, 63 $signedQuery, 64 $body 65 ), 66 'X-Request-Timestamp' => $timestamp, 67 'Content-Type' => 'application/json', 68 'Accept' => 'application/json', 69 'User-Agent' => 'paymos-php/' . Version::VERSION, 70 ); 71 }; 69 72 70 73 $url = $this->config->baseUrl() . $path . $signedQuery; 71 $response = $this->transport->request($method, $url, $headers, $body, $this->config->timeoutSeconds()); 74 $response = $this->transport instanceof RetryingTransport 75 ? $this->transport->requestWithHeaderFactory($method, $url, $headerFactory, $body, $this->config->timeoutSeconds()) 76 : $this->transport->request($method, $url, $headerFactory(), $body, $this->config->timeoutSeconds()); 72 77 73 78 if ($response->statusCode() < 200 || $response->statusCode() >= 300) { -
paymos-easy-digital-downloads/trunk/vendor/paymos/php-sdk/src/Resources/Refunds.php
r3787430 r3804971 17 17 throw new \InvalidArgumentException('Refund create accepts only invoiceId, mode and externalOrderId.'); 18 18 } 19 if (trim($invoiceId) === '' || trim($externalOrderId) === '' || strlen($externalOrderId) > 200) { 20 throw new \InvalidArgumentException('Refund invoiceId and externalOrderId are required; key maximum is 200 bytes.'); 19 // .NET string limits count UTF-16 code units, including two for astral characters. 20 $characters = preg_match_all('/./us', $externalOrderId); 21 $surrogatePairs = preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $externalOrderId); 22 if (trim($invoiceId) === '' || trim($externalOrderId) === '' || $characters === false 23 || $surrogatePairs === false || $characters + $surrogatePairs > 200) { 24 throw new \InvalidArgumentException('Refund invoiceId and externalOrderId are required; key maximum is 200 UTF-16 code units.'); 21 25 } 22 26 if (!in_array($mode, array('full', 'overpayment'), true)) { -
paymos-easy-digital-downloads/trunk/vendor/paymos/php-sdk/src/Version.php
r3787430 r3804971 7 7 final class Version 8 8 { 9 public const VERSION = '1. 9.1';9 public const VERSION = '1.10.2'; 10 10 } -
paymos-easy-digital-downloads/trunk/vendor/paymos/php-sdk/src/Webhook/WebhookVerifier.php
r3787430 r3804971 76 76 77 77 foreach ($signatures as $signature) { 78 if (hash_equals($expected, $signature)) { 78 if (preg_match('/\A[0-9a-fA-F]{64}\z/', $signature) === 1 79 && hash_equals($expected, strtolower($signature))) { 79 80 return; 80 81 }
Note:
See TracChangeset
for help on using the changeset viewer.