using POSV.Entity; using POSV.Proxy.ThirdPartyPayMent.PayApiBase; using POSV.ShoppingCart; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace POSV.Proxy.ThirdPartyPayMent { public class DemoPay : PayBase { public DemoPay() { this.PayNmae = "**支付"; } /// /// 异步支付 /// /// /// /// public override void AsyncPayStart(string payCode, PayMode payMode, OrderObject order, Dictionary value) { } /// /// 同步支付 /// /// public override Tuple PayStart(string payCode, PayMode payMode, string TradeNo, decimal PaidAmount, Dictionary value) { try { logger.Info("进入" + this.PayNmae + "支付接口..."); return new Tuple(true, "", null); } catch (Exception ex) { logger.Error(ex, this.PayNmae + "支付接口异常"); return new Tuple(false, ex.Message, null); } } /// /// 支付查询 /// /// /// 1、商户2、乐刷订单号,必须按顺序 /// public override Tuple QueryPay(PayMode payMode, string TradeNo, string OutTradeNo, Dictionary value) { try { logger.Info("进入" + this.PayNmae + "查询接口..."); return new Tuple(true, "", null); } catch (Exception ex) { logger.Error(ex, this.PayNmae + "查询接口异常"); return new Tuple(false, ex.Message, null); } } /// /// 退款 /// /// /// /// /// public override Tuple RefundPay(PayMode payMode, PayItem payItem, Dictionary value) { try { logger.Info("进入" + this.PayNmae + "退款接口..."); return new Tuple(true, "", null); } catch (Exception ex) { logger.Error(ex, this.PayNmae + "退款接口异常"); return new Tuple(false, ex.Message, null); } } /// /// 验证支付配置 /// /// /// /// public override Tuple> VerifyPay(PayMode payMode) { try { logger.Info("获取" + this.PayNmae + "参数..."); return new Tuple>(true, "", null); } catch (Exception ex) { logger.Info("获取支付参数异常..."); logger.Error(ex, this.PayNmae + "获取参数异常"); return new Tuple>(false, ex.Message, null); } } //================================内部方法================================ /// /// 第三方转本地对象 /// /// /// /// /// /// protected override Tuple ToPayObject(object queryParam, PayMode payMode, string TradeNo, decimal PaidAmount) { try { return new Tuple(true, "", null); } catch (Exception ex) { logger.Error(ex); return new Tuple(false, ex.Message, null); } } } }