active_merchant-epsilon 0.12.0 → 0.13.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
  SHA256:
3
- metadata.gz: ca6ef67e1e4a642d9396edeb901120bec894ec43254821f6d7a5aa793dc18550
4
- data.tar.gz: 80a96286669e5f389c0806f7f35b3ea72fc37e437116d3a0620ac7e919544bbb
3
+ metadata.gz: c43c4d71a9719ec55be94aa1f66222eac8bead4b16db6a31611269aee844afcf
4
+ data.tar.gz: 6bb0b39a5598d3cb8718037df3fd00ff42a53cded61bc98529a4ad00aa9f4259
5
5
  SHA512:
6
- metadata.gz: cfcca339864f03676b21d1404d3f034c9e374185b7ea63b00ef41cfce0d3a050284eff21d826ac13060d7e190bfa061caf79f37e6b91396e7ec92d35e242ca76
7
- data.tar.gz: 9f34fb7ae71ac00e59840b9c6608a0dd934d46c9c8e771f48a9cdd700ac63cddd4ce901d31f3dd5d107492698d6eea17f757262db01d09512d20a698200e5785
6
+ metadata.gz: 164e39f8d0e343f0172e5371fc99d1c46d8d04346c8e0c135ac7478cbe507be36d6182913df016e510eb75073559ad9d59b042718f3c26fa5fb6a37c20e940f6
7
+ data.tar.gz: 1b5e435a9342d69b78e032d466fb3f930805912bb2c4ac24eb7e7d9ce2bcf652a5b15f050ab38ad3526929cda5cc00ac32d0f540828226d97a0ca69ab986f845
@@ -0,0 +1,21 @@
1
+ name: test
2
+ on: push
3
+
4
+ jobs:
5
+ test-all:
6
+ runs-on: ubuntu-latest
7
+
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby-version: [2.4, 2.5, 2.6, 2.7, 3.0]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+
16
+ - uses: ruby/setup-ruby@v1.63.0
17
+ with:
18
+ ruby-version: ${{ matrix.ruby-version }}
19
+ bundler-cache: true
20
+
21
+ - run: bundle exec rake test:unit test:remote
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ### 0.13.0
4
+
5
+ - [Add `last-update` to OrderResponse](https://github.com/pepabo/active_merchant-epsilon/pull/118)
6
+
3
7
  ### 0.12.0
4
8
 
5
9
  - [Add Parameter `delivery_info_required` to purchase method for Epsilon Link Payment](https://github.com/pepabo/active_merchant-epsilon/pull/116)
@@ -177,6 +177,7 @@ module ActiveMerchant #:nodoc:
177
177
  response_keys = [
178
178
  :transaction_code,
179
179
  :state,
180
+ :last_update,
180
181
  :payment_code,
181
182
  :item_price,
182
183
  :amount,
@@ -107,6 +107,10 @@ module ActiveMerchant #:nodoc:
107
107
  @xml.xpath(ResponseXpath::STATE).to_s
108
108
  end
109
109
 
110
+ def last_update
111
+ @xml.xpath(ResponseXpath::LAST_UPDATE).to_s
112
+ end
113
+
110
114
  def payment_code
111
115
  @xml.xpath(ResponseXpath::PAYMENT_CODE).to_s
112
116
  end
@@ -153,6 +157,7 @@ module ActiveMerchant #:nodoc:
153
157
  BRANCH_CODE = '//Epsilon_result/result[@branch_code][1]/@branch_code'
154
158
  BRANCH_NAME = '//Epsilon_result/result[@branch_name][1]/@branch_name'
155
159
  STATE = '//Epsilon_result/result[@state]/@state'
160
+ LAST_UPDATE = '//Epsilon_result/result[@last_update]/@last_update'
156
161
  ITEM_PRICE = '//Epsilon_result/result[@item_price]/@item_price'
157
162
  PAYMENT_CODE = '//Epsilon_result/result[@payment_code]/@payment_code'
158
163
  AMOUNT = '//Epsilon_result/result[@amount]/@amount'
@@ -1,5 +1,5 @@
1
1
  module ActiveMerchant
2
2
  module Epsilon
3
- VERSION = "0.12.0"
3
+ VERSION = "0.13.0"
4
4
  end
5
5
  end
@@ -12,11 +12,11 @@ class RemoteEpsilonConvenienceStoreGatewayTest < MiniTest::Test
12
12
  response = gateway.purchase(10000, valid_convenience_store, purchase_detail)
13
13
 
14
14
  assert_equal true, response.success?
15
- assert_match /\d{7}/, response.params['receipt_number']
16
- assert_match /\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}/, response.params['receipt_date']
17
- assert_match /\d{4}\-\d{2}\-\d{2}/, response.params['convenience_store_limit_date']
18
- assert_match %r!\Ahttp://.+!, response.params['convenience_store_payment_slip_url']
19
- assert_match /\d{5}/, response.params['company_code']
15
+ assert_match(/\d{7}/, response.params['receipt_number'])
16
+ assert_match(/\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}/, response.params['receipt_date'])
17
+ assert_match(/\d{4}\-\d{2}\-\d{2}/, response.params['convenience_store_limit_date'])
18
+ assert_match(%r!\Ahttp://.+!, response.params['convenience_store_payment_slip_url'])
19
+ assert_match(/\d{5}/, response.params['company_code'])
20
20
  end
21
21
  end
22
22
 
@@ -62,12 +62,15 @@ class RemoteEpsilonGatewayTest < MiniTest::Test
62
62
 
63
63
  assert_equal true, response.success?
64
64
  assert_equal true, response.params['three_d_secure']
65
- assert_match /\Ahttps?/, response.params['acs_url']
65
+ assert_match(/\Ahttps?/, response.params['acs_url'])
66
66
  refute_empty response.params['pa_req']
67
67
  end
68
68
 
69
69
  VCR.use_cassette(:autheticate_three_d_secure_card_successful) do
70
- response = gateway.authenticate(valid_three_d_secure_pa_res)
70
+ response = gateway.authenticate(
71
+ order_number: purchase_detail[:order_number],
72
+ three_d_secure_pa_res: valid_three_d_secure_pa_res
73
+ )
71
74
  assert_equal true, response.success?
72
75
  end
73
76
  end
@@ -293,6 +296,7 @@ class RemoteEpsilonGatewayTest < MiniTest::Test
293
296
  assert_equal true, response.success?
294
297
 
295
298
  assert_equal true, !response.params['state'].empty?
299
+ assert_equal true, !response.params['last_update'].empty?
296
300
  assert_equal true, !response.params['payment_code'].empty?
297
301
  assert_equal true, !response.params['item_price'].empty?
298
302
  end
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.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenichi TAKAHASHI
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-07 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -158,8 +158,8 @@ extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
160
  - ".env.sample"
161
+ - ".github/workflows/test.yml"
161
162
  - ".gitignore"
162
- - ".travis.yml"
163
163
  - CHANGELOG.md
164
164
  - Gemfile
165
165
  - LICENSE.txt
@@ -228,7 +228,6 @@ files:
228
228
  - test/fixtures/vcr_cassettes/void_fail.yml
229
229
  - test/fixtures/vcr_cassettes/void_successful.yml
230
230
  - test/remote/gateways/remote_epsilon_convenience_store_test.rb
231
- - test/remote/gateways/remote_epsilon_gmo_after_test.rb
232
231
  - test/remote/gateways/remote_epsilon_gmo_id_test.rb
233
232
  - test/remote/gateways/remote_epsilon_link_payment_test.rb
234
233
  - test/remote/gateways/remote_epsilon_test.rb
@@ -240,7 +239,7 @@ homepage: http://github.com/pepabo/active_merchant-epsilon
240
239
  licenses:
241
240
  - MIT
242
241
  metadata: {}
243
- post_install_message:
242
+ post_install_message:
244
243
  rdoc_options: []
245
244
  require_paths:
246
245
  - lib
@@ -255,8 +254,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
254
  - !ruby/object:Gem::Version
256
255
  version: '0'
257
256
  requirements: []
258
- rubygems_version: 3.0.3
259
- signing_key:
257
+ rubygems_version: 3.2.3
258
+ signing_key:
260
259
  specification_version: 4
261
260
  summary: Epsilon integration for ActiveMerchant.
262
261
  test_files:
@@ -310,7 +309,6 @@ test_files:
310
309
  - test/fixtures/vcr_cassettes/void_fail.yml
311
310
  - test/fixtures/vcr_cassettes/void_successful.yml
312
311
  - test/remote/gateways/remote_epsilon_convenience_store_test.rb
313
- - test/remote/gateways/remote_epsilon_gmo_after_test.rb
314
312
  - test/remote/gateways/remote_epsilon_gmo_id_test.rb
315
313
  - test/remote/gateways/remote_epsilon_link_payment_test.rb
316
314
  - test/remote/gateways/remote_epsilon_test.rb
@@ -1,12 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.4.5
4
- - 2.5.3
5
-
6
- script: bundle exec rake test:remote
7
- script: bundle exec rake test:unit
8
-
9
- notifications:
10
- slack:
11
- rooms:
12
- secure: rYtA4FBXqKHYv+v7xA6FfkcsDXRexWyMj9WMG2YK7bgZoNG2N7q461Dr/lCU0JTuRGsxDIs5jHK+QFFZNW/h+SbhQfiew++W8FgoIbP/z7HuEW50SXLcigGb02YmQm+ybbh5Dw1QGmcTOVItXJfuFmrDm1fq0qO0HC0543Yn4BzrSdWnEWQSaK7JMBRc9aYVPc0VlWG8pGRLtW0PDb6D32MvEI4jPrnh2NPDomPT9YutmMC+jNBPKr72m68g3v2GogbX4irZ6Kp5UUUZtaDbt9yLRfNL/3bsVGVrS1S2qCO4If5xTtE7lvV807a8QuQIj4Y9YqRO7K+/wUrz4Yb2ycF7agAkjN+w2WNEjgsKeFk50R4BWKpSy6y2N2RIl7rdHVEnU1T9I6LH0do5hMGqhgDYgppb2F7YFL9buUqag6gKAX3BHIV16ADJOFBT2Hh2m6x9f5TRb5ZR4LDJBQaflMhj0pwmIcC5Bhr3yi45r/4xiJ1IQaspXCzvfUMXARgWqqSxxveVQ07obiFeFCZ2YJEyv9fYLxT39+9koP48iKHTzbtFi4ay37PfMaztiXM0dqTwdjbJ95krc8AoNuTDphgwLLW2Zxxz2+tFQiLcj1tebUZa1hBsil1EVI7P/8PjAjGowckCnEAnFBZS5oFrgE2qzuwIGbLRYeeoRev0tks=
@@ -1,30 +0,0 @@
1
- require 'test_helper'
2
-
3
- class RemoteEpsilonGmoAfterGatewayTest < MiniTest::Test
4
- include SamplePaymentMethods
5
-
6
- def gateway
7
- @gateway ||= ActiveMerchant::Billing::EpsilonGmoAfterGateway.new
8
- end
9
-
10
- def test_gmo_after_purchase_successfull
11
- VCR.use_cassette(:gmo_after_purchase_successful) do
12
- response = gateway.purchase(10000, gmo_after_purchase_detail)
13
-
14
- assert_equal true, response.success?
15
- assert_equal true, !response.params['redirect'].empty?
16
- end
17
- end
18
-
19
- def test_gmo_after_purchase_fail
20
- invalid_purchase_detail = gmo_after_purchase_detail
21
- invalid_purchase_detail[:user_id] = ''
22
-
23
- VCR.use_cassette(:gmo_after_purchase_fail) do
24
- response = gateway.purchase(10000, invalid_purchase_detail)
25
-
26
- assert_equal false, response.success?
27
- assert_equal true, response.params["error_detail"].valid_encoding?
28
- end
29
- end
30
- end