CNH
结算成CNY
商户从前端选择 系统账户(币种CNH)发起结汇,
// 提交结汇的账户 ,金额,等
http.post("",{
amount:10000.00,
//currencyID:88, // 币种 CNY
paymentChannel:"CNH", //"alipay" unionpay
fromAccountID:"66688", //来自到的账户
toAccountID:"2332", //转到的账户
TradeType:"settlement"
})
orderSN:="charge".util.PayTool.GenOrderSn() //生成结汇单号 settlement202204221059590001
order := &entity.PaymentOoder{
MerchantID:mid,
FromCurrencyID:CurrencyID, // 币种
ToCurrencyID:22325222 ,//转到的账户
Amount:1000.00 , //金额
FromAccountID:22325222 ,//来自到的账户
ToAccountID:22325222 ,//转到的账户
OrderSN:orderSN,
TradeType:"settlement", //交易类型 结汇
TradeOrg:"settlement", //交易 机构指银行
OrderSN:orderSN,
// ......
}
accountID,err:=repo.PaymentOrderDao.Save(order) //保存订单
//日志
payLog:=&entity.PaymentOoderLog{
OrderSN:orderSN,
StepR:0 , //步骤
StepName:"order_create", //步骤 init
TradeType:"settlement", //交易类型 结汇
notify_msg:"" //回调信息
}
err:=repo.PaymentOrderLogDao.Save(payLog) //保存订单日志
MerchantAccountOutLog
日志PaymentOrderLog
日志