14.4. Summary

In this chapter, we created a way for our users to subscribe to our services. We have designed our payment handling framework generically enough to enable us to use any payment processor. We also created a concrete implementation to illustrate the entire process using PayPal.

It is important to note that there are several alternatives to PayPal and some are just as easy to implement. I used PayPal to illustrate the concepts because of its ease of use, popularity, and my prior personal experience with it.

Implementing a payment processing service is an excellent candidate for mocking. We are able to mock a payment without actually creating a payment. This allows us to create simple tests that are not coupled to a specific web service or vendor.

Get ASP.NET MVC 1.0 Test Driven Development: Problem - Design - Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.