Exemplo n.º 1
0
        public void Initialize(IPaymentConfig config)
        {
            _config = config;

            IsEnabled = _config.Enabled;

            if (!IsEnabled)
            {
                return;
            }

            // validate the pool wallet.
            if (!ValidatePoolAddress())
            {
                return;
            }

            // get the pool's account name if any.
            GetPoolAccount();

            // determine the satoshis in the coin.
            if (!DeterminePrecision())
            {
                return;
            }

            // calculate the minimum amount of payments in satoshis.
            _paymentThresholdInSatoshis = (decimal)(_magnitude * config.Minimum);

            // if we reached here, then we can just setup the timer to run payments.
            _timer = new Timer(RunPayments, null, _config.Interval * 1000, Timeout.Infinite);
        }
Exemplo n.º 2
0
        public void Initialize(IPaymentConfig config)
        {
            _config = config;

            IsEnabled = _config.Enabled;

            if (!IsEnabled)
                return;

            // validate the pool wallet.
            if (!ValidatePoolAddress())
                return;

            // get the pool's account name if any.
            GetPoolAccount();

            // determine the satoshis in the coin.
            if (!DeterminePrecision())
                return;

            // calculate the minimum amount of payments in satoshis.
            _paymentThresholdInSatoshis = (decimal) (_magnitude*config.Minimum);

            // if we reached here, then we can just setup the timer to run payments.
            _timer = new Timer(RunPayments, null, _config.Interval * 1000, Timeout.Infinite);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 处理退款返回结果
 /// </summary>
 /// <param name="context">请求</param>
 /// <exception cref="ApplicationException"></exception>
 /// <returns></returns>
 public virtual PaymentInfo ProcessRefundReturn(IPaymentConfig config, HttpContext context)
 {
     throw new PluginException("未实现此方法");
 }
Exemplo n.º 4
0
 public virtual PaymentInfo EnterprisePay(IPaymentConfig config, EnterprisePayPara para)
 {
     throw new PluginException("未实现此方法");
 }
Exemplo n.º 5
0
 /// <summary>
 /// 退款入口
 /// </summary>
 /// <param name="para"></param>
 /// <returns></returns>
 public virtual RefundFeeReturnModel ProcessRefundFee(IPaymentConfig config, PaymentPara para)
 {
     throw new PluginException("未实现此方法");
 }