Integration Guide
Table Of Contents
- Digital Goods Integration Guide - EC Edition
- Contents
- Preface
- Introducing Digital Goods for Express Checkout
- Integrating Digital Goods for Express Checkout
- Issuing Refunds
- Handling Recurring Payments
- How Recurring Payments Work
- Recurring Payments Terms
- Options for Creating a Recurring Payments Profile
- Recurring Payments With the Express Checkout API
- Recurring Payments Profile Status
- Getting Recurring Payments Profile Information
- Modifying a Recurring Payments Profile
- Billing the Outstanding Amount of a Profile
- Recurring Payments Notifications
- Options For Closing the Lightbox or Mini-browser
- Methods For Integrating Digital Goods Into Flash
- Express Checkout API Fields Supported By Digital Goods
- Revision History
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>