PayPal Hacks. 100 Industrial-Strength Tips and Tools Free Open Book

PayPal Hacks. 100 Industrial-Strength Tips and Tools

Previous Section  < Day Day Up >  Next Section

Hack 52 Display the Merchant Transaction ID on Your Return Page

figs/moderate.gif figs/hack52.gif

Because the transaction numbers issued to merchants and buyers are different, you need to provide the merchant ID to customers.

As a merchant on PayPal, you will undoubtedly have occasional post-sale questions from your customers. If your customers give you the transaction IDs they see in their PayPal account history, you will quickly realize they don't match the transaction IDs you see. This is because PayPal generates two unique transaction IDs: one for the merchant and one for the customer. This makes it difficult to track orders for your customers because they do not have the transaction ID you are using. Some simple scripting can head off this problem by giving your transaction ID to your customer.

5.9.1 The PayPal Button Code

To enable this hack, you'll need to employ the return variable in your purchase buttons. This variable specifies the URL of the page to which customers should be sent when they complete payment. Insert it into the standard PayPal-generated button code between the opening and closing <form> tags. Set the variable to the URL of the return page on your web site:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" 

                method="post">

<input type="hidden" name="business" value="youremail@yourisp.com">

<input type="hidden" name="item_name" value="Widget">

<input type="hidden" name="item_number" value="Wid-001">

<input type="hidden" name="amount" value="1.00">

<input type="hidden" name="no_note" value="1">

<input type="hidden" name="currency_code" value="USD">

<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" 

                border="0" name="submit">

<input type="hidden" name="add" value="1">

<input type="hidden" name="return" value=

"http://yoursite.com/returnpage.asp">

</form>

Your customer sees a Continue button on the Payment Sent confirmation page after making the payment. Clicking the button takes the buyer to the return page.

5.9.2 Creating Your Return Page

The return page is where you display the merchant's transaction ID to the customer. You want to display your ID; if your customer needs to contact you, he can give you this ID, and you can use it to look up the transaction in your transaction history. This is the easiest way to know for certain which order the customer is talking about.

Your transaction ID is passed as the txn_id variable. Access it in the same way you access the values passed to any CGI. You can do this with whatever method works best with your server's operating system and scripting languages. Here is the ASP way:

<body>

Here is your transaction Id. Keep it for all future order questions: <%=Request.Form("txn_id")%>

</body>

And here's the PHP way:

<body>

Here is your transaction Id. Keep it for all future order questions:

<?php

echo $_GET['txn_id'];

?> 

</body>

    Previous Section  < Day Day Up >  Next Section
    Index: [SYMBOL][A][B][C][D][E][F][G][H][I][J][L][M][N][O][P][Q][R][S][T][U][V][W][X][Y]


         Main Menu
    PayPal Hacks
    Table of Contents
    Copyright
    Credits
    Preface
    Chapter 1. Account Management
    Chapter 2. Making Payments
    Chapter 3. Selling with PayPal
    Chapter 4. Payment Buttons
    Chapter 5. Storefronts and Shopping Carts
    Introduction: Hacks #45-50
    Hack 45 Hack Shopping Cart Buttons
    Hack 46 Create Shopping Cart Links
    Hack 47 Specify the Size of the Shopping Cart Window
    Hack 48 Deal with Design and Layout Issues
    Hack 49 Put Both Cart Buttons in One Form
    Hack 50 Integrate a Third-Party Shopping Cart with PayPal
    Hack 51 Customize Checkout Pages
    Hack 52 Display the Merchant Transaction ID on Your Return Page
    Hack 53 Remember Your Customers
    Hack 54 Create a Dynamic Storefront
    Hack 55 Add Dynamic Storefront Details
    Hack 56 Insert Dynamic Images
    Hack 57 Build an Order-Tracking Page
    Hack 58 Offer Discount Coupons
    Hack 59 Increase Search Engine Exposure
    Hack 60 Sell Digital Goods with PayLoadz
    Chapter 6. Managing Subscriptions
    Chapter 7. IPN and PDT
    Chapter 8. The PayPal Web Services API
    Colophon
    Index


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplanes
    500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele