billingsystem-remote
DESCRIPTION:
Hands a specific amount of control to Billingsystem so that it can operate upon the data of the apps that rely on Billingsystem for recurring billing.
FEATURES/PROBLEMS:
- Creates a new user whenever a Customer creates a new Subscription for speedy delivery.
SYNOPSIS:
This gem adds a controller called Frontend::UsersController to your app. The remote app (in this case, Billingsystem) must send an API using HTTP Basic Auth credentials and the preferred username and password.
Step 1. Create HTTP Basic Auth credentials
$ script/console # open up a Rails console
>> ActiveSupport::SecureRandom.hex
=> "1abc927b5b4f35f517983599ccc86c64" # the hash will be different on your machine, obviously.
Step 2. Create a new file called config/initializers/billingsystem-remote.rb:
module BillingSystem module Remote class Config # username and password for HTTP Basic auth. USERNAME = “1abc927b5b4f35f517983599ccc86c64” PASSWORD = “e9510b9e7c47275376d1efd4fd75f680” end end end
Step 3. Add the following route to your config/routes.rb:
# begin billingsystem-remote
map.namespace :frontend do |frontend|
frontend.resources :users
end
# end billingsystem-remote
REQUIREMENTS:
- Rails, this gem is tested on 2.3.14.
- Authlogic, this gem works with an 'email' as login.
INSTALL:
$ sudo gem install billingsystem-remote
TESTING:
Check out the billingsystem-remote-project page for the full test suite.
LICENSE:
(The MIT License)
Copyright © 2012 Commander Johnson <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.