feat(v2.7.4): parallel 7-courier Bangladesh fraud breakdown engine with strict zero-mock per-carrier stats
This commit is contained in:
Vendored
+3
-1
@@ -90,7 +90,9 @@ function isDefinitePreBookingRejection(err) {
|
||||
export class CourierRegistry {
|
||||
adapters = new Map();
|
||||
googleMaps;
|
||||
config;
|
||||
constructor(config = loadConfig()) {
|
||||
this.config = config;
|
||||
const steadfast = new SteadfastAdapter(config.steadfast.apiKey, config.steadfast.secretKey, config.steadfast.baseUrl);
|
||||
this.adapters.set("steadfast", steadfast);
|
||||
const pathao = new PathaoAdapter(config.pathao.clientId, config.pathao.clientSecret, config.pathao.username, config.pathao.password, config.pathao.storeId, config.pathao.baseUrl);
|
||||
@@ -562,7 +564,7 @@ export class CourierRegistry {
|
||||
async checkFraudRisk(phone) {
|
||||
const steadfast = this.adapters.get("steadfast");
|
||||
const pathao = this.adapters.get("pathao");
|
||||
return await FraudRiskEngine.evaluateRisk(phone, steadfast, pathao);
|
||||
return await FraudRiskEngine.evaluateRisk(phone, steadfast, pathao, this.config);
|
||||
}
|
||||
async validateAddress(req) {
|
||||
return await this.googleMaps.validateAndGeocode(req);
|
||||
|
||||
Reference in New Issue
Block a user