" dynamic="no"} Language Libraries | Developer Documentation | 2Checkout
Language

2Checkout Documentation

Check

2Checkout’s Instant Notification Service passes messages for each sale event such as a recurring billing success or decline to a URL you specify for each message type under the Notifcations area in your account. The `Check method in the `NotificationService` class provides a binding to validate the MD5 hash.

Method

Use to validate the MD5 hash.

Arguments

  • TwoCheckoutConfig - Set your SecretWord and SellerID.
  • NotificationCheckServiceOptions - Object composed of `sale_id`, `md5_hash` and `invoice_id`.

Returns

Boolean result of MD5 check.

Example Usage:

TwoCheckoutConfig.SecretWord = "tango";
TwoCheckoutConfig.SellerID = "1817037";

var Notification= new NotificationService();
var Args = new NotificationCheckServiceOptions();
Args.total = "0.01";
Args.order_number = Request.Params["order_number"];
Args.key = Request.Params["key"];
bool result = Notification.Check(Args);

Example Response:

true