######THIS GEM IS NOT READY FOR PRODUCTION USE.
This extension provides the feature for a spree store to allow user to club payment methods to pay for the order.
Easily configurable from the admin end where one can select which payment methods should be allowed for clubbing and their priorities which can be used while creating payments and displaying them to the user.
Add spree-split-payments to your
Bundle your dependencies and run the installation generator:
bundle exec rails g spree_split_payments:install
The extension needs a way to find out the maximum amount that can be made via a payment method. To do so it sends a message to the user object as:
# for example : for Spree::PaymentMethod::LoyaltyPoints it calls for
# on current_user
So you can either
- Alias an exising method like
alias_method :loyalty_points_for_partial_payments, :loyalty_points_equivalent_currency
# where loyalty_points_equivalent_currency is the method provided by
# Spree::PaymentMethod::LoyaltyPoints extension.
- Define a method under user class. For example for Spree::PaymentMethod::LoyaltyPoints)
# logic goes here
Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.
bundle exec rake test_app
bundle exec rspec spec
When testing your applications integration with this extension you may use it's factories.
Simply add this require statement to your
- Fork the repo.
- Clone your repo.
bundle exec rake test_appto create the test application in
- Make your changes.
- Ensure specs pass by running
bundle exec rspec spec.
- Submit your pull request.
Copyright (c) 2014 vinsol.com, released under the New MIT License