/// <summary> /// 充值 /// </summary> /// <returns></returns> public async Task <DWD_Result <DWD_RechargeBack> > RechargeAsync(DWD_Recharge model) { var url = "/api/v3/recharge.json"; var obj = new DWD_Amout { amout = long.Parse((model.Amount * 100).ToString()), rechange_channle = model.Mode.ToString().ToLower(), return_url = "", serial_no = model.Code, store_id = model.DWD_Business.external_shopid }; obj.Generate(); var sign = obj.Sign(); var data = obj.Params(); return(await RequestAsync <DWD_RechargeBack>(url, sign, data)); }
public bool AddRecharge(DWD_Recharge recharge) { Context.DWD_Recharges.Add(recharge); return(Context.SaveChanges() > 0); }