update
This commit is contained in:
@@ -69,7 +69,7 @@ export class PaymentsService {
|
||||
|
||||
// Deduct from wallet and create payment record
|
||||
const payment = await this.processWalletPayment(orderId, amount, user);
|
||||
|
||||
|
||||
return { paymentUrl: null }; // No redirect needed for wallet
|
||||
}
|
||||
|
||||
@@ -208,12 +208,12 @@ export class PaymentsService {
|
||||
}
|
||||
|
||||
// For Wallet payments, they're already paid during startPayment
|
||||
if (paymentMethod.method === PaymentMethodEnum.Wallet) {
|
||||
if (payment.status === PaymentStatusEnum.Paid) {
|
||||
return payment;
|
||||
}
|
||||
throw new BadRequestException('Wallet payment was not processed correctly');
|
||||
}
|
||||
// if (paymentMethod.method === PaymentMethodEnum.Wallet) {
|
||||
// if (payment.status === PaymentStatusEnum.Paid ) {
|
||||
// return payment;
|
||||
// }
|
||||
// throw new BadRequestException('Wallet payment was not processed correctly');
|
||||
// }
|
||||
|
||||
// For non-online payments, mark as paid directly
|
||||
// if (paymentMethod.method !== PaymentMethodEnum.Online) {
|
||||
|
||||
Reference in New Issue
Block a user