Exemplo n.º 1
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            string sum = (order.Sum * CurrencyValue).ToString("#0.##").Replace(',', '.');
            // порядок из формата
            var values = new Dictionary <string, string>
            {
                { "AMOUNT", sum },
                { "CURRENCY", CurrencyLabel },
                { "ORDER", GetOrderIdString(order.OrderID) },
                { "DESC", string.Format("order #{0} payment", order.Number) },
                { "MERCH_NAME", MerchName },
                { "MERCH_URL", SettingsMain.SiteUrl.ToLower() },
                { "MERCHANT", Merchant },
                { "TERMINAL", Terminal },
                { "EMAIL", Email },
                { "TRTYPE", "1" },
                { "COUNTRY", Culture.Language == Culture.SupportLanguage.Russian ? "RU" : "EN" },
                { "MERCH_GMT", (DateTime.Now - DateTime.UtcNow).Hours.ToString() },
                { "TIMESTAMP", DateTime.UtcNow.ToString("yyyyMMddHHmmss") },
                { "NONCE", GenerateNonce() },
                { "BACKREF", SuccessUrl }
            };

            values.Add("P_SIGN", GetPSign(values));
            return(new PaymentFormHandler
            {
                FormName = "_xclick",
                Method = FormMethod.POST,
                Page = page,
                Url = "https://3ds2.mmbank.ru/cgi-bin/cgi_link",
                InputValues = values
            }.ProcessRequest());
        }
Exemplo n.º 2
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var sum = (order.Sum * CurrencyValue).ToString(CultureInfo.InvariantCulture);

            return(new PaymentFormHandler
            {
                FormName = "_xclick",
                Method = FormMethod.GET,
                Page = page,
                Url = "https://merchant.roboxchange.com/Index.aspx",
                InputValues = new Dictionary <string, string>
                {
                    { "MrchLogin", MerchantLogin },
                    { "OutSum", sum },
                    { "InvId", order.OrderID.ToString() },
                    { "Desc", GetOrderDescription(order.Number) },
                    { "IncCurrLabel", CurrencyLabel },
                    { "Culture", Culture.Language == Culture.SupportLanguage.Russian ? "ru" : "en" },
                    {
                        "SignatureValue",
                        (MerchantLogin + ":" + sum + ":" + order.OrderID + ":" + Password).Md5()
                    }
                }
            }.ProcessRequest());
        }
Exemplo n.º 3
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var paymentNo   = order.OrderID.ToString();
            var sum         = string.Format("{0:0.00}", order.Sum / CurrencyValue);
            var description = string.Format("Order #{0} payment", order.Number);

            return(new PaymentFormHandler
            {
                Url = Url,
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "VPSProtocol", "2.23" },
                    { "TxType", "PAYMENT" },
                    { "Vendor", Vendor },
                    { "VendorTxCode", paymentNo },
                    { "Amount", sum },
                    { "Currency", CurrencyCode },
                    { "Description", description },
                    { "SuccessURL", SuccessUrl },
                    { "FailureURL", FailUrl },
                    { "Crypt", GetCrypt(paymentNo, sum, CurrencyCode, description, SuccessUrl, FailUrl) }
                }
            }.ProcessRequest());
        }
Exemplo n.º 4
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var paymentNo = order.OrderID.ToString();
            var sum       = (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".");
            var inputVals = new Dictionary <string, string>
            {
                { "StoreKey", StoreKey },
                { "ThanksURL", SuccessUrl },
                { "NoThanksURL", CancelUrl },
                { "ResponseFormat", "HTML1" },
                { "OrderID", paymentNo },
                { "FullTotal", sum }
            };

            if (Sandbox)
            {
                inputVals.Add("TestResult", "R"); // Random test results
            }
            return(new PaymentFormHandler
            {
                Url = Url,
                InputValues = inputVals,
                Page = page
            }.ProcessRequest());
        }
