/// <summary> /// 退款 /// </summary> /// <param name="argChargeId">支付编号</param> /// <param name="argParams"></param> /// <returns></returns> public RefundModel Refund(string argChargeId, Dictionary <string, object> argParams) { try { RefundBusiness bll = new RefundBusiness(PRIVATE_KEY, SECRET_KEY, PAYMAX_PUBLIC_KEY); return(bll.Create(argChargeId, argParams)); } catch (AuthorizationException ex) { throw new Exception("认证错误:" + ex.Message); } catch (InvalidRequestException ex) { throw new Exception("无效请求:" + ex.Message); } catch (InvalidResponseException ex) { throw new Exception("无效返回:" + ex.Message); } }
/// <summary> /// 查询退款 /// </summary> /// <param name="argChargeId">支付编号</param> /// <param name="argRefundId">退款编号</param> /// <returns></returns> public RefundModel RetrieveRefund(string argChargeId, string argRefundId) { try { RefundBusiness bll = new RefundBusiness(PRIVATE_KEY, SECRET_KEY, PAYMAX_PUBLIC_KEY); return(bll.Retrieve(argChargeId, argRefundId)); } catch (AuthorizationException ex) { throw new Exception("认证错误:" + ex.Message); } catch (InvalidRequestException ex) { throw new Exception("无效请求:" + ex.Message); } catch (InvalidResponseException ex) { throw new Exception("无效返回:" + ex.Message); } }