public Boolean Check(ReturnCheckServiceOptions options) { Boolean Result; var HashString = new StringBuilder(); HashString.Append(TwoCheckoutConfig.SecretWord); HashString.Append(TwoCheckoutConfig.SellerID); if (TwoCheckoutConfig.Demo) { HashString.Append("1"); } else { HashString.Append(options.order_number); } HashString.Append(options.total); string CheckHash = TwoCheckoutUtil.Md5Hash(HashString.ToString()); if (CheckHash != options.key) { Result = false; } else { Result = true; } return(Result); }
public Boolean Check(NotificationCheckServiceOptions options) { Boolean Result; var HashString = new StringBuilder(); HashString.Append(options.sale_id); HashString.Append(TwoCheckoutConfig.SellerID); HashString.Append(options.invoice_id); HashString.Append(TwoCheckoutConfig.SecretWord); string CheckHash = TwoCheckoutUtil.Md5Hash(HashString.ToString()); if (CheckHash != options.md5_hash) { Result = false; } else { Result = true; } return(Result); }