Exemplo n.º 5
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var sum      = (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".");
            var shopName = Configuration.SettingsMain.ShopName;

            if (shopName.Length > 30)
            {
                shopName = shopName.Substring(0, 26) + "...";
            }
            return(new PaymentFormHandler
            {
                Url = Url,
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "pay_to_email", PayToEmai },
                    { "recipient_description", shopName },
                    { "transaction_id", order.OrderID.ToString() },
                    { "return_url", SuccessUrl },
                    { "cancel_url", CancelUrl },
                    { "status_url", NotificationUrl },
                    { "language", "en_US" },
                    { "amount", sum },
                    { "currency", CurrencyCode },
                    { "detail1_description", "Order ID:" },
                    { "detail1_text", order.OrderID.ToString() },
                }
            }.ProcessRequest());
        }
Exemplo n.º 6
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         FormName = "pay",
         Method = FormMethod.POST,
         Page = page,
         //Url = string.Format("https://{0}/pay/order.cfm", Sandbox ? "test.paysecure.ru" : PayUrl),//"secure.paysecure.ru"
         Url = Sandbox ? "https://test.paysecure.ru/pay/order.cfm" : UrlWorkingMode, //"secure.paysecure.ru"
         InputValues = new Dictionary <string, string>
         {
             { "Merchant_ID", MerchantID.ToString() },
             { "OrderNumber", order.Number },
             { "Delay", Delay ? "1" : "0" },
             { "OrderAmount", order.Sum.ToString().Replace(",", ".") },
             { "OrderCurrency", CurrencyCode },
             { "URL_RETURN", CancelUrl },
             { "URL_RETURN_OK", SuccessUrl },
             { "URL_RETURN_NO", FailUrl },
             //{"CardPayment", CardPayment ? "1" : "0"},
             //{"WebMoneyPayment", WebMoneyPayment ? "1" : "0"},
             //{"PayCashPayment", PayCashPayment ? "1" : "0"},
             //{"QiwiBeelinePayment", QiwiBeelinePayment ? "1" : "0"},
             //{"AssistIDCCPayment", AssistIdCcPayment ? "1" : "0"},
             { "TestMode", Sandbox ? "1" : "0" }
         }
     }.ProcessRequest());
 }
Exemplo n.º 7
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var gatewayUrl = new Uri(Url);
            var sum        = String.Format(CultureInfo.InvariantCulture, "USD {0:0.00}", order.Sum);
            var pars       = new Dictionary <string, string>
            {
                { "immediateReturn", "1" },
                { "signatureVersion", "2" },
                { "signatureMethod", "HmacSHA256" },
                { "accessKey", AccessKey },
                { "amount", sum },
                { "description", Configuration.SettingsMain.ShopName },
                // {"amazonPaymentsAccountId", AccountId},
                { "returnUrl", SuccessUrl },
                { "referenceId", order.OrderID.ToString() }
            };

            pars.Add("signature", AmazonUtils.SignParameters(pars, SecretKey, "POST", gatewayUrl.Host, gatewayUrl.AbsolutePath));
            return(new PaymentFormHandler
            {
                Url = Url,
                InputValues = pars,
                Page = page
            }.ProcessRequest());
        }
Exemplo n.º 8
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var formHandler = new PaymentFormHandler
            {
                Url         = "https://www.monexy.ua/merchant/merchant.php",
                InputValues = new Dictionary <string, string>
                {
                    { "myMonexyMerchantID", MerchantId },
                    { "myMonexyMerchantShopName", ShopName },
                    { "myMonexyMerchantSum", (order.Sum * CurrencyValue).ToString("F2").Replace(",", ".") },
                    { "myMonexyMerchantCurrency", MerchantCurrency },
                    { "myMonexyMerchantOrderId", order.OrderID.ToString() },
                    { "myMonexyMerchantOrderDesc", "" },
                    { "myMonexyMerchantResultUrl", this.SuccessUrl },
                    { "myMonexyMerchantSuccessUrl", this.SuccessUrl },
                    { "myMonexyMerchantFailUrl", this.FailUrl },
                }
            };

            var paramStr = formHandler.InputValues.OrderBy(v => v.Key)
                           .Aggregate("", (current, value) => current + (value.Key + "=" + value.Value));

            var hash = IsCheckHash ? (paramStr + SecretKey).Md5(false) : paramStr.Md5(false);

            formHandler.InputValues.Add("myMonexyMerchantHash", hash);

            return(formHandler.ProcessRequest(true));
        }
