Buy folio
Purchase a folio with the given product ID.
adobe.dps.store.buyFolio
| Parameter |
Type |
Description |
| folioProductId |
string
|
A string containing the product id of the folio to
buy. |
| callback |
function
|
Function that will be called with this signature:
{"result":status} where status is one of "succeeded", "failed", "cancelled",
"refunded" |
| withAnalytics |
boolean
|
An optional boolean indicating whether you want the
Viewer app to track analytics for this event. If you track analytics via
JavaScript in your own store, pass in false. Default value: true |
buyFolioFunction
| Parameter |
Type |
Description |
| dictionary |
folioResult
|
A dictionary containing the result status. |
| "result" |
folioStatus
|
The folio-buying status. |
API Snippet
buyFolio
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Buy Folio API</title>
<script type="text/javascript">
function buyFolio()
{
var folioID = document.getElementById("buy").value;
// call into the buyFolio API
adobe.dps.store.buyFolio(folioID, function(returnedData)
{
var status = returnedData['result'];
document.write("<p>Buy Folio returned with a " + status + " result</p>");
}
);
}
</script>
</head>
<body>
<p>Buy MyFolio</p>
<button type="button" id="buy" value="12345" onclick="buyFolio()">Buy Now</button>
</body>
</html>