|
|
|
|
@ -283,7 +283,7 @@ $assert(str_contains($needsPolling, 'state.presentation?.polling_required === tr
|
|
|
|
|
&& !str_contains($invoiceDetailRuntime, 'function provisionFinished('),
|
|
|
|
|
'Invoice polling must consume the server projection instead of rebuilding task state.');
|
|
|
|
|
$paymentExpiry = $section($invoiceDetailRuntime,
|
|
|
|
|
'function onlinePaymentFallbackExpiresAt(', 'function invoiceNeedsPolling(');
|
|
|
|
|
'function clearOnlinePaymentExpiryTimer(', 'function invoiceNeedsPolling(');
|
|
|
|
|
$onlinePaymentRender = $section($invoiceDetailRuntime,
|
|
|
|
|
'function renderOnlinePayment(', 'async function payInvoiceBalance(');
|
|
|
|
|
$detailHydration = $section($invoiceDetailRuntime,
|
|
|
|
|
@ -295,25 +295,24 @@ $assert(!str_contains($invoiceDetailRuntime, 'function hasPendingInvoicePaymentK
|
|
|
|
|
&& str_contains($detailHydration,
|
|
|
|
|
'state.onlinePaymentPending = Boolean(serverPendingPayment);')
|
|
|
|
|
&& str_contains($invoiceDetailRuntime, 'resumeInvoicePolling();')
|
|
|
|
|
&& str_contains($paymentExpiry, 'STATUS_POLL_MAX_LIFETIME_MS')
|
|
|
|
|
&& str_contains($paymentExpiry, 'serviceTimestamp(')
|
|
|
|
|
&& str_contains($paymentExpiry, 'function onlinePaymentHasExpired(')
|
|
|
|
|
&& str_contains($paymentExpiry, 'function expireOnlinePaymentInstructions(')
|
|
|
|
|
&& str_contains($paymentExpiry, 'clearOnlinePaymentState(true);')
|
|
|
|
|
&& str_contains($paymentExpiry,
|
|
|
|
|
"makeElement('strong', '', t('billing.payment.expired.title'))")
|
|
|
|
|
&& str_contains($paymentExpiry, 'void refreshInvoiceDetail(invoiceId);')
|
|
|
|
|
&& str_contains($onlinePaymentRender, 'paymentExpiresAt === null')
|
|
|
|
|
&& str_contains($onlinePaymentRender,
|
|
|
|
|
'onlinePaymentFallbackExpiresAt(state.selectedInvoice)')
|
|
|
|
|
'state.onlinePaymentExpiresAt = paymentExpiresAt ?? 0;')
|
|
|
|
|
&& str_contains($onlinePaymentRender, 'scheduleOnlinePaymentExpiry(generation);')
|
|
|
|
|
&& str_contains($detailHydration,
|
|
|
|
|
'if (onlinePaymentHasExpired()) expireOnlinePaymentInstructions();')
|
|
|
|
|
&& str_contains($detailHydration, 'state.onlinePaymentExpiresAt <= 0')
|
|
|
|
|
&& str_contains($detailHydration,
|
|
|
|
|
'state.activePayment?.payment?.expires_at')
|
|
|
|
|
&& !str_contains($invoiceDetailRuntime, 'onlinePaymentFallbackExpiresAt')
|
|
|
|
|
&& !str_contains($detailHydration, 'state.onlinePaymentExpiresAt <= Date.now()')
|
|
|
|
|
&& str_contains($invoiceDetailRuntime, 'STATUS_POLL_SLOW_INTERVAL_MS')
|
|
|
|
|
&& str_contains($invoiceDetailRuntime, 'Date.now() < state.pollUntil'),
|
|
|
|
|
'Provider payments must recover through a bounded fallback expiry and disable stale instructions.');
|
|
|
|
|
'Provider payments must expire only from the durable provider deadline, never a local fallback.');
|
|
|
|
|
$assert(str_contains($invoiceDetailRuntime,
|
|
|
|
|
'function entersProvisioningAfterPayment(')
|
|
|
|
|
&& substr_count($invoiceDetailRuntime,
|
|
|
|
|
|