Exemplo n.º 9
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         Url = DemoMode ? "https://demomoney.yandex.ru/eshop.xml" : "https://money.yandex.ru/eshop.xml",
         Page = page,
         Method = FormMethod.POST,
         InputValues =
         {
             { "shopId",         ShopId                                                           },
             { "scid",           ScId                                                             },
             { "sum",            (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".")     },
             { "customerNumber", order.OrderCustomer.CustomerID.ToString().Normalize()            },
             { "orderNumber",    order.OrderID.ToString(CultureInfo.InvariantCulture).Normalize() },
             { "shopSuccessURL", HttpUtility.UrlEncode(SuccessUrl)                                },
             { "shopFailURL",    HttpUtility.UrlEncode(FailUrl)                                   },
             { "cps_email",      order.OrderCustomer.Email ?? string.Empty                        },
             { "paymentType",    YaPaymentType                                                    },
             {
                 "cps_phone",
                 order.OrderCustomer.MobilePhone.IsNotEmpty() &&
                 order.OrderCustomer.MobilePhone.All(char.IsDigit) &&
                 order.OrderCustomer.MobilePhone.Length <= 15
                     ? order.OrderCustomer.MobilePhone
                     : string.Empty
             },
             { "cms_name",       "AdVantShop.NET"                                                 }
         }
     }.ProcessRequest());
 }
Exemplo n.º 10
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var paymentNo        = order.OrderID.ToString();
            var sum              = (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".");
            var tempRandomString = new Guid().ToString();

            return(new PaymentFormHandler
            {
                Url = Url,
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "pg_amount", sum },
                    { "pg_currency", Currency },
                    { "pg_description", Resources.Resource.Client_OrderConfirmation_PayOrder + " #" + order.OrderID },
                    { "pg_merchant_id", MerchantId },
                    { "pg_order_id", paymentNo },
                    { "pg_salt", tempRandomString },
                    { "pg_sig", GetSignature("payment.php" + Separator
                                             + sum + Separator
                                             + Currency + Separator
                                             + Resources.Resource.Client_OrderConfirmation_PayOrder + " #" + order.OrderID + Separator
                                             + MerchantId + Separator
                                             + paymentNo + Separator
                                             + tempRandomString) }
                }
            }.ProcessRequest());
        }
Exemplo n.º 11
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         FormName = "pay",
         Method = FormMethod.POST,
         Page = page,
         Url =
             string.Format("https://{0}/api/checkout/v2/checkoutForm/Merchant/{1}",
                           Sandbox ? "sandbox.google.com/checkout" : "checkout.google.com", MerchantID),
         InputValues = new Dictionary <string, string>
         {
             { "item_currency_1", CurrencyCode },
             {
                 "item_name_1",
                 Resource.Client_OrderConfirmation_PayOrder + " #" + order.Number
             },
             {
                 "item_description_1",
                 Resource.Client_OrderConfirmation_PayOrder + " #" + order.Number
             },
             { "item_quantity_1", "1" },
             {
                 "item_price_1",
                 CurrencyService.ConvertCurrency(order.Sum, CurrencyValue,
                                                 order.OrderCurrency.CurrencyValue).
                 ToString().Replace(",", ".")
             },
             { "item_merchant_id_1", order.Number },
             { "return", SuccessUrl },
             { "cancel_return", CancelUrl },
             { "_charset_", "" }
         }
     }.ProcessRequest());
 }
