Skip to content

Provide gift certificate functionality to Spree applications redeemable as store credit.

License

Notifications You must be signed in to change notification settings

rabbitcart/spree_gift_certificate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpreeGiftCertificate

This gem allows purchasing of gift certificates for Spree ecommerce stores. The gift certificates are redeemed as store credit, so there is a dependency on the spree_store_credit gem. The payment method for gift certificates differs from other gift card gems (like spree_gift_card or spree_vouchers) in that it has its own checkout flow because it seemed incredibly unnecessary to me to try to shoehorn a gift certificate into a Spree::Product when it's not really a product, but a transfer of value, and thus isn't subject to things like shipping, addresses, etc. That is, it being entirely virtual, it didn't make sense to deal with all of the overhead that comes with dealing with physical products. As such, it only integrates with Stripe checkout right now.

Installation

Add spree_gift_certificate to your Gemfile:

gem 'spree_gift_certificate'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_gift_certificate:install

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_gift_certificate/factories'

Copyright (c) 2014 Lucas Eggers, released under the New BSD License

About

Provide gift certificate functionality to Spree applications redeemable as store credit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 71.6%
  • HTML 25.8%
  • JavaScript 2.0%
  • CSS 0.6%