Exemple #1
0
        public void SerialializeTest()
        {
            //var order = UnifiedOrder.CreateJsapi();
            //order.FeeType = FeeType.CNY;
            //var xml = order.ToXml();
            //Console.WriteLine(1);
            var d = PaymentObject.DoSign(
                "appid=wxd8b64943ac261c4c&attach=RC201606161652410000000022&body=会员卡0000000000000001充值0.01元&detail=会员卡0000000000000001充值0.01&device_info=WEB&fee_type=CNY&mch_id=1327313401&nonce_str=00027497064e495eb91c92d8afa517e3&notify_url=http://weixintest.ecard.chihank.com/000000002/Payment/Payment/Notify&openid=oS7mJwK6jQZoBs2ZAPN3NSFmvxLg&out_trade_no=RC201606161652410000000022&spbill_create_ip=59.40.231.46&time_expire=20160617165305&time_start=20160616165241&total_fee=1&trade_type=JSAPI&key=1234881IKyudkeoi484fjklj98rt3489jt4i");

            Assert.AreEqual("5EE82CFAB5397E9D9543BEABE95CA0FD", d);
        }
Exemple #2
0
        public void DoSignTest()
        {
            var data = "appid=wxd930ea5d5a258f4f&body=test&device_info=1000&mch_id=10000100&nonce_str=ibuaiVcKdpRxkhJA";

            Assert.AreEqual("9A0A8659F005D6984697E2CA0A9CF3B7", PaymentObject.DoSign(data));
        }