QueryNow() public method

��ѯ������������ö����IJ�ѯ���
public QueryNow ( ) : bool
return bool
Example #1
0
        /// <summary>
        /// 查询易宝的订单支付状态
        /// </summary>
        private void QueryYeepayOrder()
        {
            PaymentSetting querySetting = new PaymentSetting(GatewayType.Yeepay);
            querySetting.Merchant.UserName = "******";
            querySetting.Merchant.Key = "0000000000000000000000000000000000000000";

            // 查询时需要设置订单的Id与金额,在查询结果中将会核对订单的Id与金额,如果不相符会返回查询失败。
            querySetting.Order.Id = "1564515";
            querySetting.Order.Amount = 0.01;

            if (querySetting.CanQueryNow && querySetting.QueryNow())
            {
                // 订单已支付
            }
        }
Example #2
0
        /// <summary>
        /// 查询微信的订单支付状态
        /// </summary>
        private void QueryWeChatPaymentOrder()
        {
            PaymentSetting querySetting = new PaymentSetting(GatewayType.WeChatPayment);
            querySetting.SetGatewayParameterValue("appid", "wx000000000000000");
            querySetting.Merchant.UserName = "******";
            querySetting.Merchant.Key = "0000000000000000000000000000000000000000";

            // 查询时需要设置订单的Id与金额,在查询结果中将会核对订单的Id与金额,如果不相符会返回查询失败。
            querySetting.Order.Id = "20";
            querySetting.Order.Amount = 0.01;

            if (querySetting.CanQueryNow && querySetting.QueryNow())
            {
                // 订单已支付
            }
        }