Permalink
Browse files

Updated ReadMe and gemspec

  • Loading branch information...
1 parent 9086741 commit 927e567bd0276b55e6e5c5589fb3b132aba8bd26 @BDQ BDQ committed Jan 25, 2011
Showing with 100 additions and 83 deletions.
  1. +87 −68 README.markdown
  2. +2 −0 app/controllers/paypal_express_callbacks_controller.rb
  3. +11 −15 spree_paypal_express.gemspec
View
@@ -10,108 +10,127 @@ This extension allows the store to use PayPal Express from two locations:
options on the payment stage of the standard checkout. The selected shipping address and shipping method / costs are automatically
sent to the PayPal review page (along with detailed order information).
- THIS FEATURE IS NOT YET COMPLETE
-
- 2. Cart Checkout - Presents the PayPal checkout button on the users Cart page and redirects the user to complete all shipping / addressing
- information on PaypPal's site. This also supports PayPal's Instant Update feature to retrieve shipping options live from Spree when the user
- selects / changes their shipping address on PayPal's site.
+
+ 2. Cart Checkout (THIS FEATURE IS NOT YET COMPLETE) - Presents the PayPal checkout button on the users Cart page and redirects the user to complete
+ all shipping / addressing information on PaypPal's site. This also supports PayPal's Instant Update feature to retrieve shipping options live from
+ Spree when the user selects / changes their shipping address on PayPal's site.
This extension follows the documented flow for a PayPal Express Checkout, where a user is forwarded to PayPal to allow them to login and review
the order (possibly select / change shipping address and method), then the user is redirected back to Spree to confirm the order. The user
MUST confirm the order on the Spree site before the payment is authorized / captured from PayPal (and the order is transitioned to the New state).
-USAGE (Checkout Payment)
-========================
+IPN & eCheck Support
+===================
+eCheck payments are now fully supported and PayPal's Instant Payment Notification service is also supported for receiving updates relating to eCheck payments only. To configure eCheck payments you'll need to:
-1. Setup your application
-
-2. Configure PPE
+###1. Install & Configure the extension (see Installation and Configuration sections below).
- You'll need to have a Paypal developer account (developer.paypal.com) and both buyer and seller test accounts.
-
- Tip: these are sandbox only, so use email addresses and passwords that are easy to remember, e.g. buyer@example.com and seller@example.com.
-
- Your sandbox credentials are available from the API Credentials link.
+###2. Configure your PayPal account to accept eCheck payments (under Profile on PayPal's website).
+
+###3. Set the IPN URL on your PayPal account (under Profile on PayPal's website) to:
+
+ https://www.yourstore.com/paypal_notify
+
+###4. Enable auto_capture within Spree (as eCheck payments are only supported for purchase and not authorize requests).
+
+ Spree::Config.set(:auto_capture => true)
+
+
+Installation
+============
+
+###1. Add the following line to your application's Gemfile
+
+ gem "spree_paypal_express", :git => "git://github.com/spree/spree_paypal_express.git"
+
+**Note:** The :git option is only required for the edge version, and can be removed to used the released gem.
+
+###2. Run bundler
+
+ bundle install
+
+###3. Copy assets / migrations
+
+ rake spree_paypal_express:install
+
+###4. Run migration
+
+ rake db:migrate
+
+
+Configuration
+=============
+###1. Before you begin
- Start your app
+You'll need to have a Paypal developer account (developer.paypal.com) and both buyer and seller test accounts.
- http://localhost:3000/admin/payment_methods/new
+**Tip:** these are sandbox only, so use email addresses and passwords that are easy to remember, e.g. buyer@example.com and seller@example.com.
- Name: Paypal Express
+Your sandbox credentials are available from the API Credentials link.
+
+###2. Setup the Payment Method
- Environment: Development
+Log in as an admin and add a new **Payment Method** (under Configuration), using following details:
+
+**Name:** Paypal Express
- Active: Yes
+**Environment:** Development (or what ever environment you prefer)
- Provider: BillingIntegration::PaypalExpress
+**Active:** Yes
- Create
+**Provider:** BillingIntegration::PaypalExpress
- Now add your credentials in the screen that follows
+Click **Create* , and now add your credentials in the screen that follows:
- review: unchecked [1]
+**Review:** unchecked [1]
- Signature: signature from your paypal seller test account
+**Signature:** API signature from your paypal seller test account
- Server: test
+**Server:** test (for Development or live for Production)
- Test Mode: checked
+**Test Mode:** checked (or unchecked for Production)
- Password: API Password from your paypal seller test account
+**Password:** API Password from your paypal seller test account
- Login: API Username from your paypal seller test account
+**Login:** API Username from your paypal seller test account (care to use the API Username and not the Test Account address)
- Update
+Click **Update**
-3. Test it
+Test Drive
+==========
- Add an item to cart
-
- Check out
-
- Address step: complete it using a valid US address. (Use Sean Schofield's from the railsdog site ;))
-
- Delivery step: pick anything
-
- Payment step: pick Paypal Express. If this does not show up as an option, repeat Step 3.
+While testing PayPal Express checkout locally make sure you're logged into your PayPal **developer** account in another browser window before attempting a PayPal payment, as you'll be redirected and forced to sign in to your developer account.
+
+1. Add an item to cart
- The Check out with PayPal button should appear.
+2. Check out
- Make sure you're logged into your paypal developer account in another browser window before clicking it, as you'll be redirected to your test account (same browser, new window or tab).
+3. Address step: complete it using a valid US address.
- On Paypal's site (your previously configured Seller test account), log in as the Buyer.
+4. Delivery step: pick anything
- If you set up a test buyer account as buyer@example.com previously, use this now.
+5. On the Payment Step, you should see a PayPal button. You can select it directly or just click "Continue"
- You should now see the paypal order details screen with a Pay Now button.
+6. You will get redirected to PayPals sandbox site, be sure to log in as a **Buyer** / **Personal** test account and not the account you use to configure the Payment Method with.
- Click Pay Now
+7. You should now see the paypal order details screen with a Pay Now button.
- You should now see the spree apps thank you for your order page
+8. Click Pay Now, and you should now be redirected back to Spree's order thank you page.
+9. Log into the Admin UI and review the Order and Payment details to confirm the successful checkout.
-4. Check the payment
- http://localhost:3000/admin/orders
-
- Edit your new order
-
- Go to the Payments section from the right hand menu
-
- Pending Payments should show Paypal Express with the options of Show and Capture
-
- Click Show and look over the info available
-
- The payment has status Pending with a successful authorization
-
- Back to Payments
-
- This time click Capture, then OK
-
- Click Show to see what's changed.
-
- You should now see two transactions, the previous Authorize transaction and a new Capture one with status Completed
-
+Running Specs
+=============
+
+###1. Create Test App
+
+ rake test_app
+
+###2. Run Specs
+
+ rake spec
+
NOTES
=====
@@ -2,6 +2,8 @@ class PaypalExpressCallbacksController < Spree::BaseController
include ActiveMerchant::Billing::Integrations
skip_before_filter :verify_authenticity_token
+ ssl_required
+
def notify
retrieve_details #need to retreive details first to ensure ActiveMerchant gets configured correctly.
@@ -1,21 +1,17 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'spree_paypal_express'
- s.version = '2.0.0'
- s.summary = 'Add gem summary here'
- #s.description = 'Add (optional) gem description here'
+ s.version = '1.0.0'
+ s.summary = 'Adds PayPal Express as a Payment Method to Spree store'
+ s.homepage = 'http://www.spreecommerce.com'
+ s.author = 'Rails Dog'
+ s.email = 'gems@railsdog.com'
s.required_ruby_version = '>= 1.8.7'
- # s.author = 'David Heinemeier Hansson'
- # s.email = 'david@loudthinking.com'
- # s.homepage = 'http://www.rubyonrails.org'
- # s.rubyforge_project = 'actionmailer'
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.require_paths = ["lib"]
+ s.has_rdoc = false
- s.files = Dir['CHANGELOG', 'README.md', 'LICENSE', 'lib/**/*', 'app/**/*']
- s.require_path = 'lib'
- s.requirements << 'none'
-
- s.has_rdoc = true
-
- s.add_dependency('spree_core', '>= 0.30.1')
-end
+ s.add_dependency('spree_core', '>=0.40.3')
+end

0 comments on commit 927e567

Please sign in to comment.