Home arrow Ruby-on-Rails arrow Page 3 - Online Order Processing: Using PayPal
RUBY-ON-RAILS

Online Order Processing: Using PayPal


In this third part of a five-part series on building the checkout and order processing components of an ecommerce website with Ruby-on-Rails, we'll focus on integrating PayPal into the application's capabilities. This article is excerpted from chapter nine of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).

Author Info:
By: Apress Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
July 15, 2010
TABLE OF CONTENTS:
  1. · Online Order Processing: Using PayPal
  2. · Creating a Dummy Bank Account and Credit Card
  3. · Creating API Credentials
  4. · Setting Up PayPal Transactions

print this article
SEARCH DEVARTICLES

Online Order Processing: Using PayPal - Creating API Credentials
(Page 3 of 4 )

Next, we’ll create the credentials that Active Merchant needs when communicating with PayPal. Follow these steps:

  1. From the business account display (Figure 9-7), click the Profile tab. Then click Request API Credentials. 
     
  2. On the next page, select API SSL Client-Side Certificate, agree to the terms by selecting the appropriate option, and click the Submit button. 
     
  3. On the following page, you should see the API username and API password, as shown in Figure 9-8. Click the Download Certificate button. This will download a file (cert_key_pem.txt) containing the private key and the certificate, in the following format:

    -----BEGIN RSA PRIVATE KEY-----
    ...
    -----END RSA PRIVATE KEY-----
    -----BEGIN CERTIFICATE-----
    ...
    -----END CERTIFICATE-----



    Figure 9-8.  The download or Remove API Certificate page
  4. Select and copy the private key, including the start and end tags, and save it inconfig/paypal/sandbox.key.  
  5. Select and copy the certificate and save it inconfig/paypal/sandbox.crt.  
  6. Download one of the PayPal Software Development Kits (SDKs), such as the PHP SDK, fromhttp://developer.paypal.com. Then copy the server certificate (api_cert_chain.crt) toconfig/paypal/api_cert_chain.crt

This completes the PayPal signup and account configuration process. Now we’re ready to use Active Merchant and the PayPal account.


blog comments powered by Disqus
RUBY-ON-RAILS ARTICLES

- Ruby-on-Rails Faces Second Security Flaw in ...
- Ruby 2.0 Prepped for February 2013 Release
- Why LinkedIn Switched from Ruby on Rails
- Adding Style with Action Pack
- Handling HTML in Templates with Action Pack
- Filters, Controllers and Helpers in Action P...
- Action Pack and Controller Filters
- Action Pack Categories and Events
- Logging Out, Events and Templates with Actio...
- Action Pack Sessions and Architecture
- More on Action Pack Partial Templates
- Action Pack Partial Templates
- Displaying Error Messages with the Action Pa...
- Action Pack Request Parameters
- Creating an Action Pack Registration Form

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials