Integrate the Express Checkout code from Chapter 2 with the project code from this chapter to “fully implement” Website Payments Pro as required by PayPal’s terms of service. Hint: consider maintaining separate payment handling classes for each of these products and making just a few minor changes to templates/checkout.html.
Use a tool such as diff
to compare the baseline
Tweet Relevance project to the modified project from this chapter.
On a Linux system, for example, the following options for
diff
produce a convenient side-by-side display on a
terminal with 237 columns when executed from the root of the source
tree:
$ diff --recursive --side-by-side
--suppress-common-lines --width=237 --exclude=*.pyc appa
ch04
Try implementing an “authorization and capture” as described in the Website Payments Pro Integration Guide to implement an extension to Tweet Relevance in which a paying customer can gift a 30-day subscription to a friend. Authorize the card at the time the paying customer gifts the subscription, but don’t capture the funds until the recipient of the gift subscription logs in for the first time.
Read the Wikipedia article on PCI Compliance.
All sample code for this book is available online at GitHub and is conveniently organized by chapter. Although much of the code is included in the text of this book so that it’s as instructional as possible, always reference the latest bug-fixed code on GitHub as the definitive reference for sample code. Bug tickets and patches are welcome!