pay
This commit is contained in:
@@ -26,14 +26,7 @@ export class PaymentsController {
|
||||
return this.paymentMethodService.findByRestaurant(restId);
|
||||
}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@Get('public/payments/methods/restaurant')
|
||||
@ApiOperation({ summary: 'Get the restaurant payment methods' })
|
||||
@ApiNotFoundResponse({ description: 'Restaurant payment methods not found' })
|
||||
payOrder(@RestId() restId: string) {
|
||||
return this.paymentMethodService.findByRestaurant(restId);
|
||||
}
|
||||
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @ApiBearerAuth()
|
||||
|
||||
@@ -55,9 +55,6 @@ export class PaymentsService {
|
||||
|
||||
// return { paymentUrl };
|
||||
// }
|
||||
asynv paymentGatewayAuthorize(amount: number, orderId: string, merchantId: string, gateway: PaymentGatewayEnum){
|
||||
|
||||
}
|
||||
|
||||
async startPayment(orderId: string): Promise<{ paymentUrl: string | null }> {
|
||||
const { amount, method, restaurantDomain, gateway, merchantId } = await this.validateOrder(orderId);
|
||||
@@ -105,10 +102,10 @@ export class PaymentsService {
|
||||
}
|
||||
|
||||
async createPayment(domain: string, dto: CreatePaymentDto) {
|
||||
const { amount, orderId, merchantId, gateway, paymentMethod } = dto;
|
||||
const { amount, orderId, merchantId, gateway, method } = dto;
|
||||
|
||||
const { authority } = await this.paymentGatewayService.requestToGateway(
|
||||
paymentMethod,
|
||||
method,
|
||||
amount,
|
||||
orderId,
|
||||
merchantId,
|
||||
|
||||
Reference in New Issue
Block a user