|
@@ -117,20 +117,20 @@ namespace MySystem
|
|
//添加分账接收方
|
|
//添加分账接收方
|
|
if(merchant.Sort == 0)
|
|
if(merchant.Sort == 0)
|
|
{
|
|
{
|
|
- string content = AlipayFunction.Instance.BindSettleRelation(DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8), merchantAdd.AlipayPid, merchantAdd.AlipayAuthToken);
|
|
|
|
|
|
+ string content = AlipayFunction.Instance.BindSettleRelation(DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8), AlipayFunction.Instance.Pid, merchantAdd.AlipayAuthToken);
|
|
merchantAdd.Sort = 1;
|
|
merchantAdd.Sort = 1;
|
|
db.SaveChanges();
|
|
db.SaveChanges();
|
|
}
|
|
}
|
|
//发起分账
|
|
//发起分账
|
|
- decimal fee = order.PayMoney * 0.99M;
|
|
|
|
- if(fee >= 1)
|
|
|
|
|
|
+ decimal fee = order.PayMoney * 0.01M;
|
|
|
|
+ if(fee >= 0.01M)
|
|
{
|
|
{
|
|
string TradeNo = order.SeoTitle;
|
|
string TradeNo = order.SeoTitle;
|
|
string OrderNo = order.OrderNo;
|
|
string OrderNo = order.OrderNo;
|
|
List<RoyaltyParameters> Parameters = new List<RoyaltyParameters>();
|
|
List<RoyaltyParameters> Parameters = new List<RoyaltyParameters>();
|
|
Parameters.Add(new RoyaltyParameters()
|
|
Parameters.Add(new RoyaltyParameters()
|
|
{
|
|
{
|
|
- Account = merchantAdd.SeoTitle,
|
|
|
|
|
|
+ Account = AlipayFunction.Instance.Pid,
|
|
Amount = fee.ToString("f2"),
|
|
Amount = fee.ToString("f2"),
|
|
});
|
|
});
|
|
AlipayFunction.Instance.Settle(OrderNo, TradeNo, Parameters, merchantAdd.AlipayAuthToken);
|
|
AlipayFunction.Instance.Settle(OrderNo, TradeNo, Parameters, merchantAdd.AlipayAuthToken);
|