pay
This commit is contained in:
@@ -37,7 +37,7 @@ export class OrdersService {
|
||||
throw new BadRequestException('Payment method is required for checkout');
|
||||
}
|
||||
|
||||
const { paymentUrl } = await this.paymentsService.initializePayment(order.paymentMethod.id, order.total, order.id);
|
||||
const { paymentUrl } = await this.paymentsService.startPayment(order.id);
|
||||
|
||||
await this.cartService.clearCart(userId, restaurantId);
|
||||
|
||||
@@ -234,10 +234,10 @@ export class OrdersService {
|
||||
};
|
||||
}
|
||||
|
||||
async findAll() {
|
||||
async findAll(restId: string) {
|
||||
const orders = await this.em.find(
|
||||
Order,
|
||||
{},
|
||||
{ restaurant: { id: restId } },
|
||||
{ populate: ['user', 'restaurant', 'deliveryMethod', 'address', 'paymentMethod'] },
|
||||
);
|
||||
if (!orders) {
|
||||
|
||||
Reference in New Issue
Block a user