Exemplo n.º 12
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            Dictionary <string, string> dict = new Dictionary <string, string>
            {
                { "sid", Sid },
                { "mode", "2CO" },
                //{"cart_order_id", order.Number},
                //{"merchant_order_id", order.Number},
                //{"total", (order.Sum/CurrencyValue).ToString("F2").Replace(",", ".")},
                { "demo", Sandbox ? "Y" : "N" },
                //{"return_url", SuccessUrl},
                //{"x_receipt_link_url", SuccessUrl},
                //{"id_type", "1"},
                //{"lang", "en"}
            };

            for (int i = 0; i < order.OrderItems.Count; i++)
            {
                dict.Add("li_" + i + "_type", "product");
                dict.Add("li_" + i + "_name", order.OrderItems[i].Name.Replace(">", "").Replace("<", ""));
                dict.Add("li_" + i + "_quantity", order.OrderItems[i].Amount.ToString());
                dict.Add("li_" + i + "_price", order.OrderItems[i].Price.ToString("F2"));
                dict.Add("li_" + i + "_tangible", "Y");
            }

            return(new PaymentFormHandler
            {
                Url = "https://www.2checkout.com/checkout/purchase",
                Page = page,
                InputValues = dict
            }.ProcessRequest());
        }
Exemplo n.º 13
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var sum         = (order.Sum * CurrencyValue).ToString("F2").Replace(",", ".");
            var description = GetOrderDescription(order.Number);
            var issuer_id   = order.OrderID.ToString();

            var inputValues = new Dictionary <string, string>
            {
                { "shop_id", ShopID },
                { "currency", CurrencyCode },
                { "sum", sum },
                { "description", description },
                { "message", description },
                { "issuer_id", issuer_id }
            };

            if (KeepUnique)
            {
                inputValues.Add("keep_uniq", "1");
            }
            inputValues.Add("signature", GetSignature(CurrencyCode + description + issuer_id + (KeepUnique ? "1" : string.Empty) + description + ShopID + sum + CryptoHex));

            return(new PaymentFormHandler
            {
                FormName = "_xclick",
                Method = FormMethod.POST,
                Page = page,
                //Url = "https://demoney.mail.ru/pay/light/", test accaunt
                Url = "https://money.mail.ru/pay/light/",
                InputValues = inputValues,
            }.ProcessRequest());
        }
Exemplo n.º 14
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var paymentNo   = order.OrderID.ToString();
            var sum         = string.Format("{0:0.00}", order.Sum / CurrencyValue);
            var description = string.Format("Order #{0} payment", order.Number);

            return(new PaymentFormHandler
            {
                Url = Url,
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "instId", InstID.ToString() },
                    { "cartId", paymentNo },
                    { "Amount", sum },
                    { "currency", CurrencyCode },
                    { "desc", description },
                    { "SuccessURL", SuccessUrl },
                    { "FailureURL", FailUrl },
                    //FIELDS TO ENCRYPTION instId:amount:currency:cartId
                    { "signature", (InstID.ToString() + sum + CurrencyCode + paymentNo).Md5() },
                    { "MC_code", (sum + CurrencyCode + paymentNo).Md5() }
                }
            }.ProcessRequest());
        }
