예제 #1
0
        private string connectToMellat(string payDate, string payTime, string orderID, int toPay)
        {
            BypassCertificateError();

            var bpService = new BankMellat.PaymentGatewayClient();

            string result = bpService.bpPayRequest(Int64.Parse(StaticValues.TerminalId),
                                                   StaticValues.UserName,
                                                   StaticValues.UserPassword,
                                                   Int64.Parse(orderID),
                                                   toPay,
                                                   payDate,
                                                   payTime,
                                                   String.Empty,
                                                   StaticValues.CallBackUrl,
                                                   0);

            String[] resultArray = result.Split(',');

            List <string> model = new List <string>();

            if (resultArray[0] == "0")
            {
                return(resultArray[1]);
            }
            else
            {
                throw new Exception("result: " + result);
            }
        }
예제 #2
0
        /// <summary>
        /// درخواست تایید پرداخت وجه
        /// </summary>
        /// <returns>کد نتیجه</returns>
        private static string verifyRequest(string saleOrderID, string saleReferenceId)
        {
            Int64 saleID = Int64.Parse(saleOrderID);

            var bpService = new BankMellat.PaymentGatewayClient();

            return(bpService.bpVerifyRequest(Int64.Parse(StaticValues.TerminalId),
                                             StaticValues.UserName,
                                             StaticValues.UserPassword,
                                             saleID,
                                             saleID,
                                             Int64.Parse(saleReferenceId)));
        }