public void CreatePostPay(CheckPostPayReq request) { SOIncomeRefundInfo refundInfo = null; PostPayInfo postpayInfo = null; request.Convert(out postpayInfo, out refundInfo); ObjectFactory <PostPayAppService> .Instance.Create(postpayInfo, refundInfo, request.IsForceCheck.Value); }
/// <summary> /// 创建PostPay /// </summary> /// <param name="postPayVM"></param> /// <param name="callback"></param> public void Create(PostPayVM postPayVM, Action callback) { CheckPostPayReq req = postPayVM.ConvertVM <PostPayVM, CheckPostPayReq>((s, t) => { t.IsForceCheck = s.IsForceCheck; t.PayReq = s.PayInfo.ConvertVM <PayInfoVM, PayInfoReqData>(); t.RefundReq = s.RefundInfo.ConvertVM <RefundInfoVM, RefundInfoReqData>(); }); string relativeUrl = "/InvoiceService/PostPay/Create"; restClient.Create <object>(relativeUrl, req, (obj, args) => { if (args.FaultsHandle()) { return; } callback(); }); }