Integration Guide

Table Of Contents
Digital Goods Integration Guide - EC Edition January 2012 29
Integrating Digital Goods for Express Checkout
Integrating Digital Goods Payments With Express Checkout
2
Example Merchant Page With Digital Goods JavaScript
The following code presents an example of the HTML code on the merchant page:
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css"></style>
</head>
<body>
<!-- Custom merchant code (path to merchant app, etc.) -->
<h1>El Jefe's Tours</h1>
<form action="path to setECURL" method="post">
<p>
<input id="submitBtn" type="submit"
value="Pay with PayPal" />
<input type="hidden" name="success_url"
value="path to successURL" />
<input type="hidden" name="cancel_url"
value="path to cancelURL">
</p>
</form>
<!-- End custom merchant code -->
<script
src="https://paypalobjects.com/js/external/dg.js">
</script>
<script>
var dg = new PAYPAL.apps.DGFlow({
// HTML ID of form submit buttons that call setEC
trigger:’submitBtn’,
expType:’instant’
});
</script>
</body>
</html>