Exemplo n.º 1
0
 /// <summary>
 /// 刷卡支付
 /// </summary>
 /// <param name="body">商品描述</param>
 /// <param name="total_fee">总金额(元)</param>
 /// <param name="auth_code">支付授权码</param>
 /// <returns>刷卡支付结果</returns>
 public PayResultResponse OrderPay(string body, decimal total_fee, string auth_code)
 {
     try
     {
         return(MicroPay.OrderPay(body, total_fee, auth_code));
     }
     catch (Exception e)
     {
         return(new PayResultResponse {
             Success = false, Message = "支付失败,请稍后再说"
         });
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 撤销订单,如果失败会重复调用10次
 /// </summary>
 /// <param name="out_trade_no">商户订单号</param>
 /// <returns></returns>
 public bool Cancel(string out_trade_no)
 {
     return(MicroPay.Cancel(out_trade_no));
 }