Skip to content

Repository files navigation

SyntaxTree.FastSpring

SyntaxTree.FastSpring is a C# helper library to validate the different requests FastSpring can send.

It works on .NET 3.5, .NET 4.0 and .NET 4.5. It supports both ASP.NET MVC and the ASP.NET WebForms.

API

For ASP.NET MVC.

namespaceSyntaxTree.FastSpring{publicsealedclassHttpRequestBaseExtensions{publicstaticboolIsValidNotification(thisHttpRequestBaserequest,stringprivateKey){}publicstaticboolIsValidLicenseRequest(thisHttpRequestBaserequest,stringprivateKey){}}}

Test the validity of a request.

Usage from a controller:

usingSyntaxTree.FastSpring;publicclassNotificationController:Controller{[HttpPost]publicActionResultNotifyOrder(stringcustomerCompany,stringcustomerEmail,stringcustomerFirstName,stringcustomerLastName,stringcustomerPhone,stringorderId){conststringprivateKey="75f0fff79f988c10b2c4f6315aec5a86";if(!Request.IsValidNotification(privateKey)){// ...}// ...}}

The API for the ASP.NET WebForms is exactly the same except that we define the extension methods on the type System.Web.HttpRequest.

About

A library to validate the different FastSpring requests

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages