Created
April 5, 2013 11:22
-
-
Save BjornFridal/5318572 to your computer and use it in GitHub Desktop.
MD5 checksum fix for the QuickPay provider in TeaCommerce. See this link for details http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/39333-Quickpay-MD5-checksum-problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected string MD5CheckSum(IDictionary<string, string> inputFields, string md5secret) | |
{ | |
string[] keys = { "protocol", "msgtype", "merchant", "language", "ordernumber", "amount", "currency", "continueurl", "cancelurl", "callbackurl" }; | |
string values = ""; | |
foreach (string key in keys) | |
if (inputFields.Any(s => s.Key == key)) | |
values += inputFields[key]; | |
return GetMd5Hash(values + md5secret); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment