<p>Необходимо доработать универсальную проверку статуса платежей (pay2me) + проверка параметров при создании платежа pay2me.</p><p><br></p><p>========</p><p "="">проблема с проведением платежа через апи<br><br>листинг кода партнера:<br></p><table class="Bs nH iY"><tbody><tr><td><br></td></tr></tbody></table><pre>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Security.Cryptography;
using APICommon.Services;
using APICommon.Serialization;
using APICommon.Interfaces.Configuration;

namespace Emailtester
{
    public class Program
    {
        static void Main(string[] args)
        {
            PayAZ();
        }

        private class AZRequest
        {
            

            public decimal amount { get; set; }
            public int cardType { get { return 0; } }
            public string currency { get; set; }
            public string description { get; set; }
            public string email { get; set; }
            public string errorUrl { get; set; }
            public string key { get; set; }
            public string payFormType { get { return "DESKTOP"; } }
            public string phone { get; set; }
            public string successUrl { get; set; }
            public int taksit { get { return 0; } }
            public string sum
            {
                get
                {
                    SortedList&lt;string, string&gt; dataList = new SortedList&lt;string, string&gt;();

                    dataList.Add("amount", amount.ToString());
                    dataList.Add("phone", phone);
                    dataList.Add("email", email);
                    dataList.Add("description", description);
                    dataList.Add("cardType", cardType.ToString());
                    dataList.Add("currency", currency);
                    dataList.Add("taksit", taksit.ToString());
                    dataList.Add("payFormType", payFormType);
                    dataList.Add("successUrl", successUrl);
                    dataList.Add("errorUrl", errorUrl);
                    dataList.Add("key", key);

                    string strValue = string.Join("", dataList.Values) + "6gUHbdCIyq2MbzFG2fDLnxxhB9OskF";
                    string md5 = CalculateMD5Hash(strValue);

                    return md5;
                }
            }

            private string CalculateMD5Hash(string input)

            {

                // step 1, calculate MD5 hash from input

                MD5 md5 = System.Security.Cryptography.MD5.Create();

                byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(input);

                byte[] hash = md5.ComputeHash(inputBytes);

                // step 2, convert byte array to hex string

                StringBuilder sb = new StringBuilder();

                for (int i = 0; i &lt; hash.Length; i++)

                {

                    sb.Append(hash[i].ToString("X2"));

                }

                return sb.ToString();

            }
        }

        private class AZResponse
        {
            public string result { get; set; }
            public string paymentUrl { get; set; }
            public string id { get; set; }
        }

        public static void PayAZ()
        {
            AZRequest request = new AZRequest();

            request.key = "oWK5t4GvXunVG2EDK7Ti3W3eLG0k17";
            request.amount = 0.1m;
            request.phone = "7411188540";
            request.currency = "AZN";
            request.successUrl = "www.camex.az";
            request.errorUrl = "www.camex.az";
            request.email = "fkhalikov@gmail.com";
            request.description = "camex";

            //var mockObject = new Moq.Mock&lt;IProxyConfigurationService&gt;();
            //mockObject.Setup(x =&gt; x.ProxyServer).Returns("localhost");
            //mockObject.Setup(x =&gt; x.UseProxy).Returns(true);
            //mockObject.Setup(x =&gt; x.ProxyPortNumber).Returns(8888);

            HttpWebRequestRestHandlerFactory factory = new HttpWebRequestRestHandlerFactory(new JSONSerializer());

            var client =  factory.Create("https://epos.az/api/pay2me/pay");

            var result = client.Post&lt;AZRequest, AZResponse&gt;(request);

            var dd = result.Data;

        }
    }
}
</pre>