|
|
|
@ -1,8 +1,11 @@ |
|
|
|
using System; |
|
|
|
using BWP.B3Frameworks; |
|
|
|
using BWP.B3Frameworks.BO; |
|
|
|
using BWP.B3Frameworks.Utils; |
|
|
|
using BWP.B3QingDaoWanFu.BL; |
|
|
|
using BWP.B3QingDaoWanFu.BO; |
|
|
|
using BWP.B3QingDaoWanFu.BO.NamedValueTemplate; |
|
|
|
using BWP.B3QingDaoWanFu.Utils; |
|
|
|
using BWP.BWPTrustPayClient.TrustPayRequests; |
|
|
|
using Forks.EnterpriseServices.BusinessInterfaces; |
|
|
|
using Forks.EnterpriseServices.DomainObjects2; |
|
|
|
@ -73,19 +76,24 @@ namespace BWP.B3QingDaoWanFu.Tasks { |
|
|
|
} |
|
|
|
|
|
|
|
//创建收款单和事务和更新状态的事务分开
|
|
|
|
string msg = ""; |
|
|
|
try { |
|
|
|
if (trustPay.PayState == 付款状态.付款成功) { |
|
|
|
using (var session = Dmo.NewSession()) { |
|
|
|
var bl = BIFactory.Create<ITrustPayBL>(session); |
|
|
|
long gatheringID; |
|
|
|
bl.CreateGathering(trustPay, out gatheringID); |
|
|
|
var config = new WanFuOnlineConfig(); |
|
|
|
using (new SpecialDomainUserBLScope(config.DomainUserForTrustPay.Value)) { |
|
|
|
bl.CreateGathering(trustPay, out gatheringID); |
|
|
|
} |
|
|
|
if (gatheringID > 0) { |
|
|
|
trustPay.Gathering_ID = gatheringID; |
|
|
|
} |
|
|
|
session.Commit(); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception) { |
|
|
|
} catch (Exception e) { |
|
|
|
msg = e.Message; |
|
|
|
} |
|
|
|
|
|
|
|
using (var session = Dmo.NewSession()) { |
|
|
|
@ -93,6 +101,8 @@ namespace BWP.B3QingDaoWanFu.Tasks { |
|
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "Gathering_ID", "PayState", "ReChecked"); |
|
|
|
session.Commit(); |
|
|
|
} |
|
|
|
if (!string.IsNullOrEmpty(msg)) |
|
|
|
throw new ApplicationException(msg); |
|
|
|
} |
|
|
|
|
|
|
|
private static bool ABCPaySuccess(IDmoSessionWithTransaction session, TrustPay trustPay) { |
|
|
|
|