mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 12:18:11 +00:00
fix: revert the testing
This commit is contained in:
@@ -913,9 +913,9 @@ export class BillingService {
|
|||||||
dueAt,
|
dueAt,
|
||||||
...(issuing
|
...(issuing
|
||||||
? {
|
? {
|
||||||
status: Freight.InvoiceStatus.Pending,
|
status: Freight.InvoiceStatus.Pending,
|
||||||
issuedAt: invoice.issuedAt ?? new Date(),
|
issuedAt: invoice.issuedAt ?? new Date(),
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
await mg.update(Invoice, { id: invoice.id }, patch);
|
await mg.update(Invoice, { id: invoice.id }, patch);
|
||||||
@@ -1032,20 +1032,20 @@ export class BillingService {
|
|||||||
.getRepository(Invoice)
|
.getRepository(Invoice)
|
||||||
.update({ id: invoice.id }, { paymentId: result.intentId });
|
.update({ id: invoice.id }, { paymentId: result.intentId });
|
||||||
|
|
||||||
// // DEMO: manually fire the gateway `payment.succeeded` callback here, without
|
// DEMO: manually fire the gateway `payment.succeeded` callback here, without
|
||||||
// // waiting for real gateway settlement. Runs AFTER the paymentId link above so
|
// waiting for real gateway settlement. Runs AFTER the paymentId link above so
|
||||||
// // `handlePaymentEvent → settleByPaymentId` can correlate the invoice. TODO:
|
// `handlePaymentEvent → settleByPaymentId` can correlate the invoice. TODO:
|
||||||
// // remove — real settlement flips this via the `${source}.invoice.paid` handler.
|
// remove — real settlement flips this via the `${source}.invoice.paid` handler.
|
||||||
// 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(
|
||||||
|
|||||||
Reference in New Issue
Block a user