mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
refactor: ( d-money ) update trade_type and business_type
This commit is contained in:
@@ -11,7 +11,7 @@ export default registerAs("dmoney", () => ({
|
||||
returnUrl: process.env.DMONEY_RETURN_URL ?? "",
|
||||
timeoutExpress: process.env.DMONEY_TIMEOUT_EXPRESS ?? "120m",
|
||||
language: process.env.DMONEY_LANGUAGE ?? "en",
|
||||
currency: process.env.DMONEY_CURRENCY ?? "FDJ",
|
||||
currency: process.env.DMONEY_CURRENCY ?? "DJF",
|
||||
privateKey: process.env.DMONEY_PRIVATE_KEY ?? "",
|
||||
publicKey: process.env.DMONEY_PUBLIC_KEY ?? "",
|
||||
insecureTls: process.env.DMONEY_INSECURE_TLS === "true",
|
||||
|
||||
@@ -206,18 +206,16 @@ export class DMoneyProvider implements PaymentProvider {
|
||||
appid: this.merchantAppId,
|
||||
merch_code: this.merchantCode,
|
||||
merch_order_id: input.merchantOrderId,
|
||||
trade_type: "Checkout" as const,
|
||||
trade_type: "WebCheckout" as const,
|
||||
business_type: "OnlineMerchant" as const,
|
||||
title: `${input.orderRef}`,
|
||||
total_amount: totalAmount,
|
||||
trans_currency: 1 == 1 ? "DJF": this.currency,
|
||||
trans_currency: this.currency,
|
||||
timeout_express: this.timeoutExpress,
|
||||
...(redirectUrl ? { redirect_url: redirectUrl } : {}),
|
||||
},
|
||||
};
|
||||
|
||||
console.log("\n\n\n")
|
||||
console.log(req)
|
||||
console.log("\n\n\n")
|
||||
const sign = signRequestObject(
|
||||
req as unknown as Record<string, unknown>,
|
||||
this.privateKey,
|
||||
@@ -265,7 +263,7 @@ export class DMoneyProvider implements PaymentProvider {
|
||||
`sign=${sign}`,
|
||||
"sign_type=SHA256WithRSA",
|
||||
"version=1.0",
|
||||
"trade_type=Checkout",
|
||||
"trade_type=WebCheckout",
|
||||
`language=${this.language}`,
|
||||
].join("&");
|
||||
return `${this.webBaseUrl}/payment/web/paygate?${query}`;
|
||||
|
||||
@@ -10,12 +10,12 @@ export interface DMoneyPreOrderBizContent {
|
||||
appid: string;
|
||||
merch_code: string;
|
||||
merch_order_id: string;
|
||||
trade_type: 'Checkout';
|
||||
trade_type: 'WebCheckout';
|
||||
business_type: 'OnlineMerchant';
|
||||
title: string;
|
||||
total_amount: string;
|
||||
trans_currency: string;
|
||||
timeout_express: string;
|
||||
business_type?: string;
|
||||
redirect_url?: string;
|
||||
callback_info?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user