In order to support the updated gateway endpoint configuration for the retirement of TLS 1.0 the following changes may be required for your application:
- Update to .NET 4.5 or above
Currently there is support for:
- Purchase with Card Details
- Purchase with Token
- Tokenize Card
- Refund Purchase
- Subscriptions
- Customers
- System.Json
- Visual Studio test tools for unit testing
- Add a reference to the library.
- Configure the Gateway:
Gateway.Username="TEST";Gateway.Token="TEST";Gateway.SandboxMode=true;Gateway.TestMode=true;- Purchase, Refund, Tokenize etc
// Create a purchasevarresponse=Purchase.Create(120,"M Smith","5123456789012346",DateTime(2012,05,31),"123",invoice.record_number,Request.UserHostAddress);if(response.Successful&&response.Result.Successful){// Your logic here}else{// Do something with the errorsResponse.Write(response.Errors[0]);}Contributors, code reviewers and more are welcome - as I mentioned, this isn't my best code, but it is functional and passes the basic tests. Please feel free to contact me for more info at matthew.savage@fatzebra.com.au
Eventually once the library is of better quality this will be added to NuGet.