vinsol-spree-contrib / spree-afterpay

Unofficial Integration of AfterPay Payment gateway for spree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spree-afterpay

Unofficial Integration of AfterPay Payment gateway for spree

Installation

Add these lines to your application's Gemfile:

gem 'spree_afterpay', github: 'vinsol-spree-contrib/spree-afterpay', branch: 'master'
gem 'afterpay-ruby', github: 'rajneeshsharma9/afterpay-ruby', branch: 'master'

And then execute:

$ bundle

Usage

You need to configure Afterpay using your Merchant ID and secret.

For Rails, put this in your initializer.

Afterpay.configure do |config|
  config.app_id = <app_id>
  config.secret = <secret>

  # Sets the environment for Afterpay
  # defaults to sandbox
  # config.env = "sandbox" # "live"

  # Sets the user agent header for Afterpay requests
  # Refer https://docs.afterpay.com/au-online-api-v1.html#configuration
  # config.user_agent_header = {pluginOrModuleOrClientLibrary}/{pluginVersion} ({platform}/{platformVersion}; Merchant/{merchantId}) { merchantUrl }
  # Example
  # config.user_agent_header = "Afterpay Module / 1.0.0 (rails/ 5.1.2; Merchant/#{ merchant_id }) #{ merchant_website_url }"

end

About

Unofficial Integration of AfterPay Payment gateway for spree

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


Languages

Language:Ruby 81.8%Language:HTML 12.7%Language:JavaScript 4.6%Language:CSS 0.9%