private OrderInfo CreateOrder() { GeekChannelOrderFactory geekChannelOrderFactory = new GeekChannelOrderFactory(); OrderCreateInfo orderCreateInfo = new OrderCreateInfo(); orderCreateInfo.MchOrderId = string.Format("ORDER{0}", DateTime.Now.Ticks); orderCreateInfo.Title = "付款码下单订单"; orderCreateInfo.Price = 12300; orderCreateInfo.Expire = "10m"; string authCode = "284896288107264920"; string deviceId = "111"; ChannelOrder channelOrder = geekChannelOrderFactory.RetailOrder(); return(channelOrder.Create(orderCreateInfo, authCode, deviceId)); }
public void Test() { OrderCreateInfo orderCreateInfo = new OrderCreateInfo(); orderCreateInfo.MchOrderId = String.Format("ORDER{0}", DateTime.Now.Ticks); orderCreateInfo.Title = "聚合下单订单"; orderCreateInfo.Price = 12300; orderCreateInfo.Expire = "10m"; bool direct = false; GeekChannelOrderFactory geekChannelOrderFactory = new GeekChannelOrderFactory(); ToPayAggregateChannelOrder channelOrder = geekChannelOrderFactory.QROrder(); ToPayOrderInfo orderInfo = channelOrder.Create(orderCreateInfo, direct); Assert.NotEmpty(orderInfo.MchSerialNo); Assert.NotEmpty(orderInfo.OrderId); Assert.Equal(orderCreateInfo.MchOrderId, orderInfo.MchOrderId); Assert.NotEmpty(orderInfo.PayUrl); Assert.NotEmpty(orderInfo.ResultCode); Assert.NotEmpty(orderInfo.GateWay); Console.WriteLine(JsonConvert.SerializeObject(orderInfo)); }
public GeekRetailQROrderCreatingTest() { geekChannelOrderFactory = new GeekChannelOrderFactory(); }
public GeekNativeQROrderCreatingTest() { geekChannelOrderFactory = new GeekChannelOrderFactory(); }