active_merchant-epsilon 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60b0318fc5b7ae333a3fb3a50e7566c9b30bdd50
4
- data.tar.gz: a3a6fa696e3c912e1b2f5791ef45f04ad466fd4d
3
+ metadata.gz: f9a429be038922b16d3c28570bf244fbb543edce
4
+ data.tar.gz: 84cf1331ca5881453b824a101619725128bf288c
5
5
  SHA512:
6
- metadata.gz: 486586c8622f27eacab5d2f052203510dc17dd1c6c561e6c4c7223f23d292db860f6fe3736e84d34867a5fa051afd5ba38f819d23b7cce7c0991589d9987aafd
7
- data.tar.gz: 678d4a7a4625d46eb84ccd6aaac32275da62ef2a140d12e2427c2ff870974acfdd0ac9004aebd83a0c7f61db78b6ab1db5b067afd5e73b9a8b938b7a7a3ec397
6
+ metadata.gz: c1c8eb54e48ade480101c7ff77dc0a7dc7dca11f9b513a38d238c9e733681b5832f9d1c13241666b064c30ebad6b28b598a98b3213e638fa55268f45f86a60dd
7
+ data.tar.gz: ca9c47b799024e41ef7970a4ac931d8110226a527fb8cad6e656b3011b883cb5e16058ba2bd2aa287becca68aae5108373885833e54703569d75f149f5b3ffe6
@@ -4,7 +4,8 @@ module ActiveMerchant #:nodoc:
4
4
 
5
5
  RESPONSE_KEYS = DEFAULT_RESPONSE_KEYS + [
6
6
  :convenience_store_limit_date,
7
- :convenience_store_payment_slip_url
7
+ :convenience_store_payment_slip_url,
8
+ :company_code,
8
9
  ]
9
10
 
10
11
  def purchase(amount, payment_method, detail = {})
@@ -69,6 +69,10 @@ module ActiveMerchant #:nodoc:
69
69
  uri_decode(@xml.xpath(ResponseXpath::CONVENIENCE_STORE_PAYMENT_SLIP_URL).to_s)
70
70
  end
71
71
 
72
+ def company_code
73
+ @xml.xpath(@xml.xpath(ResponseXpath::COMPANY_CODE).to_s)
74
+ end
75
+
72
76
  def uri_decode(string)
73
77
  URI.decode(string).encode(Encoding::UTF_8, Encoding::CP932)
74
78
  end
@@ -86,6 +90,7 @@ module ActiveMerchant #:nodoc:
86
90
  RECEIPT_DATE = '//Epsilon_result/result[@receipt_date][1]/@receipt_date'
87
91
  CONVENIENCE_STORE_LIMIT_DATE = '//Epsilon_result/result[@conveni_limit][1]/@conveni_limit'
88
92
  CONVENIENCE_STORE_PAYMENT_SLIP_URL = '//Epsilon_result/result[@haraikomi_url][1]/@haraikomi_url'
93
+ COMPANY_CODE = '//Epsilon_result/result[@kigyou_code][1]/@kigyou_code'
89
94
  end
90
95
 
91
96
  module ResultCode
@@ -1,5 +1,5 @@
1
1
  module ActiveMerchant
2
2
  module Epsilon
3
- VERSION = "0.5.5"
3
+ VERSION = "0.5.6"
4
4
  end
5
5
  end
@@ -40,7 +40,7 @@ http_interactions:
40
40
  />\r\n <result contract_code=\"[CONTRACT_CODE]\" />\r\n <result item_name=\"Greate%20Product\"
41
41
  />\r\n <result payment_code=\"3\" />\r\n <result user_mail_add=\"yamada-taro%40example.com\"
42
42
  />\r\n <result item_code=\"ITEM001\" />\r\n <result conveni_code=\"31\"
43
- />\r\n <result receipt_no=\"0005180\" />\r\n <result kigyou_code=\"\" />\r\n
43
+ />\r\n <result receipt_no=\"0005180\" />\r\n <result kigyou_code=\"10020\" />\r\n
44
44
  \ <result haraikomi_url=\"http%3A%2F%2Fbeta.epsilon.jp%2Fsample%2Fecon_sample.pdf\"
45
45
  />\r\n <result paid=\"0\" />\r\n <result receipt_date=\"2015-01-16%2008%3A30%3A31\"
46
46
  />\r\n <result conveni_limit=\"2015-01-26\" />\r\n <result conveni_time=\"\"
@@ -16,6 +16,7 @@ class RemoteEpsilonConvenienceStoreGatewayTest < MiniTest::Test
16
16
  assert_match /\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}/, response.params['receipt_date']
17
17
  assert_match /\d{4}\-\d{2}\-\d{2}/, response.params['convenience_store_limit_date']
18
18
  assert_match %r!\Ahttp://.+!, response.params['convenience_store_payment_slip_url']
19
+ assert_match /\d{5}/, response.params['company_code']
19
20
  end
20
21
  end
21
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_merchant-epsilon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenichi TAKAHASHI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-01 00:00:00.000000000 Z
11
+ date: 2016-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant