Пример #1
0
        private NameValueCollection GetData(HttpRequest req)
        {
            if (string.IsNullOrEmpty(req["Crypt"]))
            {
                return(null);
            }
            var queryParams = HttpUtility.ParseQueryString(SagePayUtils.DecodeAndDecrypt(req["Crypt"], Password));

            return(new[]
            {
                "Status",
                "StatusDetail",
                "VendorTxCode",
                "VPSTxId",
                "Amount",
            }.Any(item => string.IsNullOrEmpty(queryParams[item])) ? null : queryParams);
        }
Пример #2
0
 private string GetCrypt(string vendorTxCode, string amount, string currency, string description, string successUrl, string failUrl)
 {
     return(SagePayUtils.EncryptAndEncode(string.Format("VendorTxCode={0}Amount={1}Currency={2}Description={3}SuccessURL={4}FailureURL={5}",
                                                        vendorTxCode, amount, currency, description, successUrl, failUrl), Password));
 }