Exemplo n.º 15
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            //1.	AMOUNT (Сумма к оплате. Разделитель копеек – точка)
            //2.	ORDER (Внутренний номер заказа. Должен быть уникальным. Использоваться для завершения расчёта. Содержать только цифры длинной 6-32 значения.)
            //3.	MERCH_URL (URL, который подставляется по ссылке «Назад в магазин». Если не задан, берется из базы настроек терминала)
            //4.	TERMINAL (Код терминала, присваиваемый банком)
            //5.	COUNTRY (Страна. Обязательно передавать, если торговец находится не в России)
            //6.	TIMESTAMP (Время проведения операции в GMT (-4 часа от московского). Формат YYYYMMDDHHMMSS)
            //7.	SIGN (Цифровая подпись. Шифруется по алгоритму: md5(TERMINAL. TIMESTAMP.ORDER.AMOUNT.<секретное слово>) Точка между параметрами – операция конкатенации)

            var orderIdString = string.Empty;

            for (int i = 0; i < 6 - order.OrderID.ToString().Length; i++)
            {
                orderIdString += "0";
            }
            orderIdString += order.OrderID;

            var timestamp = DateTime.UtcNow.ToString("yyyyMMddHHmmss");

            return(new PaymentFormHandler
            {
                Url = "https://pay.masterbank.ru/acquiring",
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "AMOUNT", order.Sum.ToString().Replace(',', '.') },
                    { "ORDER", orderIdString },
                    { "MERCH_URL", SuccessUrl },
                    { "TERMINAL", Terminal },
                    { "TIMESTAMP", timestamp },
                    { "SIGN", GetMd5Hash(MD5.Create(), Terminal + timestamp + orderIdString + order.Sum.ToString().Replace(',', '.') + SecretWord) }
                }
            }.ProcessRequest());
        }
Exemplo n.º 16
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            int index = 0;

            if (!string.IsNullOrEmpty(order.BillingContact.Name))
            {
                index = order.BillingContact.Name.IndexOf(" ");
            }
            string first_name = string.Empty;
            string last_name  = string.Empty;

            if (index > 0)
            {
                first_name = order.BillingContact.Name.Substring(0, index).Trim();
                last_name  = order.BillingContact.Name.Substring(index + 1).Trim();
            }
            else
            {
                first_name = order.BillingContact.Name.Trim();
            }

            return(new PaymentFormHandler
            {
                FormName = "_xclick",
                Method = FormMethod.POST,
                Url = GetUrl(),
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "cmd", Command },
                    { "business", EMail },
                    { "charset", "utf-8" },
                    { "currency_code", CurrencyCode },
                    { "item_name", string.Format("Order #{0}", order.OrderID) },
                    { "invoice", order.Number },
                    { "amount", CurrencyService.ConvertCurrency(ShowTaxAndShipping ? order.Sum - order.TaxCost - order.ShippingCost : order.Sum, CurrencyValue, order.OrderCurrency.CurrencyValue).ToString("F2").Replace(",", ".") },
                    { "tax", CurrencyService.ConvertCurrency(ShowTaxAndShipping ? order.TaxCost : 0, CurrencyValue, order.OrderCurrency.CurrencyValue).ToString("F2").Replace(",", ".") },
                    { "shipping", CurrencyService.ConvertCurrency(ShowTaxAndShipping ? order.ShippingCost : 0, CurrencyValue, order.OrderCurrency.CurrencyValue).ToString("F2").Replace(",", ".") },
                    { "address1", (order.BillingContact.Address ?? string.Empty).Replace("\n", "") },
                    { "city", order.BillingContact.City ?? string.Empty },
                    { "country", AdvantShop.Repository.CountryService.GetIso2(order.BillingContact.Country ?? string.Empty) ?? string.Empty },
                    { "lc", AdvantShop.Repository.CountryService.GetIso2(order.BillingContact.Country ?? string.Empty) ?? string.Empty },
                    //{"email", order.BillingContact.Email ?? string.Empty},
                    { "email", order.OrderCustomer.Email ?? string.Empty },
                    { "first_name", first_name ?? string.Empty },
                    { "last_name", last_name ?? string.Empty },
                    { "zip", order.BillingContact.Zip ?? string.Empty },
                    { "state", order.BillingContact.Zone ?? string.Empty },
                    { "return", SuccessUrl },
                    { "notify_url", NotificationUrl },
                    { "cancel_return", CancelUrl }
                }
            }.ProcessRequest());
        }
