Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

degica/spree_komoju

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f5e3ed3 · Jul 10, 2019
Jan 12, 2017
Dec 9, 2015
Feb 23, 2016
Dec 12, 2015
Feb 22, 2017
Feb 22, 2017
Mar 31, 2015
Mar 31, 2015
Dec 2, 2015
Apr 7, 2015
Mar 31, 2015
Jul 10, 2019
Mar 31, 2015
Feb 27, 2017

Repository files navigation

THIS GEM IS DEPRECATED

This gem is no longer maintained by Degica. Please consult the Komoju Docs for other ways of integrating your e-commerce site with Komoju.

SpreeKomoju

SpreeKomoju provides a comprehensive integration for all Komoju payment methods with a single gem, including Credit Card, Konbini, PayEasy, and Bank Transfer.

Installation

Add spree_komoju to your Gemfile:

gem 'spree_komoju'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_komoju:install

Webhooks

You will need to setup a webhook to complete non credit card payments options. This is because payment options like Konbini, Bank Transfer, etc. are completed offline.

Adding spree_komoju will expose a new route http://localhost:3000/komoju/callback which expects a payment.captured webhook. You can configure a secret token for your callback endpoint using the following configuration code:

# config/initializers/spree_komoju.rb
SpreeKomoju.komoju_webhook_secret_token = 'MY WEBHOOK SECRET'

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. 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 'spree_komoju/factories'

Copyright (c) 2015 Degica, released under the New BSD License