spree_komoju 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8277f28aba8fd6a9b4695801999896455a525c6e
|
|
4
|
+
data.tar.gz: b89d526c3b474a313f14e707f04c90980269f0fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5cf787bba32c591371d84d06c72221524fff154ac6511b221802dd1b623a270b1cf1aa1ac01cceb0037aa356712720c2c2f3e789cf9b1a7fb44d71b246c7431
|
|
7
|
+
data.tar.gz: f5bbce97711ef0df28d095502f46d3865cf1d71a7a9deeb021134426d88c682d47c068bafd70bf8558eb677b1da0abcd7c45a625d6fe45b6d742eb7a36b05546
|
|
@@ -7,7 +7,7 @@ module Spree
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def options
|
|
10
|
-
super.merge(login: preferred_api_key, test: preferred_test_mode)
|
|
10
|
+
super.merge(login: preferred_api_key, test: preferred_test_mode, locale: locale)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def auto_capture?
|
|
@@ -43,5 +43,11 @@ module Spree
|
|
|
43
43
|
def payment_source_class
|
|
44
44
|
"Spree::#{gateway_type.camelcase}".constantize
|
|
45
45
|
end
|
|
46
|
+
|
|
47
|
+
private
|
|
48
|
+
|
|
49
|
+
def locale
|
|
50
|
+
I18n.locale == :ja ? "ja" : "en"
|
|
51
|
+
end
|
|
46
52
|
end
|
|
47
53
|
end
|
|
@@ -32,6 +32,7 @@ module ActiveMerchant #:nodoc:
|
|
|
32
32
|
def purchase(money, payment, options = {})
|
|
33
33
|
post = {}
|
|
34
34
|
post[:amount] = amount(money)
|
|
35
|
+
post[:locale] = @options[:locale] if @options[:locale]
|
|
35
36
|
post[:description] = options[:description]
|
|
36
37
|
add_payment_details(post, payment, options)
|
|
37
38
|
post[:currency] = options[:currency] || default_currency
|
|
@@ -13,7 +13,7 @@ describe Spree::KomojuGateway, type: :model do
|
|
|
13
13
|
allow(subject).to receive(:preferred_api_key) { api_key }
|
|
14
14
|
allow(subject).to receive(:preferred_test) { true }
|
|
15
15
|
|
|
16
|
-
expect(subject.options).to eq ({ api_key: nil, test: true, server: "test", test_mode: true, login: api_key })
|
|
16
|
+
expect(subject.options).to eq ({ api_key: nil, test: true, server: "test", test_mode: true, login: api_key, locale: "en" })
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
data/spree_komoju.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Gem::Specification.new do |s|
|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
|
4
4
|
s.name = 'spree_komoju'
|
|
5
|
-
s.version = '0.0
|
|
5
|
+
s.version = '0.1.0'
|
|
6
6
|
s.summary = 'Spree Komoju Payment Gateway'
|
|
7
7
|
s.description = 'Spree Payment gateway for Komoju payment gateway'
|
|
8
8
|
s.authors = ['Masahiro Saito', 'Chris Salzberg', 'Richard Ramsden']
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_komoju
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Masahiro Saito
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2016-
|
|
13
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: spree_core
|
|
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
277
277
|
requirements:
|
|
278
278
|
- none
|
|
279
279
|
rubyforge_project:
|
|
280
|
-
rubygems_version: 2.
|
|
280
|
+
rubygems_version: 2.5.1
|
|
281
281
|
signing_key:
|
|
282
282
|
specification_version: 4
|
|
283
283
|
summary: Spree Komoju Payment Gateway
|