fix: ( telebirr ): fix payment status

This commit is contained in:
Abubeker Yasin
2026-06-04 14:24:38 +03:00
parent ef940a61bd
commit 3922d813b1
2 changed files with 3 additions and 2 deletions

View File

@@ -214,6 +214,7 @@ export class PaymentsService {
if (refreshable && stale && intent.merchantOrderId && provider) {
try {
const status = await provider.queryStatus(intent.merchantOrderId);
this.logger.log(status);
await this.applyProviderStatus(intent.id, status);
const refreshed = await this.prisma.paymentIntent.findUniqueOrThrow({
where: { id: intent.id },
@@ -234,7 +235,7 @@ export class PaymentsService {
intentId: string,
status: ProviderStatus,
): Promise<void> {
if (status.status === PaymentIntentStatus.SUCCEEDED) {
if (status.rawResponse.biz_content.order_status === "PAY_SUCCESS") {
await this.finalizePaymentSuccess({
intentId,
providerTxnId: status.providerTxnId,

View File

@@ -26,7 +26,7 @@ export interface ProviderStatus {
providerTxnId?: string;
failureCode?: string;
failureMessage?: string;
rawResponse: Record<string, unknown>;
rawResponse: any;
}
export interface PaymentProvider {