Exemplo n.º 17
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var xml = GetOperationXml(order);

            return(new PaymentFormHandler
            {
                Url = "https://www.liqpay.com/?do=clickNbuy",
                InputValues = new Dictionary <string, string>
                {
                    { "operation_xml", GetOperation(xml) },
                    { "signature", GetSignature(xml) }
                }
            }.ProcessRequest());
        }
Exemplo n.º 18
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         Url = "http://www.interkassa.com/lib/payment.php",
         InputValues = new Dictionary <string, string>
         {
             { "ik_shop_id", ShopId },
             { "ik_payment_amount", order.Sum.ToString("F2").Replace(",", ".") },
             { "ik_payment_id", order.OrderID.ToString() },
             { "ik_payment_desc", GetOrderDescription(order.Number) },
             { "ik_paysystem_alias", "" }
         }
     }.ProcessRequest());
 }
Exemplo n.º 19
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         Url = "https://bitpay.com/api/invoice/",
         InputValues = new Dictionary <string, string>
         {
             //{"posData", GetPosData(order.OrderItems)},
             { "price", order.Sum.ToString("F2").Replace(",", ".") },
             { "currency", Currency },
             { "orderID", order.OrderID.ToString() },
             { "itemDesc", string.Format(Resources.Resource.Payment_OrderDescription, order.Number) },
             { "physical", "true" }
         }
     }.ProcessRequest());
 }
Exemplo n.º 20
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         Url = Sandbox ? "https://au.ewaygateway.com/Request/" : "https://www.eway.com.au/gateway/payment.asp",
         Page = page,
         InputValues = new Dictionary <string, string>
         {
             { "ewayCustomerID", CustomerID },
             { "eWAYURL", SuccessUrl },
             { "ewayTotalAmount", ((order.Sum / CurrencyValue) * 100).ToString("F0") },
             { "ewayCustomerInvoiceDescription", Resources.Resource.Client_OrderConfirmation_PayOrder + " #" + order.OrderID },
             { "ewayTrxnNumber", order.Number }
         }
     }.ProcessRequest());
 }
Exemplo n.º 21
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            string sum = System.Math.Round((order.Sum * CurrencyValue), 1).ToString().Replace(",", ".");

            if (CheckMd5)
            {
                return(new PaymentFormHandler
                {
                    FormName = "_xclick",
                    Method = FormMethod.GET,
                    Page = page,
                    Url = "http://secure.onpay.ru/pay/" + FormPay,
                    InputValues = new Dictionary <string, string>
                    {
                        { "url_success", SuccessUrl },
                        { "pay_mode", "fix" },
                        { "price", sum },
                        { "currency", CurrencyLabel },
                        { "pay_for", order.OrderID.ToString() },
                        { "price_final", "true" },
                        {
                            "md5",
                            ("fix" + sum + ";" + CurrencyLabel + ";" + order.Number + ";yes;" + SecretKey).Md5(true)
                        }
                    }
                }.ProcessRequest());
            }

            else
            {
                return(new PaymentFormHandler
                {
                    FormName = "_xclick",
                    Method = FormMethod.GET,
                    Page = page,
                    Url = "http://secure.onpay.ru/pay/" + FormPay,
                    InputValues = new Dictionary <string, string>
                    {
                        { "url_success", SuccessUrl },
                        { "pay_mode", "fix" },
                        { "price", sum },
                        { "currency", CurrencyLabel },
                        { "pay_for", order.OrderID.ToString() }
                    }
                }.ProcessRequest());
            }
        }
Exemplo n.º 22
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var    sum     = (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".");
            string message = "Orderid=" + order.OrderID + "&Amount=" + sum + "&Currency=" + "&PaymentDetails=" + "&Email=" + "&FirstName=" +
                             "&LastName=" + "&MiddleName=none&Phone=" + "&Address=" + "&Language=" + "&return_url=";

            return(new PaymentFormHandler
            {
                Url = "https://card.cyberplat.ru/cgi-bin/getform.cgi",
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "version", "2.0" },
                    { "message", message }
                }
            }.ProcessRequest());
        }
