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

2Checkout Documentation

Check

2Checkout returns both the buyer and a set of sale parameters including any custom parameters to the approved URL when the sale has been completed. The `Check` method in the `ReturnService` class provides a binding to validate the MD5 hash.

Method

ReturnService.Check

Use to validate the MD5 hash.

Arguments

  • TwoCheckoutConfig - Set your SecretWord and SellerID. Optionally set `Demo` to `true` to validate the hash on demo sales.
  • ReturnCheckServiceOptions - Object composed of `order_number`, `key` and `total`.

Returns

Boolean result of MD5 check.

Example Usage:

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

var Return = new ReturnService();
var Args = new ReturnCheckServiceOptions();
Args.total = "0.01";
Args.order_number = Request.Params["order_number"];
Args.key = Request.Params["key"];
bool result = Return.Check(Args);

Example Response:

true