// Zaxaa ZPN Sample Code for ASP.NET C# using System; using System.IO; using System.Text; using System.Net; using System.Web; using System.Security.Cryptography; public partial class ZpnSample : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // Your Zaxaa API Signature here String apiSignature = ""; // Grab transaction type String transType = Request["trans_type"]; if(! string.IsNullOrEmpty(transType)) { // Read POST data and validate ZPN String transReceipt = Request["trans_receipt"]; String transAmount = Request["trans_amount"]; String sellerID = Request["seller_id"]; String hashKey = Request["hash_key"]; int itemCount = int.Parse(Request["item_count"]); String myHashKey = GetMd5Hash(sellerID + apiSignature + transReceipt + transAmount).ToUpper(); if(myHashKey == hashKey) { // ZPN is valid // Do something... // You can do more validation like matching your seller ID // or matching your email address... // or validate the received amount... switch ( transType ) { case "SALE": // New payment for one-time product(s) for (int i=0; i