Skip to content

Notification_Check

Jacob McConnell edited this page Jun 6, 2014 · 2 revisions

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

Clone this wiki locally