GithubHelp home page GithubHelp logo

vinsol-spree-contrib / spree_bank_transfer Goto Github PK

View Code? Open in Web Editor NEW
19.0 31.0 83.0 167 KB

Allows admin to provide bank transfer payment method to its users in Spree

License: BSD 3-Clause "New" or "Revised" License

Ruby 75.42% CSS 1.02% HTML 23.56%

spree_bank_transfer's Introduction

Spree Bank Transfer Code Climate Build Status

Spree Bank Transfer is an extension which allows adding a new payment method “Bank Transfer” to existing spree e-commerce store. With the help of this payment method customer can place an order online and pay by transferring money directly into merchant’s Bank account. This extension allow merchants to provide their bank account(s) details which in turn is used by customers to order and pay using this method. This extension also facilitate admin to Activate/Deactivate attached Bank accounts. Admin can also filter orders on the basis of the available payment transaction reference numbers with this extension.

Installation

Add spree_bank_transfer to your Gemfile:

gem 'spree-bank-transfer', require: 'spree_bank_transfer'

For older versions of Spree.

# Spree 2.1.0
gem 'spree-bank-transfer', '2.1.0', require: 'spree_bank_transfer'
# Spree 2.0.x
gem 'spree-bank-transfer', '2.0.5', require: 'spree_bank_transfer'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_bank_transfer:install

