Skip to content

Instantly share code, notes, and snippets.

@BjornFridal
Created April 5, 2013 11:22
Show Gist options
  • Save BjornFridal/5318572 to your computer and use it in GitHub Desktop.
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
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