mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
Merge branch 'alpha' of https://github.com/Tria-plc/edr-platform into alpha
This commit is contained in:
@@ -15,6 +15,10 @@ export class DynamicThrottlerGuard extends ThrottlerGuard {
|
||||
}
|
||||
|
||||
async canActivate(context: ExecutionContext): Promise<boolean> {
|
||||
if (context.getType() !== 'http') {
|
||||
return true;
|
||||
}
|
||||
|
||||
const [authLimit, authTtl, strictLimit, strictTtl, defaultLimit, defaultTtl] =
|
||||
await Promise.all([
|
||||
this.systemConfig.getNumber(CONFIG_KEYS.THROTTLE_AUTH_LIMIT),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { Nack, RabbitSubscribe } from '@golevelup/nestjs-rabbitmq';
|
||||
import { IsPublic } from '@tria-plc/api-common/modules/auth/decorators/public.decorator';
|
||||
import {
|
||||
PAYMENT_EVENTS_DLX,
|
||||
PAYMENT_EVENTS_EXCHANGE,
|
||||
@@ -19,6 +20,7 @@ export class PaymentEventsConsumer {
|
||||
|
||||
constructor(private readonly paymentsService: PaymentsService) {}
|
||||
|
||||
@IsPublic()
|
||||
@RabbitSubscribe({
|
||||
exchange: PAYMENT_EVENTS_EXCHANGE,
|
||||
routingKey: paymentServiceBindingPattern(PaymentService.PASSENGER), // payment.passenger.*
|
||||
|
||||
@@ -61,6 +61,9 @@ export class DMoneyProvider implements PaymentProvider {
|
||||
): Promise<ProviderInitiationResult> {
|
||||
const fabricToken = await this.applyFabricToken();
|
||||
const requestBody = this.buildPreOrderRequest(input);
|
||||
this.logger.log(
|
||||
`D-Money preOrder send request merchOrderId=${input.merchantOrderId} body=${JSON.stringify(this.sanitize(requestBody))}`,
|
||||
);
|
||||
const response = await this.postJson<DMoneyPreOrderResponse>(
|
||||
`${this.baseUrl}/apiaccess/payment/gateway/payment/v1/merchant/preOrder`,
|
||||
requestBody,
|
||||
|
||||
Reference in New Issue
Block a user