How it works:

  • To add Bank Transfer feature, Admin needs to add “Bank Transfer” payment method:

    Configuration -> Payment Methods -> New payment Method

    You need to select “Spree::PaymentMethod::BankTransfer” as the Provider

    ![Bank Transfer - Payment Method](https://s3.amazonaws.com/gems-and-extensions-screenshots/Bank+Transfer/Bank-Transfer-Payment-Method.png)
    
  • Add bank account information from “Banks” link on “Configuration” page.

    • Provide Name of the bank

    • Provide Account number

    • Select “Status” check box

    • Provide “Additional Details”, like “Branch Name”, “Bank code” etc.

      Listing Banks

      Bank Account will be visible on Checkout Page only if it is Active.

  • After adding the payment method and bank details (as stated above), this payment method will be visible on Checkout page while making payment against an order.

  • Active merchant accounts number will also be visible on Checkout page under this method.

    ![Checkout](https://s3.amazonaws.com/gems-and-extensions-screenshots/Bank+Transfer/Checkout.png)
    

“How Bank Transfer Works” link will open a pop-up window. It will list all steps to complete order with this method.

  • Customer will be able to order by completing the order with this method and can transfer money equal to total order
    value directly into any one of the merchant’s bank account.

  • After customer deposits money into merchant’s account, a payment transaction reference number is provided by the bank. Customer needs to add this payment reference details with the respective order by going to order detail page.

    My Account -> Order no. -> Add details (Payment information column) -> Submit

    Payment Info

  • Admin will be able to see the payment reference details, added by customer, on the Order detail page.

     Orders -> Order no. ->  Payments
     
     ![Payments](https://s3.amazonaws.com/gems-and-extensions-screenshots/Bank+Transfer/admin-payment.png)
    
  • The order will not be marked Completed until admin captures the payment as mentioned in step above.

    Note: Admin needs to manually verify the transaction details from his bank account before capturing the payment
    
  • Admin can filter orders which has payment transaction reference number by clicking the check box “only show orders with bank transfer payment reference number” on “Orders” page.

    ![Orders](https://s3.amazonaws.com/gems-and-extensions-screenshots/Bank+Transfer/order-filter.png)
    

Contributing

  1. Fork the repo.
  2. Clone your repo.
  3. Run bundle install.
  4. Run bundle exec rake test_app to create the test application in spec/test_app.
  5. Make your changes.
  6. Ensure specs pass by running bundle exec rspec spec.
  7. Submit your pull request.

Testing

Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.

bundle
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 spec_helper:

require 'spree_bank_transfer/factories'

Credits

vinsol.com: Ruby on Rails, iOS and Android developers

Copyright (c) 2014 vinsol.com, released under the New MIT License

spree_bank_transfer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_bank_transfer's Issues

[3-0-stable] Error loading Admin Bank Index Page

After creating New Bank, redirection to /admin/banks failed with below error

Error Trace

ArgumentError - wrong number of arguments (given 0, expected 1..2):
   () Users/pikender/.rvm/gems/ruby-2.3.1@spree/bundler/gems/spree-049bbf1e2282/backend/app/helpers/spree/admin/navigation_helper.rb:130:in `link_to_edit'
   () Users/pikender/.rvm/gems/ruby-2.3.1@spree/bundler/gems/spree_bank_transfer-bf6d08edb8c8/app/views/spree/admin/banks/index.html.erb:37:in `block in _b9dd48c021124a9c2f49ab0e6f861950'
  activerecord (4.2.7.1) lib/active_record/relation/delegation.rb:46:in `each'
  activerecord (4.2.7.1) lib/active_record/relation/delegation.rb:46:in `each'
   () Users/pikender/.rvm/gems/ruby-2.3.1@spree/bundler/gems/spree_bank_transfer-bf6d08edb8c8/app/views/spree/admin/banks/index.html.erb:23:in `_b9dd48c021124a9c2f49ab0e6f861950'
  actionview (4.2.7.1) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.7.1) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.7.1) lib/action_view/template.rb:333:in `instrument'
  actionview (4.2.7.1) lib/action_view/template.rb:143:in `render'
  deface (1.0.2) lib/deface/action_view_extensions.rb:41:in `render'
  actionview (4.2.7.1) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
  actionview (4.2.7.1) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.7.1) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.7.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.7.1) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.7.1) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  actionview (4.2.7.1) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
  actionview (4.2.7.1) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
  actionview (4.2.7.1) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
  actionview (4.2.7.1) lib/action_view/renderer/template_renderer.rb:14:in `render'
  actionview (4.2.7.1) lib/action_view/renderer/renderer.rb:46:in `render_template'
  actionview (4.2.7.1) lib/action_view/renderer/renderer.rb:27:in `render'
  actionview (4.2.7.1) lib/action_view/rendering.rb:100:in `_render_template'
  actionpack (4.2.7.1) lib/action_controller/metal/streaming.rb:217:in `_render_template'
  actionview (4.2.7.1) lib/action_view/rendering.rb:83:in `render_to_body'
  actionpack (4.2.7.1) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
  actionpack (4.2.7.1) lib/action_controller/metal/renderers.rb:37:in `render_to_body'
  actionpack (4.2.7.1) lib/abstract_controller/rendering.rb:25:in `render'
  actionpack (4.2.7.1) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.2.7.1) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  activesupport (4.2.7.1) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /Users/pikender/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
  activesupport (4.2.7.1) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.2.7.1) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  actionpack (4.2.7.1) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
  activerecord (4.2.7.1) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.2.7.1) lib/action_controller/metal/instrumentation.rb:43:in `render'
  wicked_pdf (1.0.6) lib/wicked_pdf/pdf_helper.rb:22:in `render_with_wicked_pdf'
  remotipart (1.3.1) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart'
  actionpack (4.2.7.1) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (4.2.7.1) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (4.2.7.1) lib/abstract_controller/base.rb:198:in `process_action'
  actionpack (4.2.7.1) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.2.7.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:117:in `call'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.7.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.7.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.7.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  activesupport (4.2.7.1) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.7.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.7.1) lib/active_support/notifications.rb:164:in `instrument'
  actionpack (4.2.7.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.2.7.1) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.2.7.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.2.7.1) lib/abstract_controller/base.rb:137:in `process'
  actionview (4.2.7.1) lib/action_view/rendering.rb:30:in `process'
  actionpack (4.2.7.1) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.2.7.1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.2.7.1) lib/action_controller/metal.rb:237:in `block in action'
  actionpack (4.2.7.1) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
  actionpack (4.2.7.1) lib/action_dispatch/routing/route_set.rb:43:in `serve'
  actionpack (4.2.7.1) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.7.1) lib/action_dispatch/journey/router.rb:30:in `each'
  actionpack (4.2.7.1) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.7.1) lib/action_dispatch/routing/route_set.rb:817:in `call'
  railties (4.2.7.1) lib/rails/engine.rb:518:in `call'
  railties (4.2.7.1) lib/rails/railtie.rb:194:in `public_send'
  railties (4.2.7.1) lib/rails/railtie.rb:194:in `method_missing'
  actionpack (4.2.7.1) lib/action_dispatch/routing/mapper.rb:51:in `serve'
  actionpack (4.2.7.1) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.7.1) lib/action_dispatch/journey/router.rb:30:in `each'
  actionpack (4.2.7.1) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.7.1) lib/action_dispatch/routing/route_set.rb:817:in `call'
  omniauth (1.5.0) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.5.0) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.5.0) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.5.0) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.5.0) lib/omniauth/builder.rb:63:in `call'
  warden (1.2.7) lib/warden/manager.rb:36:in `block in call'
  warden (1.2.7) lib/warden/manager.rb:35:in `catch'
  warden (1.2.7) lib/warden/manager.rb:35:in `call'
  rack (1.6.5) lib/rack/etag.rb:24:in `call'
  rack (1.6.5) lib/rack/conditionalget.rb:25:in `call'
  rack (1.6.5) lib/rack/head.rb:13:in `call'
  remotipart (1.3.1) lib/remotipart/middleware.rb:32:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/flash.rb:260:in `call'
  rack (1.6.5) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.6.5) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  activerecord (4.2.7.1) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.2.7.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  activerecord (4.2.7.1) lib/active_record/migration.rb:377:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
  activesupport (4.2.7.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  better_errors (2.0.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.0.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.0.0) lib/better_errors/middleware.rb:57:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
  web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
  web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.7.1) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.7.1) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.7.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.7.1) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.7.1) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.7.1) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.6.5) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.5) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.7.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  rack (1.6.5) lib/rack/lock.rb:17:in `call'
  actionpack (4.2.7.1) lib/action_dispatch/middleware/static.rb:120:in `call'
  rack (1.6.5) lib/rack/sendfile.rb:113:in `call'
  railties (4.2.7.1) lib/rails/engine.rb:518:in `call'
  railties (4.2.7.1) lib/rails/application.rb:165:in `call'
  rack (1.6.5) lib/rack/lock.rb:17:in `call'
  rack (1.6.5) lib/rack/content_length.rb:15:in `call'
  rack (1.6.5) lib/rack/handler/webrick.rb:88:in `service'
  /Users/pikender/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
  /Users/pikender/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
  /Users/pikender/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
  logging (2.1.0) lib/logging/diagnostic_context.rb:450:in `block in create_with_logging_context'

spree 2.2

spree 2.2 not working due dependencies

4. Provide check box on Orders page on Admin

Provide check box to filter out the Orders with "Payment reference number" received but not captured" status.

On Orders detail page, Reference number should be visible in "Payment" section to make it appear to Admin.

Add Details dont work

After make the order
My Account -> Order no. -> Add details
The link Add details does nothing, no way to indicate the transfer information. Has this happened to some one? it may be by the translation into Spanish (es.yml)?
I am using Spree 2.3 an the latests spree_bank_transfer

[3-0-stable] Error opening payments page on Checkout

After creating Bank Transfer Payment Method, on Payment Checkout page, following error comes

NoMethodError - undefined method `each' for true:TrueClass:
  /Users/pikender/spree/marketing/payments/spree_bank_transfer/app/views/spree/checkout/payment/_banktransfer.html.erb:8:in `_36283e5729fdc650820141ad3802ac9e'
  actionview (4.2.7.1) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.7.1) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.7.1) lib/action_view/template.rb:333:in `instrument'
  actionview (4.2.7.1) lib/action_view/template.rb:143:in `render'
  deface (1.0.2) lib/deface/action_view_extensions.rb:41:in `render'

