Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Paypal Website Payments Standard Extension for Spree, the open source shopping cart
Ruby Other

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
assets
db/migrate
lib
public/images
spec
CHANGELOG.markdown
README.markdown
Rakefile
pp_website_standard_extension.rb

README.markdown

Spree Pp Website Standard

Overrides the default Spree checkout process and uses offsite payment processing via PayPal's Website Payment Standard (WPS).

You'll want to test this using a paypal sandbox account first. Once you have a business account, you'll want to turn on Instant Payment Notification (IPN). This is how your application will be notified when a transaction is complete. Certain transactions aren't completed immediately. Because of this we use IPN for your application to get notified when the transaction is complete. IPN means that our application gets an incoming request from Paypal when the transaction goes through. To turn IPN on in your sandbox account, login, hit "profile", and go to Instant Payment Notification Preferences. You'll need to turn it on, and point it to your http://www.yourdomain.com/notify.

Regarding Taxes and shipping, we assumed you'd want to use Paypal's system for this, which can also be configured through the "profile" page. Taxes have been tested (sales tax), but not shipping, so you may want to give that a test run on the sandbox.

You may want to implement your own custom logic by adding state_machine hooks. Just add these hooks in your site extension (don't change the pp_website_standard extension.) Here's an example of how to add the hooks to your site extension.

fsm = Order.state_machines['state']  
fsm.after_transition :to => 'paid', :do => :after_payment
fsm.after_transition :to => 'pending_payment', :do => :after_pending  

Order.class_eval do  
  def after_payment
    # email user and tell them we received their payment
  end
  
  def after_pending
    # email user and thell them that we are processing their order, etc.
  end
end
  • TODO: User account creation (if necessary) after notify and associate order with a user
  • TODO: Make the paypal account stuff configurable via new preferences system
  • TODO: Taxes
  • TODO: Shipping
  • TODO: Refunds

Installation

script/extension install git://github.com/Gregg/spree-pp-website-standard.git  
Something went wrong with that request. Please try again.