SolidusPaybright

Build Status

This extension provides the Paybright payment option for your Solidus storefront

Installation

Add solidus_paybright to your Gemfile:

gem 'solidus_paybright'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g solidus_paybright:install

Configuration

Configure the required credentials using static preferences, for example:

Spree.config do |config|
  config.static_model_preferences.add(
    Spree::PaymentMethod::Paybright,
    "paybright_credentials",
    api_key: ENV["PAYBRIGHT_API_KEY"],
    api_token: ENV["PAYBRIGHT_API_TOKEN"],
    test_mode: true,
    shop_country_code: "CA",
    shop_name: "My shop",
  )
end

Also make sure to set the default_url_options values for the Solidus engine, on all the environments. This is required to generate absolute URLs:

Spree::Core::Engine.routes.default_url_options = {
  host: "example.com",
  protocol: "https"
}

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, and Rubocop static code analysis. 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 'solidus_paybright/factories'

Copyright (c) 2017 Stembolt, released under the New BSD License