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