• • • • • • Table of Contents Index Reviews Reader Reviews Errata Academic PayPal Hacks By Dave Burchell, David Nielsen, Shannon Sofield Publisher : O'Reilly Pub Date : September 2004 ISBN : 0-596-00751-5 Pages : 368 Learn how to make the most of PayPal to get the most out of your online business or transactions From how to take steps to protect yourself while buying and selling on eBay to using PayPal on your own site to handle subscriptions, affiliations, and donations, PayPal Hacks provides the tools and details necessary to make PayPal more profitable, more flexible, and more convenient • • • • • • Table of Contents Index Reviews Reader Reviews Errata Academic PayPal Hacks By Dave Burchell, David Nielsen, Shannon Sofield Publisher : O'Reilly Pub Date : September 2004 ISBN : 0-596-00751-5 Pages : 368 Copyright Credits About the Authors Contributors Acknowledgments Preface Why PayPal Hacks? Getting Started with the Code in This Book Further Study How This Book Is Organized Database Coding and Platform Choices How to Use This Book Conventions Used in This Book Using Code Examples How to Contact Us Got a Hack? Chapter 1 Account Management Introduction: Hacks #1-9 Hack 1 Create a PayPal Account Hack 2 Verify Your PayPal Account Hack 4 Pay When You've Forgotten Your Password Hack 6 Create a Separate Login for Each Employee Hack 8 Manage PayPal Email Hack 3 Confirm Your Mailing Address Hack 5 Restore Your Account if It Has Been Limited Hack 7 Access Member Information Hack 9 Get Help from PayPal Chapter 2 Making Payments Introduction: Hacks #10-16 Hack 10 Send Money to Anyone Hack 11 Choose How to Fund Payments Hack 13 Pay from a Cell Phone Hack 15 Send Money Without Creating a PayPal Account Hack 12 Use Your PayPal Funds Anywhere Hack 14 Pay Seller Fees when Buying Hack 16 Dispute Merchandise Payments Chapter 3 Selling with PayPal Introduction: Hacks #17-27 Upgrade to Business Class Set Your Payment Receiving Preferences Hack 17 Request Money the PayPal Way Hack 19 Request Money Without an Account Hack 21 Refund a Payment Hack 23 Lower Your Seller Fees Hack 25 Protect Yourself from Chargebacks Hack 27 Handle Merchandise Disputes Effectively Identify Yourself to Your Customers Hack 18 Ask for Money in Your Own Way Hack 20 Get Your Money Hack 22 Quick-Link to Transaction Details Hack 24 Protect Yourself from Buyer Fraud Hack 26 Avoid Chargebacks on Digital Goods Chapter 4 Payment Buttons Introduction: Hacks #28-44 Hack 29 Use a Custom Button Image Hack 31 Create an Auction Payment Button Hack 33 Include More Than Two Option Fields Hack 35 Build Notification Tracking Hack 37 Hack-Proof Your Buttons with Encryption Hack 39 Hide Your Email Address from Spammers Hack 41 PayPal-Enable Your Flash Hack 43 Provide Options with ASP.NET Web Controls Hack 28 Create a Buy Now Button Hack 30 Create a Purchase Button for Services Hack 32 Provide Purchase Options with Drop-Down Listboxes Hack 34 Override Shipping and Handling Preferences Hack 36 Hack-Proof Your Payment Hack 38 Include Payment Buttons in Email Messages Hack 40 Accept Donations Hack 42 Get More Out of Dreamweaver and PayPal Hack 44 Try Accepting Payments in a Bogus Currency Chapter 5 Storefronts and Shopping Carts Introduction: Hacks #45-50 Hack 45 Hack Shopping Cart Buttons Hack 46 Create Shopping Cart Links Hack 48 Deal with Design and Layout Issues Hack 50 Integrate a Third-Party Shopping Cart with PayPal Hack 52 Display the Merchant Transaction ID on Your Return Page Hack 54 Create a Dynamic Storefront Hack 56 Insert Dynamic Images Hack 58 Offer Discount Coupons Hack 47 Specify the Size of the Shopping Cart Window Hack 49 Put Both Cart Buttons in One Form Hack 51 Customize Checkout Pages Hack 53 Remember Your Customers Hack 55 Add Dynamic Storefront Details Hack 57 Build an Order-Tracking Page Hack 59 Increase Search Engine Exposure Hack 60 Sell Digital Goods with PayLoadz Chapter 6 Managing Subscriptions Introduction: Hacks #61-64 Hack 61 Sell Subscriptions to Your Online Content Hack 62 Offer Tiered Subscriptions Hack 63 Time Your Subscriptions to End on Specific Dates Hack 64 Manage Subscription Passwords the Easy Way Chapter 7 IPN and PDT Introduction: Hacks #65-86 What IPN and PDT Are Advantages of PDT Hack 66 Troubleshoot Instant Payment Notifications Hack 68 Process Shopping Carts with IPN Hack 70 Track Your eBay Products with IPN Hack 72 Deliver Digital Goods with a Return Page Hack 74 Provide an Order Summary with IPN Hack 76 Enable Multiple IPN Pages Hack 78 Manage Your Inventory with IPN Hack 80 Display a Recent Donor List Hack 82 Insert Payment Details into a Database with IPN Hack 84 Track Google Referrals How IPN Works Hack 65 Receive Instant Payment Notifications Hack 67 Send a Purchase Confirmation Email with IPN Hack 69 Use IPN with eBay Listings Hack 71 Deliver Digital Goods with IPN Hack 73 Implement Price Checking with IPN Hack 75 Upsell Your Customers Hack 77 Use Mass Pay to Create an Affiliate System Hack 79 Display Donation Goals on Your Web Site Hack 81 Capture Customer Information with IPN Hack 83 Insert Cart Details into a Database Hack 85 Process Payments like a Credit Card with PDT Hack 86 Synchronizing PDT and IPN Chapter 8 The PayPal Web Services API Introduction: Hacks #87-100 Section 8.2 Create a Developer Account Hack 88 Make Your First API Call Hack 90 Use the PayPal API Wrapper Class Hack 87 Set up the Sandbox Hack 89 Create a Wrapper Class for Your API Calls Hack 91 Refund Payments with the API Hack 92 Handle Transaction Errors within the API Wrapper Hack 93 Retrieve Transaction Details with the API Hack 95 Hack the API Wrapper Hack 97 Pay Affiliates and Suppliers on a Schedule Hack 99 Test IPN and PDT in the Sandbox Hack 94 Search for PayPal Transactions Hack 96 Issue Payments en Masse with the Mass Pay API Hack 98 Search eBay for Listings that Accept PayPal Hack 100 Go Live Colophon Index Copyright © 2004 O'Reilly Media, Inc All rights reserved Printed in the United States of America Published by O'Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O'Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (http://safari.oreilly.com) For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly Media, Inc The Hacks series designations, PayPal Hacks, the image of a money changer, "Hacks 100 Industrial-Strength Tips and Tools," and related trade dress are trademarks of O'Reilly Media, Inc Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and O'Reilly Media, Inc was aware of a trademark claim, the designations have been printed in caps or initial caps While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein Small print: The technologies discussed in this publication, the limitations on these technologies that technology and content owners seek to impose, and the laws actually limiting the use of these technologies are constantly changing Thus, some of the hacks described in this publication may not work, may cause unintended harm to systems on which they are used, or may not be consistent with applicable user agreements Your use of these hacks is at your own risk, and O'Reilly Media, Inc disclaims responsibility for any damage or expense resulting from their use In any event, you should take care that your use of these hacks does not violate any applicable laws, including copyright laws Credits About the Authors Contributors Acknowledgments received, after refunding payments using Mass Pay Seller Protection Policy chargebacks and 2nd Seller Reputation Numbers sellers checking status of 2nd merchandise disputes and 2nd preventing merchandise disputes Sells, Chris Send Money tab accepting payments from Pay Anyone subtab preventing use of, for auctions Send to Friend feature SendMassPay( ) server-side scripting server-side verification of discount coupons Service Button (Payment Wizard) session objects, creating session variables, setting for customer visits setAllowNote( ) setAmount( ) setBillContinuous( ) setBillingAmount( ) setBillingPeriod( ) setBillingTime( ) setBusinessID( ) setCancelURL( ) setCurrency( ) setExtraShipping( ) setHandling( ) setItemName( ) setItemNumber( ) setLogoURL( ) setNoShipping( ) setPrice( ) setReattempt( ) setReturnURL( ) setShipping( ) setStopAfterBilling( ) setTarget( ) setTrialAmount( ) setUpdateableQuantity() Share the Love system (Amazon) Shining Light Productions Win32 OpenSSL shipping addresses capturing with IPN confirming unconfirmed, accepting payments from Shipping Calculations page Shipping Information page shipping preferences, overriding shipping products, protections when Shipping Tool (PayPal) shipping variable Aggregate Cart feature overriding preferences shipping2 variable 2nd shopping carts Add To Cart button [See Add To Cart button] adding items to Aggregate Cart feature combining buttons into one form converting button code to links creating button for creating user controls inserting details into databases integrating third-party shopping carts with PayPal opening in new browser windows price checking for purchases processing with IPN shortening URLs specifying window sizes Upload Complete Cart feature shortening payment URLs 2nd shopping cart URLs Sign In pages for subscribers signatures, requiring for delivery single-item purchases IPN pages and PDT (Payment Data Transfer) and simple price checking with vs shopping carts site_ variable size of shopping cart windows, specifying Sklar, David Smart Logo payments snapping in PayPal connection to Flash SnipURL tool SOAP-enabling your application Sofield, Shannon spam avoid sending to customers hiding email addresses from spammers spoofed payments, preventing 2nd with encryption SQL (Structured Query Language) queries SQL Pocket Guide SSL certificates 2nd converting text files into cer files, using OpenSSL generating from Sandbox st (status of transaction) parameter standard rates vs merchant rates start/end dates, searching for transactions by status attribute status of orders, tracking status of payments, searching for transactions by status of transaction (st) parameter stolen credit cards, repercussions of using storefronts [See dynamic storefronts] Stranger in a Strange Land Strategic Database Marketing: The Master Plan for Starting and Managing a Profitable, Customer-Based Subscribe button creating Modify Subscription button adding a premium subscription button subscribers-only content, controlling access to Subscription button adding to Flash-powered online stores Component Inspector for inserting, using WebAssist PayPal eCommerce Toolkit methods that set values obfuscating button code SubscriptionInfoType object subscriptions canceling multiple currencies supported multiple terms supported to online content, selling Password Management feature processing subscriber notifications shortcut to details page signing in, to access premium online content tiered timing to end on same day trial periods upgrading Subscriptions and Recurring Payments Manual suppliers, scheduling payments with Mass Pay API support for PayPal email inquiries online forums telephone [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] tab-delimited text files, setting up for Mass Pay tables, embedding Button Factory code in Tanaka, Ray target="paypal" attribute, including in Add To Cart buttons tax variable Aggregate Cart feature telephone password recovery process telephone support for PayPal templates, building for dynamic storefronts test transactions setting up testing scripts for IPN pages text messages, requesting payments with Tien, Alan tiered subscriptions inserting tier information for new subscriptions keeping track of levels, for subscribers restricting access based on level TinyURL tool Trachtenberg, Adam tracking affiliate referrals eBay products with IPN Google conversions with IPN order status packages to protect against chargebacks PayPal application usage sales from Google advertising sales using PayPal payment buttons users before/after PayPal transactions visitors to web sites Transaction Disputes page transaction IDs capturing displaying on return pages 2nd IPN (Instant Payment Notification) code and order-tracking pages and retrieving transaction details searching for payments by transaction logs on cell phones transaction number (tx) parameter 2nd transactions details of retrieving viewing 2nd duplicate handling errors within API wrapper class return URL parameters searching for, using API TransactionSearch API TransactionSearchResponseType class transferring PayPal funds to bank accounts trial periods for subscriptions troubleshooting Customer Service phone numbers IPNs recovering forgotten passwords tx (transaction number) parameter 2nd txn_id variable txn_type variable type of payments, searching for transactions by [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] unclaimed payments unconfirmed addresses, accepting payments from University, eBay upgrading to better subscriptions Personal accounts Upload Complete Cart feature upselling customers URLs converting shopping cart button code to payment URLs, shortening 2nd shopping cart URLs, shortening User Status, checking usernames of subscribers adding manually automatically generating [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] variables, adding to payment buttons VB.NET Language in a Nutshell VBScript for Active Server Pages (ASP) adding email to IPN capturing customer information processing shopping carts sample IPN code Vendio Community forum verifying accounts before requesting certificates bank accounts in the Sandbox discount coupons on server side PayPal accounts 2nd PayPal transactions View Cart button creating, using Button Factory inserting, using WebAssist PayPal eCommerce Toolkit putting in one form, with Add To Cart button ViewState of user controls, preserving virtual debit cards, paying with visitors to web sites current subscriber lists and tracking [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] WAP (Wireless Application Protocol), paying from WAP-enabled cell phones weapons, repercussions of selling Web Accept button web controls, creating in ASP.NET web interface for viewing transaction details web references, setting up Web Services API creating developer accounts handling transaction errors within API wrapper making first API call refunding payments Sandbox, setting up searching for PayPal transactions wrapper class for API calls Web Services Description Language (WSDL) files accessing web services web sites accepting payments through increasing search engine exposure linking to pages with detailed product information phishing and platforms for hosting return pages, sending customers to using multiple custom checkout page styles WebAssist PayPal eCommerce Snap-ins for Flash MX underneath the hood of WebAssist PayPal eCommerce Toolkit, using Macromedia Dreamweaver with Website Payment Preferences page 2nd window size for shopping carts, specifying winning bidders, notifying Wireless Application Protocol (WAP), paying from WAP-enabled cell phones withdrawing money from PayPal accounts Woo, Katherine wrapper class for PayPal API creating creating master-detail reports making API calls with refunding payments using searching for transactions WSDL (Web Services Description Language) files accessing web services [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] X.com, linking to paypal.com [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] Yarger, Randy Jay Yeung, Mike ỊYou've got cashĨ email ... O'Reilly logo are registered trademarks of O'Reilly Media, Inc The Hacks series designations, PayPal Hacks, the image of a money changer, "Hacks 100 Industrial- Strength Tips and Tools, " and related trade dress are trademarks of O'Reilly Media, Inc... under the hood; there are many tips and tricks you can use to save time and improve sales with PayPal The hacks in this book address the technological and diplomatic challenges faced by all PayPal members, and are written from the perspectives of both... very real emphasis on trading responsibly and ethically, as well as extensive tools and tips for protecting yourself as both a buyer and a seller PayPal, on the surface, seems like a simple system allowing you to send and receive payments