Exemplo n.º 23
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         Url = "http://w.qiwi.ru/setInetBill_utf.do", //_utf
         InputValues = new Dictionary <string, string>
         {
             { "from", From },
             { "to", order.PaymentDetails.Phone },
             { "summ", (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".") },
             { "com", GetOrderDescription(order.Number) },
             { "lifetime", Lifetime.ToString() },
             { "check_agt", "false" },
             { "txn_id", order.OrderID.ToString() }
         }
     }.ProcessRequest());
 }
Exemplo n.º 24
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         Url = "http://money.yandex.ru/eshop.xml",
         Page = page,
         InputValues =
         {
             { "scid",           ScID           },
             { "shopId",         ShopID         },
             { "BankId",         BankID         },
             { "CustomerNumber", CustomerNumber },
             { "method_id",      MethodID       },
             { "Sum",            (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".")}
         }
     }.ProcessRequest());
 }
Exemplo n.º 25
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         FormName = "_xclick",
         Method = FormMethod.GET,
         Url = "http://www.alfabank.ua/credit/bpk/index.php",
         InputValues = new Dictionary <string, string>
         {
             { "partner", PartnerId },
             { "surname", order.OrderCustomer.LastName },
             { "name", order.OrderCustomer.FirstName },
             { "midname", "" },
             { "phone", (order.OrderCustomer.MobilePhone.IsNotEmpty() ? order.OrderCustomer.MobilePhone : string.Empty) },
             { "email", order.OrderCustomer.Email },
             { "product", string.Join(",", order.OrderItems.Select(item => HttpUtility.HtmlEncode(item.Name))) }
         }
     }.ProcessRequest());
 }
Exemplo n.º 26
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            int sequence = new Random().Next(0, 1000);

            // a time stamp is generated (using a function from simlib.asp)
            int timeStamp = Convert.ToInt32((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds);

            //generate a fingerprint
            string fingerprint = HMAC_MD5(TransactionKey,
                                          Login + "^" + sequence + "^" + timeStamp + "^" + order.Sum + "^");

            //TODO deal with POST

            return(new PaymentFormHandler
            {
                FormName = "_xclick",
                Method = FormMethod.POST,
                Page = page,
                Url =
                    string.Format("https://{0}/gateway/transact.dll",
                                  Sandbox ? "test.authorize.net" : "secure.authorize.net"),
                InputValues = new Dictionary <string, string>
                {
                    { "x_login", Login },
                    { "x_fp_sequence", sequence.ToString() },
                    { "x_fp_timestamp", timeStamp.ToString() },
                    { "x_fp_hash", fingerprint },
                    { "x_relay_url", SuccessUrl },
                    { "x_invoice_num", order.Number },
                    { "x_test_request", "false" },
                    { "x_show_form", "PAYMENT_FORM" },
                    { "x_description", string.Format("Order #{0}", order.Number) },
                    { "x_amount", order.Sum.ToString() },
                    { "x_first_name", order.OrderCustomer.FirstName },
                    { "x_last_name", order.OrderCustomer.LastName },
                    { "x_address", order.BillingContact.Address },
                    { "x_city", order.BillingContact.City },
                    { "x_zip", order.BillingContact.Zip },
                    { "x_phone", order.OrderCustomer.MobilePhone },
                    { "x_email", order.OrderCustomer.Email },
                }
            }.ProcessRequest());
        }
Exemplo n.º 27
0
 public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
 {
     return(new PaymentFormHandler
     {
         Url = "http://money.yandex.ru/eshop.xml",
         Page = page,
         InputValues =
         {
             { "scid",         ScId                                                              },
             { "shopId",       ShopId                                                            },
             { "CustName",     order.OrderCustomer.FirstName + order.OrderCustomer.LastName      },
             { "CustEMail",    order.OrderCustomer.Email                                         },
             { "CustAddr",     order.ShippingContact.Address                                     },
             { "OrderDetails", string.Join(",", order.OrderItems.Select(item => item.Name + " - " + item.Amount))},
             { "Sum",          (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".")      },
             { "paymentType",  YaPaymentType                                                     }
         }
     }.ProcessRequest());
 }
