Пример #1
0
            public void ProcessRequest(HttpContext context)
            {
                netpay = new CmsNetpayHandle();
                form   = context.Request.Form;
                string action = context.Request["action"];

                if (action == "submit")
                {
                    context.Response.Write(Submit());
                }
                else if (action == "test")
                {
                    SortedDictionary <string, string> dict = new SortedDictionary <string, string>();
                    dict.Add("action", "submit");
                    dict.Add("order_no", String.Empty.RandomLetters(10));
                    dict.Add("pmid", "1");
                    dict.Add("ptid", "3");
                    dict.Add("order_fee", "0.01");
                    dict.Add("order_exp_fee", "0");
                    dict.Add("show_url", "");
                    dict.Add("receive_name", "");
                    dict.Add("receive_address", "");
                    dict.Add("receive_zip", "");
                    dict.Add("receive_phone", "");
                    dict.Add("receive_mobile", "");

                    context.Response.Write(
                        PayUtil.GetGatewaySubmit(context.Request.Path, dict)
                        );
                }
            }