diff --git a/src/application/payment/payment.service.ts b/src/application/payment/payment.service.ts index 97c38a8..59f41b8 100644 --- a/src/application/payment/payment.service.ts +++ b/src/application/payment/payment.service.ts @@ -61,7 +61,7 @@ export class PaymentService { await this.purchaseDataAccess.createPurchase(payment.userId.toString(), payment.courseId.toString(), payment._id.toString()); payment.paymentStatus = PaymentStatus.Completed; - await this.paymentDataAccess.updatePaymentStatus(payment._id, PaymentStatus.Completed); + await this.paymentDataAccess.updatePaymentStatus(payment._id.toString(), PaymentStatus.Completed); const registerCourse = await this.userDataAccess.registerCourse(payment.userId, payment.courseId); if (!registerCourse.success) { @@ -78,7 +78,7 @@ export class PaymentService { await session.commitTransaction(); await session.endSession(); - + return { success: true, payment: payment } }