public void _001_TestNotificationCheck() { var Notification = new NotificationService(); var Args = new NotificationCheckServiceOptions(); Args.invoice_id = "4632527490"; Args.sale_id = "4632527448"; Args.md5_hash = "4FB7CD1CD57BBEFCCA462F3DE823C50A"; var result = Notification.Check(Args); Assert.IsTrue(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; }
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); }