Example #1
0
        public void GetSignKeyTest()
        {
            //沙箱验证流程参考:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=23_1
            //关注微信公众号:WXPayAssist

            Senparc.Weixin.Config.UseSandBoxPay = true;

            var nonceStr = TenPayV3Util.GetNoncestr();
            var dataInfo = new TenPayV3GetSignKeyRequestData(base._mchId, nonceStr, base._tenPayKey);
            var result   = TenPayV3.GetSignKey(dataInfo);

            Console.WriteLine(result.ResultXml);
            Assert.IsTrue(result.IsReturnCodeSuccess());

            //继续测试一个订单接口
            MicroPayTest(result.sandbox_signkey, nonceStr);
        }