/// <summary> /// 申请退款 /// </summary> public string ApplyRefund() { Refund refund = new Refund(); refund.ApplyTime = DateTime.Now; refund.Member = Member; refund.Order = Order; refund.RefundSerialNo = new BLLFormatSerialNo().GetSerialNo(TourConfig.RefundFlag); DalRefund.Save(refund); string html= new BLLPayment().PayBack(refund); return html; }
public Refund SecondRefund() { var secondRefund = new Refund { RefundId = 2, TransactionID = "LOLE9843", OrderId = 2, OrderModelTypeId = (int)LookUp.OrderModel.OrderModelType.Values.Subscription, CookerId = 1, ClientId = 1, RefundDate = DateTime.Today.Date, RefundAmount = (decimal)7.50, StatusId = (int)DisputeStatus.Values.Processing, ReasonId = (int)DisputeReason.Values.OtherReasons, EvidencePhoto = "", Description = "This item was not good" }; return secondRefund; }
public Refund FirstRefund() { var firstRefund = new Refund { RefundId = 1, TransactionID = "GROC#43", OrderId = 1, OrderModelTypeId = (int)LookUp.OrderModel.OrderModelType.Values.Transaction, CookerId = 1, ClientId = 1, RefundDate = DateTime.Today.Date, RefundAmount = (decimal) 8.50, StatusId = (int)DisputeStatus.Values.Resolved, ReasonId = (int)DisputeReason.Values.ItemNotAsDescribed, EvidencePhoto = @"C:\Users\haraissia\Documents\Visual Studio 2013\Projects\PrivateChef\trunk\Test\Images\Dispute\NeverDelivered.jpg", Description = "This item was never delivered" }; return firstRefund; }
public void Save(Refund refund) { session.SaveOrUpdate(refund); session.Flush(); }
/// <summary> /// 退款/退订 /// </summary> /// <returns></returns> public string PayBack(Refund refund) { // 卖家用户ID // string seller_user_id = Seller_user_id.Text.Trim(); //卖家支付宝账号对应的支付宝唯一用户号。以2088开头的纯16位数字。 //退款批次号 string batch_no = refund.RefundSerialNo; //格式为:退款日期(8位当天日期)+流水号(3~24位,不能接受“000”,但是可以接受英文字符)。 //退款请求时间 string refund_date = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); //退款请求的当前时间。格式为:yyyy-MM-dd hh:mm:ss //退款总笔数 string batch_num = "1";//Batch_num.Text.Trim(); //即参数detail_data的值中,“#”字符出现的数量加1,最大支持1000笔(即“#”字符出现的最大数量999个)。 //单笔数据集 string detail_data = refund.Order.TradeNo + "^" +refund.TotalReturnAmount +"^" + "退款旅游" ; //退款请求的明细数据。格式详见“4.3 单笔数据集参数说明”。 //////////////////////////////////////////////////////////////////////////////////////////////// //把请求参数打包成数组 SortedDictionary<string, string> sParaTemp = new SortedDictionary<string, string>(); sParaTemp.Add("seller_user_id", Config.Partner); sParaTemp.Add("batch_no", batch_no); sParaTemp.Add("refund_date", refund_date); sParaTemp.Add("batch_num", batch_num); sParaTemp.Add("detail_data", detail_data); //构造即时到账批量退款有密接口表单提交HTML数据,无需修改 Service ali = new Service(); string sHtmlText = ali.Refund_fastpay_by_platform_pwd(sParaTemp); return sHtmlText; }
public Refund ThirdRefund() { var thirdRefund = new Refund { RefundId = 3, TransactionID = "FERO#23", OrderId = 2, OrderModelTypeId = (int)LookUp.OrderModel.OrderModelType.Values.Transaction, CookerId = 1, ClientId = 2, RefundDate = DateTime.Today.Date, RefundAmount = (decimal)4.50, StatusId = (int)DisputeStatus.Values.Escalated, ReasonId = (int)DisputeReason.Values.OtherReasons, EvidencePhoto = @"C:\Users\haraissia\Documents\Visual Studio 2013\Projects\PrivateChef\trunk\Test\Images\Refund\BadFood.jpg", Description = "look at the picture and you will understand" }; return thirdRefund; }