Optional Description to Customer

When the customer views the bank account details in the checkout screens then they should be presented with some extra instructions that will help them make that money transfer.

Add field "Additional Details" for every Bank Account.

Add "Additional Details" edit box while adding a Bank on Admin.

Show this field on frontend:
On "How Bank Transfer works" pop up.
On "Checkout" page after selecting "Bank Transfer" radio button.
This field should be visible in a separate column in the existing Bank Details table.

1. Show "How it works" link with "BankTransfer" payment method on checkout page

Create a static page with below mentioned information.

  1. Deposit order amount in one of the below mentioned Bank Accounts.
    Note: A payment reference number will be generated by the bank.
  2. Enter this payment reference number on Order's page by following steps:
    a) Select "My Account" from top right corner.
    b) Select "Order" link from drop down.
    c) Click on the Order number.
    d) Provide payment details and Submit.

Conflict with spree 3.1.1

Trying to bundle with latest gems from spree/spree

gem 'spree', '~> 3.1.0' gem 'spree_auth_devise', '~> 3.1.0' gem 'spree_gateway', '~> 3.1.0'

got

`Bundler could not find compatible versions for gem "spree_core":
In snapshot (Gemfile.lock):
spree_core (= 3.1.1)

In Gemfile:
spree-bank-transfer was resolved to 2.0.5, which depends on
spree_core (~> 2.0.3)`

2.1 support

Any plan for 2.1 support?

Thanks for your good work

Spree 3.0 support (request)

Hi, I need this awesome gem for my new spree 3.0 app.
Currently I am working from @redglory's 3-0 version of this gem and face a couple of issues. Such as not having the Banks submenu in admin/configurations and the javascript function to add Details in the Order#Show action doesn't work.

I would like to help but my knowledge of javascript is near sea-level. I can help with the rails/ruby part though.
Thanks

datepicker view

jquery-datepicker

excusme,

is it the datepicker view from the bank_transfer, or is it an error from my csss?
thx :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.