Merge pull request #753 from Tria-plc/freight_feature/usermanagement

Comment out payment event handling for local demos in BillingService
This commit is contained in:
marshal
2026-07-17 10:49:46 +03:00
committed by GitHub

View File

@@ -1034,16 +1034,16 @@ export class BillingService {
// Settlement is driven by the payment API (webhook/outbox → payment.succeeded); // Settlement is driven by the payment API (webhook/outbox → payment.succeeded);
// billing must not simulate it. Kept commented for local demos only. // billing must not simulate it. Kept commented for local demos only.
if (!result.immediateSuccess) { // if (!result.immediateSuccess) {
await this.payment.handlePaymentEvent({ // await this.payment.handlePaymentEvent({
eventType: "payment.succeeded", // eventType: "payment.succeeded",
eventId: `demo-${result.intentId}`, // eventId: `demo-${result.intentId}`,
referenceId: invoice.sourceId, // referenceId: invoice.sourceId,
intentId: result.intentId, // intentId: result.intentId,
providerTxnId: result.providerTxnId, // providerTxnId: result.providerTxnId,
paidAt: (result.paidAt ?? new Date()).toISOString(), // paidAt: (result.paidAt ?? new Date()).toISOString(),
}); // });
} // }
if (result.immediateSuccess) { if (result.immediateSuccess) {
await this.settleByPaymentId( await this.settleByPaymentId(