コード例 #1
0
        /// <summary>
        /// 充值POST
        /// </summary>
        public void UserRecharge()
        {
            decimal price      = 1;
            int     userID     = 1;
            var     alipayImpl = new AlipayImpl();

            alipayImpl.RechargeTo(price, userID);
        }
コード例 #2
0
        /// <summary>
        /// 订单POST
        /// </summary>
        public void UserOrder()
        {
            int     userID = 0, sourceType = 0;
            decimal price = 1;
            string  orderID = "OR001", name = "zzl";
            var     alipayImpl = new AlipayImpl();

            alipayImpl.OnlineTo(orderID, sourceType, userID, price, name, "时间戳tradeid,它是传到支付宝的号");
        }
コード例 #3
0
        /// <summary>
        /// 银联通知页面
        /// </summary>
        public void ChinaPayNotify()
        {
            var alipayImpl = new AlipayImpl();

            alipayImpl.Success += Impl_Success;
            alipayImpl.Fail    += Impl_Fail;
            alipayImpl.Notify_Return(HttpMethod.Post);
            alipayImpl.Success -= Impl_Success;
            alipayImpl.Fail    -= Impl_Fail;
        }
コード例 #4
0
        /// <summary>
        /// 支付宝返回页面
        /// </summary>
        public void AlipayReturn()
        {
            var alipayImpl = new AlipayImpl();

            alipayImpl.Success += Impl_Success;
            alipayImpl.Fail    += Impl_Fail;
            alipayImpl.Notify_Return(HttpMethod.Get);
            alipayImpl.Success -= Impl_Success;
            alipayImpl.Fail    -= Impl_Fail;
        }