Esempio n. 1
0
 public void Precreate()
 {
     using (SelfServiceEquipment _equipment = new SelfServiceEquipment())
     {
         string         _trade_no      = Guid.NewGuid().ToString().Replace("-", "");
         PrecreateModel precreateModel = new PrecreateModel()
         {
             out_trade_no          = _trade_no,
             timeout_express       = "5m",
             total_amount          = "0.01",
             store_id              = "TEST_001",
             subject               = "支付测试",
             undiscountable_amount = "0.01",
             terminal_id           = "t_0001",
             operator_id           = "top_0001",
             body         = "支付测试",
             goods_detail = new List <GoodsDetailModel> {
                 new GoodsDetailModel()
                 {
                     alipay_goods_id = "001", body = "汽车票", quantity = "1", price = "0.01", goods_id = "1", goods_name = "天津-北京", goods_category = ""
                 }
             }
         };
         PrecreateResponseModel responseModel = _equipment.PreCreate(precreateModel);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 支付宝预下单请求
        /// </summary>
        /// <param name="precreateModel">求情数据</param>
        /// <returns></returns>
        public PrecreateResponseModel PreCreate(PrecreateModel precreateModel)
        {
            PrecreateResponseModel response = ServiceUtil.AliPayClient.PreCreate(precreateModel);

            ServiceUtil.AliPayClient.Close();
            return(response);
        }