Microsoft WebMatrix provides an easy way to get started with web development, and together with new Razor syntax for ASP.NET Web Pages it includes everything you need to get your web site up, running and integrated with many other sites and networks, in a short period of time. The WebMatrix helpers are designed to make your life easier when creating web sites. They provide you a simple and consistent way of performing common web development tasks that otherwise would require a great deal of custom coding. With a few lines of code you should be able to secure your web site using membership, store information in Windows Azure Storage, integrate your site with Facebook, among others things.
The PayPal helper for WebMatrix
allows you to integrate PayPal payments within your WebMatrix website or e-commerce application. With a few lines of code, you’ll enable your Web site customers to click on a payment button to pay for their purchases with their PayPal accounts.
The helper supports both the PayPal Button Manager API
and the Adaptive Payments API
. Using the Button Manager API you will be able to create (and manage) PayPal buttons like Add To Cart or Buy Now, that will let your customers purchase single or multiple items, among other things. With the Adaptive Payments API you can process from your WebMatrix web site PayPal transactions, in both simple and complex scenarios. You can build Web applications that handle payments, preapprovals for payments, and refunds.
Get Started in 60 seconds
- Download the PayPal Helper library (PayPal.dll)
- Create a new website or template in WebMatrix
- Create a bin folder off the root
- Copy and paste the PayPal library into the bin folder
- Download the Documentation for instructions on using the helper
- You're done, start using PayPal for payments!
Documentation and Samples
Documentation is available as a separate download available in the Downloads section.
Optionally, you can download a sample WebMatrix web site based on the Bakery Template, where you can see how to use the PayPal helper to capture payments for simple and chained payment scenarios. To download and run it with Microsoft WebMatrix, follow these steps:
- Download the sample site from the Downloads section. Extract the contents and open the folder in WebMatrix.
- Configure your PayPal API credentials in the _AppStart.cshtml page (to learn how to create testing PayPal accounts for the PayPal sandbox see the documentation in the Downlads section).
- Specify the receiver email in the OrderSimpleSuccess.cshtml page.
- Specify the emails of the primary and secondary receivers in OrderChainedSuccess.cshtml page.
- Run the sample!
Other Useful Resources