public override void ProcessForm(Order order) { 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); formHandler.Post(); }
public override void ProcessForm(Order order) { var formHandler = new PaymentFormHandler { Url = "https://sci.interkassa.com/", InputValues = new Dictionary <string, string> { { "ik_co_id", ShopId }, { "ik_pm_no", order.OrderID.ToString() }, { "ik_am", (order.Sum / order.OrderCurrency.CurrencyValue).ToString("F2").Replace(",", ".") }, { "ik_desc", GetOrderDescription(order.Number) }, { "ik_cur", order.OrderCurrency.CurrencyCode } } }; if (IsCheckSign) { formHandler.InputValues.Add("ik_sign", GetSign(formHandler.InputValues)); } formHandler.Post(); }
private PaymentFormHandler RendPaymentFormHandler(Order order) { var sum = (order.Sum * CurrencyValue).ToString("F2").Replace(",", "."); var payment = new PaymentFormHandler { FormName = "_xclick", Method = FormMethod.POST, Url = "https://www.moneta.ru/assistant.htm", InputValues = new Dictionary <string, string> { { "MNT_ID", MerchantId }, { "MNT_TRANSACTION_ID", order.OrderID.ToString() }, { "MNT_CURRENCY_CODE", CurrencyLabel }, { "MNT_AMOUNT", sum }, { "MNT_TEST_MODE", TestMode ? "1" : "0" }, { "MNT_DESCRIPTION", GetOrderDescription(order.Number) }, { "MNT_SIGNATURE", string.Format("{0}{1}{2}{3}{4}{5}", MerchantId, order.OrderID.ToString(), sum, CurrencyLabel, TestMode ? "1" : "0", Signature).Md5() }, { "MNT_SUCCESS_URL", SuccessUrl }, { "MNT_FAIL_URL", FailUrl }, } }; if (!string.IsNullOrEmpty(UnitId)) { payment.InputValues.Add("paymentSystem.unitId", UnitId); } if (!string.IsNullOrEmpty(LimitIds)) { payment.InputValues.Add("paymentSystem.limitIds", LimitIds); } return(payment); }
public override string ProcessFormString(Order order, PaymentService.PageWithPaymentButton page) { var formHandler = new PaymentFormHandler { Url = "https://sci.interkassa.com/", InputValues = new Dictionary<string, string> { {"ik_co_id", ShopId}, {"ik_pm_no", order.OrderID.ToString()}, {"ik_am", (order.Sum / order.OrderCurrency.CurrencyValue).ToString("F2").Replace(",", ".")}, {"ik_desc", GetOrderDescription(order.Number)}, {"ik_cur", order.OrderCurrency.CurrencyCode} } }; if (IsCheckSign) formHandler.InputValues.Add("ik_sign", GetSign(formHandler.InputValues)); return formHandler.ProcessRequest(); }