public AlipayWebPayRequestContent(IGateWay gateWay, IReturnOrder order) : base(gateWay) { ReturnUrl = order.ReturnUrl; if (string.IsNullOrEmpty(order.NotifyUrl)) { throw new PaymentArgumentException(gateWay.Name, "notify_url", "notify_url参数错误"); } NotifyUrl = order.NotifyUrl; if (string.IsNullOrEmpty(order.Subject)) { throw new PaymentArgumentException(gateWay.Name, "subject", "subject参数错误"); } this["subject"] = order.Subject; if (string.IsNullOrEmpty(order.OrderNo)) { throw new PaymentArgumentException(gateWay.Name, "out_trade_no", "out_trade_no参数错误"); } this["out_trade_no"] = order.OrderNo; if (order.Price <= 0) { throw new PaymentArgumentException(gateWay.Name, "total_amount", "total_amount参数错误"); } this["total_amount"] = order.Price.ToString(CultureInfo.InvariantCulture); this["product_code"] = "FAST_INSTANT_TRADE_PAY"; }
protected AlipayRequestContent(IGateWay gateWay) { Format = "JSON"; Charset = "utf-8"; SignType = "RSA2"; Version = "1.0"; Timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); AppId = gateWay.MerchantConfigure.MerchantId; }
public override async Task OnActivateAsync() { Log.Debug($"{typeof(MainEntryGrain)}OnActivateAsync"); m_ChatRoom = await GetIChatRoom(); m_IGateWay = await GetIGateWay(); m_IHello = GrainFactory.GetGrain <IHello>(0); RegisterTimer(Update_Timer, null, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1)); await base.OnActivateAsync(); }
private bool accquireMemoryForFileModel(FileModel fdm) { //version ngày 26/7 try { byte[] memblock = IGateWay.getByteFromFile(fdm.FileFullName); sendMemForFileModel(memblock, fdm); return(true); } catch (Exception e) { return(false); } }
public AlipayQueryRequestContent(IGateWay gateWay, IPlatformOrder order) : base(gateWay) { if (string.IsNullOrEmpty(order.OrderNo) && string.IsNullOrEmpty(order.PlatformTradeNo)) { throw new PaymentArgumentException(gateWay.Name, "out_trade_no,trade_no", "参数错误out_trade_no和trade_no不能同时为空"); } if (!string.IsNullOrEmpty(order.OrderNo)) { this["out_trade_no"] = order.OrderNo; } if (!string.IsNullOrEmpty(order.PlatformTradeNo)) { this["trade_no"] = order.PlatformTradeNo; } }
public override bool Init() { m_ClusterClient = InitialiseClient(); m_MainEntry = m_ClusterClient.GetGrain <IMainEntry>(0); m_SiloGateWay_Obs = new SiloGateWay_Obs(); m_IGateWay_Obs = m_ClusterClient.CreateObjectReference <IGateWay_Obs>(m_SiloGateWay_Obs).Result; m_IGateWay = m_MainEntry.GetIGateWay().Result; m_IGateWay.SubscribeAsync(m_IGateWay_Obs).Wait(); m_ChatRoom = m_MainEntry.GetIChatRoom().Result; return(base.Init()); }
public AlipayRefundRequestContent(IGateWay gateWay, IRefundOrder order) : base(gateWay) { if (string.IsNullOrEmpty(order.OrderNo) && string.IsNullOrEmpty(order.PlatformTradeNo)) { throw new PaymentArgumentException(gateWay.Name, "out_trade_no,trade_no", "参数错误out_trade_no和trade_no不能同时为空"); } if (order.RefundAmount <= 0) { throw new PaymentArgumentException(gateWay.Name, "refund_amount", "参数错误refund_amount"); } if (!string.IsNullOrEmpty(order.OrderNo)) { this["out_trade_no"] = order.OrderNo; } if (!string.IsNullOrEmpty(order.PlatformTradeNo)) { this["trade_no"] = order.PlatformTradeNo; } this["refund_amount"] = order.RefundAmount.ToString(CultureInfo.InvariantCulture); }
public AlipaySignature(IGateWay gateWay) { GateWay = gateWay; }
public AlipayWebPayRequest(IGateWay gateWay) : base(gateWay) { }
public AlipayNotify(IGateWay gateWay) : base(gateWay) { }
/// <summary> /// 初始化网关 /// </summary> /// <param name="gateWay"></param> /// <param name="gateWayName"></param> public static void InitGateWay(IGateWay gateWay, string gateWayName) { InitGateWay(o => gateWay, gateWayName); }
protected AlipayHtmlRequest(IGateWay gateWay) : base(gateWay) { }
protected PostRequest(IGateWay gateWay) : base(gateWay) { }
protected RequestBase(IGateWay gateWay) { GateWay = gateWay; }
public AlipayRefundRequest(IGateWay gateWay) : base(gateWay) { }
private bool ProvideMemForModel(FileModel fmdl) // hop ly now { byte[] bytes = IGateWay.getByteFromFile(fmdl.FileFullName); fmdl.receiveMemoryFromInteractor(bytes); return(false); }
protected AlipayPostRequestContent(IGateWay gateWay) : base(gateWay) { }
public string[] getAllFilesInFolder(string dirPath) { return(IGateWay.getFileInFolderNonRecursive(dirPath)); }
protected Notify(IGateWay gateWay) { GateWay = gateWay; }
protected HtmlRequest(IGateWay gateWay) : base(gateWay) { }
public AlipayQueryRequest(IGateWay gateWay) : base(gateWay) { }