public PurchaseToken(
long installationID,
CurrencyAmount amt,
String cartID) throws ArgumentException, SelectException
"CurrencyAmount"
is a class that encapsulates the amount along with its currency. See Handling
Currencies . One of the reasons exceptions would be thrown during creation
of the purchase token is if the installationID is incorrect or the installation
has not yet been initialised. Your installation must be initialised by Web-Merchant/WM
before you can work with currencies or the purchase token.
Once you have an instance of the purchase token you call the method "produce". This returns a string representing the contents of the purchase token. It can only be reconstructed into a purchase token by Web-Merchant/WM. This string is used as the value of the "purchase" URL parameter.
You are supplied with an example servlet class called "BuyThis" which demonstrates how to create and use the purchase token. It is supplied in source form with the distribution in the directory java/examples. The source is also included below.
$Revision: 1.6 $