Home  Beta programs 
  Welcome to Mobipocket Developer Center
powered by FreeFind

eBookBase Retailer Integration

Getting Started
OverviewSteps to IntegrateWhat's new in V3Mobi Reader Desktop eBookstoreFAQ
eBookbase V3
Create a Purchase TransactionDownload of free sample ebookUser LogonUser Online LibraryUser Device ManagementTesting
Samples for eBookbase V3
Generate the Hashcode parameter for NewTransaction (ASP)Generate the Hashcode parameter for NewTransaction (JSP)
Home | Hide TOC | Add to Favorites

Colorized Source Code
<%@ page language="java" %>
<%@ page contentType="text/html; charset=ISO-8859-1" %>
<%@ page import="com.mobipocket.drm.Crypto" %>

<%
/*----------------------------------------
 Generation of Hash Code
 for New Transaction
web
service 
---------------------------------------- */ String PlainData; String HashCode; String CommerceID; String RetailerKey; String BookID; String RetailerTrans; String RetailerUserID; CommerceID = "MyCommerceID"; // replace this string by your CommerceID RetailerKey= "Mykey"; // replace this string by your retailer private key BookID = "6716";RetailerTrans = "125"; //replace this by the purchase transaction ID in your system RetailerUserID = "75860"; // Step 1. make the Plain DATA string CommerceID+RetailerUserID+BookId+RetailerTrans PlainData = CommerceID + RetailerUserID + BookID + RetailerTrans; //Step 2. encode the Plain DATA string Crypto c = new Crypto(); c.setKey(RetailerKey.getBytes()); HashCode = c.encode(PlainData); %>

Copyright 2000-2007 Mobipocket.com