Figure 6-8These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. All rights reserved. Figure 6-9These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc.All rights reserved.154Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services
Figure 6-7These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. All rights reserved. After you submit the new user registration, a screen similar to Figure 6-8 is displayed. You are instructed to go to your e-mail to confirm the e-mail address. Again, because no e-mail is actu- ally sent, it is really talking about your online virtual inbox. To access the message to confirm youre-mail address, simply visit developer.paypal.com, log in with your developer account, and then clickthe Email tab, as shown in Figure 6-9. From the virtual e-mail inbox, open the confirmation e-mail. Follow the instructions in the message your account. You are prompted to enter the password associated with that test account. Acon- firmation screen is then displayed to indicate your account was activated. You are given the option a bank account from that point. If you select Skip, you can add test bank account and/or credit later. Go ahead and click Continue, where you are taken to a screen that automatically some test bank account information. You just fill in a test account name and click the option to createthe test account. To log into the test user account at any time, log in to the developer.paypal.com site, select the Sandboxoption, and then select the test account you want to log in to. You are then prompted to provide thelogin credentials for that account and redirected to the Sandbox environment for that account. You should make sure to set up a test bank account and a test credit card for this new test user by select- ing Add Credit Card or Add Bank Account option from the main screen after logging in to the Sandboxenvironment with that test user. Repeat the process described previously to create a test business account for a seller.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services
Figure 6-5These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. All rights reserved. Figure 6-6These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. All rights reserved. 152Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Mac Web Hosting services
Figure 6-4These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. Allrights reserved. Setting Up Test AccountsAfter you have created a developer account, you can create test accounts. While logged in to your devel- oper account, click the Sandbox option. You need to set up a test Buyer and a test Seller account to example later in this chapter. To do so, click the Create a Test Account link. Ascreen like the oneshown in Figure 6-5 is displayed. Choose the type of account you want to set up personal or business and click the Continue button, as shown in Figure 6-6. Select Personal Account and click Continue. You will repeat these steps later a business account. An Account Sign Up form, as shown in Figure 6-7, is then displayed. Fill in the address information and other information requested on the screen. You do not need to pro- vide real data because this is just a test account. For security reasons, please do not use your actualPayPal password for this test account. You can provide totally fictitious data; you just need to rememberthe username and password that is specified so you can log into that account later. Do not worry aboute-mails being sent to that e-mail address. As mentioned earlier, all e-mails go to your virtual inbox are working in the Sandbox test environment. You can tell you are in the Sandbox by the Sandbox logo on the Web page, or from the URLitself.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Mac Web Hosting services
Figure 6-2These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. Allrights reserved. Figure 6-3These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. Allrights reserved.150Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services
Supported FeaturesThe PayPal API supports four services in the current form, which is the beta version of the PayPal API time of this book s writing: .GetTransactionDetails Retrieve details about a particular transaction .TransactionSearch Search for transactions that meet a specified criteria .RefundTransaction Refund a prior transaction in full or in part .MassPay Send one or more payments at a timeEach of these services is examined in more detail later in this chapter. Getting Set Up to Use the PayPal APILike eBay, PayPal has a test environment called the Sandboxwhere you can test the workings of yourprogram without hitting a live server. With PayPal, because money is involved, additional steps must to ensure the communications are highly secure. In this section, I will navigate you through the tedious process of getting a developer account set up, ating some test accounts, adding some money to those test accounts, manually creating transactions, a security certificate. All these setup steps are necessary before you can take advantage of thePayPal API in the test environment. Of course, because money is involved and you are presumably the PayPal API, this chapter focuses on the Sandbox test environment. If you want to work with PayPal API later on, you must change the URLto point to the live site instead. Setting Up a Developer s AccountIn order to access the Sandbox test environment and to access the online documentation for the PayPalAPI, you need a developer s account. First, go to http://developer.paypal.com, as shown in Fig- ure 6-2. Click the link that says Sign Up Now and a signup screen, as shown in Figure 6-3, will be displayed. Fill in the requested information and follow the online instructions for completing the account registra- tion. After you have a developer account, you can revisit developer.paypal.com and log in with yournew account. Ascreen like the one shown in Figure 6-4 is then displayed. After you log into PayPal Developer Central, you have access to the various resources that enable you with the API. The Sandbox option allows you to manage test accounts and log into the Sandboxusing one of the test accounts. The Test Certificates option allows you to view test certificates for youraccounts. The Email option allows you to view a virtual e-mail inbox of the test accounts you have ated. All e-mails that would normally be sent to an actual e-mail are instead placed in the virtual e-online when you work with the Sandbox test environment. Forums are available where you with others regarding the PayPal API. Finally, the Help Center option allows you to down- load code examples and documentation.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services
PayPal 101PayPal offers secure online payment options. Buyers can set up a PayPal account and fund the accountwith a credit card, a bank account, or by sending in money to PayPal. Merchants can use PayPal toaccept various types of payments and pays PayPal a commission for handling the transaction. To set upa PayPal buyer or merchant account for use online, visit www.paypal.com, as shown in Figure 6-1. Figure 6-1These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. All rights reserved. PayPal was made famous because of eBay, but numerous other companies use PayPal to facilitate pay- ment transactions on their own Web sites. Introduction to the PayPal APINow that you know the basics of the services that PayPal offers, let s turn to the PayPal API. The PayPalAPI is an XMLWeb service that can be called using the SOAPprotocol. This concept was introduced inChapter 1. 148Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services
Using the PayPal APIIf you are familiar with eBay, you are probably also familiar with PayPal. PayPal became famousfor allowing individuals and businesses alike to easily accept credit cards and other electronic pay- ments for their eBay auction sales. PayPal is also accepted as a payment service by companiesother than just eBay. Companies all over the world have established PayPal merchant accountstoallow payment for their goods and services online by customers who have a PayPal account. Given that eBay currently owns PayPal, it is not surprising that an API has also been releasedtoallow developers to more easily integrate PayPal payment transactions into their custom applications. This chapter gets you up and running with the PayPal API, and more specifically, covers the following: .An introduction to PayPal as an online payment service .How to set up a developer account and a security certificate required to use thePayPalAPI .How to convert the security certificate to the required format .The syntax of PayPal API queries .How to call the PayPal API using SOAPfrom Visual Studio .NET .Additional ideas for how you might use the PayPal APIAlthough the setup process to use the PayPal API is a bit tedious, the PayPal API itself is lessdetailed than the others you have looked at so far because you have only a few different ways toprocess payments. Additional information, including code examples and API documentation, isavailable on the PayPal developer site. This chapter spends the majority of time helping you getset up to use the PayPal API and also providing a simple example to illustrate how to call the APIto process payments from your programs.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services
Another example is a company called MarketWorks (www.marketworks.com) that has used the eBayAPI to streamline the listing of over 2 million listings per month. Other companies have used the API tointegrate eBay features into existing applications or have created listing tools to make management oflistings easier. SummaryYou learned about eBay as a leading online auction house, and how eBay is helping assure its future suc- cess by making it easy for you to include eBay functionality in your own programs. You learned aboutthe two different ways you can call an eBay API, and you looked at some examples of how you can usethe API in your own programs. If you want more information about the eBay API, additional examplesare included in some of the later chapters or in the comprehensive online documentation. Now, turn to Chapter 6 where you learn about the eBay s sister API: PayPal. 146Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services
Here are examples of other ways to use the eBay Web API: .Send an automatic e-mail to the winning bidder after you determine the auction has closed winner has been established. .Sign up for platform notifications (commercial-tier members only) where an HTTPpost is a URLyou specify when certain events occur, such as a buyer leaving feedback or an auctionending. .Retrieve a daily or other periodic status report of your listings on eBay. .Create a third-party listing tool that enables your customers to more easily manage their listingsfrom within their existing inventory management applications. Third-Party eBay ExtensionsAs with the other APIs discussed so far, dozens of third parties have used the eBay Web API in creativeways. On the eBay Web site, you can find an extensive list of what some of these third parties have The list is currently located at http://developer.ebay.com/DevProgram/business/stories.For example, Bonfire Media (www.bonfiremedia.com) currently offers a product called Pocket Auctions, which is an application that uses the eBay API to allow users to shop, compare prices, bid, and so on mobile phones. An example of a screen from the Bonfire Media Web site discussing Pocket Auctionsis illustrated in Figure 5-13. Figure 5-13145Using
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services