Exemplo n.º 28
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            string sum = Math.Round(order.Sum * CurrencyRate * 100).ToString();

            return(new PaymentFormHandler
            {
                FormName = "_xclick",
                Method = FormMethod.GET,
                Page = page,
                Url = "https://payment.architrade.com/paymentweb/start.action",
                InputValues = new Dictionary <string, string>
                {
                    { "merchant", Merchant },
                    { "amount", sum },
                    { "accepturl", this.SuccessUrl },
                    { "orderid", order.OrderID.ToString() },
                    { "currency", Currency },
                    { "test", "yes" },
                    //{"acquirerinfo", ""},
                    { "acquirerlang", CultureInfo.CurrentCulture.TwoLetterISOLanguageName },
                    //{"voucher", order.OrderCustomer.FirstName + " " + order.OrderCustomer.LastName},
                    //{"uniqueoid", order.BillingContact.Country + "," + order.BillingContact.City + "," + order.BillingContact.Address},
                    //{"ticketrule", order.OrderCustomer.MobilePhone},
                    //{"priceinfo1", order.OrderCustomer.CustomerIP},
                    //{"preauth", order.OrderCustomer.CustomerIP},
                    //{"postype", order.OrderCustomer.CustomerIP},
                    //{"ordline0-1", order.OrderCustomer.CustomerIP},
                    //{"ordertext", order.OrderCustomer.CustomerIP},
                    //{"md5key", order.OrderCustomer.CustomerIP},
                    //{"maketicket", order.OrderCustomer.CustomerIP},
                    { "lang", CultureInfo.CurrentCulture.TwoLetterISOLanguageName },
                    //{"ip", order.OrderCustomer.CustomerIP},
                    //{"delivery1", order.OrderCustomer.CustomerIP},
                    //{"decorator", order.OrderCustomer.CustomerIP},
                    //{"capturenow", order.OrderCustomer.CustomerIP},
                    //{"cancelurl", order.OrderCustomer.CustomerIP},
                    //{"callbackurl", order.OrderCustomer.CustomerIP},
                    //{"calcfee", "foo"},
                    //{"account", order.OrderCustomer.CustomerIP},
                    //{"HTTP_COOKIE", order.OrderCustomer.CustomerIP},
                }
            }.ProcessRequest());
        }
Exemplo n.º 29
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var paymentNo = order.OrderID.ToString();
            var sum       = (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".");

            return(new PaymentFormHandler
            {
                Url = Url,
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "LMI_PAYEE_PURSE", Purse },
                    { "LMI_PAYMENT_NO", paymentNo },
                    { "LMI_PAYMENT_DESC", Resources.Resource.Client_OrderConfirmation_PayOrder + " #" + order.OrderID },
                    { "LMI_PAYMENT_AMOUNT", sum },
                    { "ZP_SIGN", GetSign(paymentNo, sum) }
                }
            }.ProcessRequest());
        }
Exemplo n.º 30
0
        public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page)
        {
            var paymentNo = order.OrderID.ToString();
            var sum       = (order.Sum / CurrencyValue).ToString("F2").Replace(",", ".");

            return(new PaymentFormHandler
            {
                Url = "https://rbkmoney.ru/acceptpurchase.aspx",
                Page = page,
                InputValues = new Dictionary <string, string>
                {
                    { "eshopId", EshopId },
                    { "orderId", paymentNo },
                    { "serviceName", Resources.Resource.Client_OrderConfirmation_PayOrder + " #" + order.OrderID },
                    { "recipientAmount", sum },
                    { "recipientCurrency", RecipientCurrency },
                    { "preference", Preference }
                }
            }.ProcessRequest());
        }