|
@@ -62,7 +62,7 @@ export class TransferSuccessService extends BaseService {
|
|
|
*/
|
|
|
// 获取回调用户的详情
|
|
|
accountInfo = await this.webHookCommonService.getAccountInfo(
|
|
|
- params.data.account_id
|
|
|
+ params.data.from_account_id
|
|
|
);
|
|
|
if (!accountInfo) {
|
|
|
// 转账延迟4秒处理
|
|
@@ -75,7 +75,7 @@ export class TransferSuccessService extends BaseService {
|
|
|
// 获取费率信息
|
|
|
withdrawChannelFee =
|
|
|
await this.webHookCommonService.getWithdrawChannelFee({
|
|
|
- account_id: params.data.account_id,
|
|
|
+ account_id: params.data.from_account_id,
|
|
|
currency: params.data.currency,
|
|
|
order_type: OrderType.TRANSFER,
|
|
|
channel: 'EASYPAY',
|
|
@@ -98,7 +98,7 @@ export class TransferSuccessService extends BaseService {
|
|
|
// 获取余额
|
|
|
const { before_balance, balance } =
|
|
|
await this.webHookCommonService.getBalanceDiffByCurrency({
|
|
|
- account_id: params.data.account_id,
|
|
|
+ account_id: params.data.from_account_id,
|
|
|
currency: params.data.currency,
|
|
|
amount: params.data.amount,
|
|
|
order_type: OrderType.TRANSFER,
|
|
@@ -107,7 +107,7 @@ export class TransferSuccessService extends BaseService {
|
|
|
const openPaymentOrderParams = {
|
|
|
mch_id: accountInfo.mch_id,
|
|
|
amount: params.data.amount / 100,
|
|
|
- account_id: params.data.account_id,
|
|
|
+ account_id: params.data.from_account_id,
|
|
|
from_account_id: params.data.from_account_id,
|
|
|
to_account_id: params.data.to_account_id,
|
|
|
event_id: params.data.id,
|
|
@@ -133,7 +133,7 @@ export class TransferSuccessService extends BaseService {
|
|
|
// /v1/transfers
|
|
|
const transfers_params = {
|
|
|
request_id: md5(`${accountInfo.mch_id}_${params.data.id}`),
|
|
|
- from_account_id: params.data.account_id,
|
|
|
+ from_account_id: params.data.from_account_id,
|
|
|
to_account_id: this.easyPayAdapter.baseInfo.account_id,
|
|
|
currency: params.data.currency,
|
|
|
amount: withdrawChannelFee * 100,
|
|
@@ -153,10 +153,10 @@ export class TransferSuccessService extends BaseService {
|
|
|
request_id: transfers_params.request_id,
|
|
|
mch_id: accountInfo.mch_id,
|
|
|
amount: withdrawChannelFee,
|
|
|
- account_id: params.data.account_id,
|
|
|
- from_account_id: params.data.account_id,
|
|
|
+ account_id: params.data.from_account_id,
|
|
|
+ from_account_id: params.data.from_account_id,
|
|
|
to_account_id: this.easyPayAdapter.baseInfo.account_id,
|
|
|
- event_id: params.data.id,
|
|
|
+ event_id: res.data.id,
|
|
|
currency: params.data.currency,
|
|
|
status: params.data.status,
|
|
|
order_type: OrderType.TRANSACTION_FEE_ORDER,
|
|
@@ -180,6 +180,7 @@ export class TransferSuccessService extends BaseService {
|
|
|
return await this.openPaymentOrderEntity.findOne({
|
|
|
where: {
|
|
|
event_id,
|
|
|
+ order_type: OrderType.TRANSACTION_FEE_ORDER
|
|
|
},
|
|
|
});
|
|
|
}
|