blockchyp 2.9.3 → 2.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +8 -1
- data/README.md +2605 -477
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +242 -3
- data/lib/blockchyp_client.rb +80 -0
- data/test/activate_terminal_test.rb +45 -0
- data/test/add_test_merchant_test.rb +56 -0
- data/test/batch_history_test.rb +10 -6
- data/test/boolean_prompt_test.rb +12 -6
- data/test/cancel_payment_link_test.rb +72 -0
- data/test/capture_signature_test.rb +12 -6
- data/test/deactivate_terminal_test.rb +42 -0
- data/test/delete_branding_asset_test.rb +50 -0
- data/test/delete_customer_test.rb +55 -0
- data/test/delete_media_asset_test.rb +53 -0
- data/test/delete_queued_transaction_test.rb +56 -0
- data/test/delete_slide_show_test.rb +50 -0
- data/test/delete_survey_question_test.rb +51 -0
- data/test/delete_test_merchant_test.rb +59 -0
- data/test/delete_token_test.rb +55 -0
- data/test/empty_branding_asset_test.rb +44 -0
- data/test/empty_slide_show_test.rb +45 -0
- data/test/gateway_timeout_test.rb +11 -4
- data/test/get_customer_test.rb +10 -6
- data/test/get_merchants_test.rb +52 -0
- data/test/invite_merchant_user_test.rb +45 -0
- data/test/link_token_test.rb +56 -0
- data/test/list_queued_transactions_test.rb +55 -0
- data/test/list_terminals_test.rb +42 -0
- data/test/media_asset_test.rb +57 -0
- data/test/media_test.rb +42 -0
- data/test/media_upload_test.rb +52 -0
- data/test/merchant_platforms_test.rb +59 -0
- data/test/merchant_profile_test.rb +10 -5
- data/test/merchant_users_test.rb +42 -0
- data/test/new_transaction_display_test.rb +12 -6
- data/test/pan_charge_test.rb +11 -5
- data/test/pan_enroll_test.rb +17 -6
- data/test/pan_preauth_test.rb +11 -5
- data/test/partial_refund_test.rb +11 -6
- data/test/search_customer_test.rb +10 -6
- data/test/send_payment_link_test.rb +11 -6
- data/test/simple_batch_close_test.rb +10 -6
- data/test/simple_capture_test.rb +10 -6
- data/test/simple_gift_activate_test.rb +12 -6
- data/test/simple_locate_test.rb +44 -0
- data/test/simple_message_test.rb +12 -6
- data/test/simple_ping_test.rb +12 -6
- data/test/simple_refund_test.rb +11 -6
- data/test/simple_reversal_test.rb +10 -6
- data/test/simple_void_test.rb +10 -6
- data/test/slide_show_test.rb +51 -0
- data/test/slide_shows_test.rb +49 -0
- data/test/survey_question_test.rb +48 -0
- data/test/survey_questions_test.rb +50 -0
- data/test/survey_results_test.rb +48 -0
- data/test/tc_delete_template_test.rb +51 -0
- data/test/tc_entry_test.rb +56 -0
- data/test/tc_log_test.rb +42 -0
- data/test/tc_template_test.rb +53 -0
- data/test/tc_template_update_test.rb +48 -0
- data/test/tc_templates_test.rb +42 -0
- data/test/terminal_branding_test.rb +42 -0
- data/test/terminal_charge_test.rb +12 -6
- data/test/terminal_clear_test.rb +12 -6
- data/test/terminal_ebt_balance_test.rb +12 -6
- data/test/terminal_ebt_charge_test.rb +12 -6
- data/test/terminal_enroll_test.rb +12 -6
- data/test/terminal_gift_card_balance_test.rb +12 -6
- data/test/terminal_keyed_charge_test.rb +12 -6
- data/test/terminal_manual_ebt_charge_test.rb +12 -6
- data/test/terminal_preauth_test.rb +12 -6
- data/test/terminal_queued_transaction_test.rb +51 -0
- data/test/terminal_status_test.rb +12 -6
- data/test/terminal_timeout_test.rb +12 -5
- data/test/terms_and_conditions_test.rb +12 -6
- data/test/test_helper.rb +2 -4
- data/test/testdata/aviato.png +0 -0
- data/test/text_prompt_test.rb +12 -6
- data/test/token_metadata_test.rb +55 -0
- data/test/transaction_history_test.rb +10 -6
- data/test/unlink_token_test.rb +56 -0
- data/test/update_branding_asset_test.rb +62 -0
- data/test/update_customer_test.rb +10 -5
- data/test/update_merchant_platforms_test.rb +61 -0
- data/test/update_merchant_test.rb +60 -0
- data/test/update_slide_show_test.rb +60 -0
- data/test/update_survey_question_test.rb +47 -0
- data/test/update_transaction_display_test.rb +12 -6
- data/test/upload_status_test.rb +53 -0
- metadata +49 -2
data/test/terminal_clear_test.rb
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalClearTest < TestCase
|
13
13
|
def test_terminal_clear
|
14
|
+
|
15
|
+
puts "Running test_terminal_clear..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,17 +23,20 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_clear_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_clear_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
test: true,
|
29
|
-
terminalName:
|
36
|
+
terminalName: config[:defaultTerminalName]
|
30
37
|
}
|
31
38
|
|
32
39
|
response = blockchyp.clear(request)
|
33
|
-
|
34
40
|
assert_not_nil(response)
|
35
41
|
# response assertions
|
36
42
|
assert(response[:success])
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalEBTBalanceTest < TestCase
|
13
13
|
def test_terminal_ebt_balance
|
14
|
+
|
15
|
+
puts "Running test_terminal_ebt_balance..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,18 +23,21 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_ebt_balance_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_ebt_balance_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
test: true,
|
29
|
-
terminalName:
|
36
|
+
terminalName: config[:defaultTerminalName],
|
30
37
|
cardType: CardType::EBT
|
31
38
|
}
|
32
39
|
|
33
40
|
response = blockchyp.balance(request)
|
34
|
-
|
35
41
|
assert_not_nil(response)
|
36
42
|
# response assertions
|
37
43
|
assert(response[:success])
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalEBTChargeTest < TestCase
|
13
13
|
def test_terminal_ebt_charge
|
14
|
+
|
15
|
+
puts "Running test_terminal_ebt_charge..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,19 +23,22 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_ebt_charge_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_ebt_charge_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
|
-
terminalName:
|
35
|
+
terminalName: config[:defaultTerminalName],
|
29
36
|
amount: '25.00',
|
30
37
|
test: true,
|
31
38
|
cardType: CardType::EBT
|
32
39
|
}
|
33
40
|
|
34
41
|
response = blockchyp.charge(request)
|
35
|
-
|
36
42
|
assert_not_nil(response)
|
37
43
|
# response assertions
|
38
44
|
assert(response[:success])
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalEnrollTest < TestCase
|
13
13
|
def test_terminal_enroll
|
14
|
+
|
15
|
+
puts "Running test_terminal_enroll..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,17 +23,20 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_enroll_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_enroll_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
|
-
terminalName:
|
35
|
+
terminalName: config[:defaultTerminalName],
|
29
36
|
test: true
|
30
37
|
}
|
31
38
|
|
32
39
|
response = blockchyp.enroll(request)
|
33
|
-
|
34
40
|
assert_not_nil(response)
|
35
41
|
# response assertions
|
36
42
|
assert(response[:success])
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalGiftCardBalanceTest < TestCase
|
13
13
|
def test_terminal_gift_card_balance
|
14
|
+
|
15
|
+
puts "Running test_terminal_gift_card_balance..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,17 +23,20 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_gift_card_balance_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_gift_card_balance_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
test: true,
|
29
|
-
terminalName:
|
36
|
+
terminalName: config[:defaultTerminalName]
|
30
37
|
}
|
31
38
|
|
32
39
|
response = blockchyp.balance(request)
|
33
|
-
|
34
40
|
assert_not_nil(response)
|
35
41
|
# response assertions
|
36
42
|
assert(response[:success])
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalKeyedChargeTest < TestCase
|
13
13
|
def test_terminal_keyed_charge
|
14
|
+
|
15
|
+
puts "Running test_terminal_keyed_charge..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,19 +23,22 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_keyed_charge_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_keyed_charge_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
|
-
terminalName:
|
35
|
+
terminalName: config[:defaultTerminalName],
|
29
36
|
amount: '11.11',
|
30
37
|
manualEntry: true,
|
31
38
|
test: true
|
32
39
|
}
|
33
40
|
|
34
41
|
response = blockchyp.charge(request)
|
35
|
-
|
36
42
|
assert_not_nil(response)
|
37
43
|
# response assertions
|
38
44
|
assert(response[:success])
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalManualEBTChargeTest < TestCase
|
13
13
|
def test_terminal_manual_ebt_charge
|
14
|
+
|
15
|
+
puts "Running test_terminal_manual_ebt_charge..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,12 +23,16 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_manual_ebt_charge_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_manual_ebt_charge_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
|
-
terminalName:
|
35
|
+
terminalName: config[:defaultTerminalName],
|
29
36
|
amount: '27.00',
|
30
37
|
test: true,
|
31
38
|
cardType: CardType::EBT,
|
@@ -33,7 +40,6 @@ module BlockChyp
|
|
33
40
|
}
|
34
41
|
|
35
42
|
response = blockchyp.charge(request)
|
36
|
-
|
37
43
|
assert_not_nil(response)
|
38
44
|
# response assertions
|
39
45
|
assert(response[:success])
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalPreauthTest < TestCase
|
13
13
|
def test_terminal_preauth
|
14
|
+
|
15
|
+
puts "Running test_terminal_preauth..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,18 +23,21 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_preauth_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_preauth_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
|
-
terminalName:
|
35
|
+
terminalName: config[:defaultTerminalName],
|
29
36
|
amount: '15.15',
|
30
37
|
test: true
|
31
38
|
}
|
32
39
|
|
33
40
|
response = blockchyp.preauth(request)
|
34
|
-
|
35
41
|
assert_not_nil(response)
|
36
42
|
# response assertions
|
37
43
|
assert(response[:success])
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class TerminalQueuedTransactionTest < TestCase
|
13
|
+
def test_terminal_queued_transaction
|
14
|
+
|
15
|
+
puts "Running test_terminal_queued_transaction..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_queued_transaction_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
# Set request parameters
|
34
|
+
request = {
|
35
|
+
terminalName: config[:defaultTerminalName],
|
36
|
+
transactionRef: uuid,
|
37
|
+
description: '1060 West Addison',
|
38
|
+
amount: '25.15',
|
39
|
+
test: true,
|
40
|
+
queue: true
|
41
|
+
}
|
42
|
+
|
43
|
+
response = blockchyp.charge(request)
|
44
|
+
assert_not_nil(response)
|
45
|
+
# response assertions
|
46
|
+
assert(response[:success])
|
47
|
+
assert(!response[:approved])
|
48
|
+
assert_equal('Queued', response[:responseDescription])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalStatusTest < TestCase
|
13
13
|
def test_terminal_status
|
14
|
+
|
15
|
+
puts "Running test_terminal_status..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,16 +23,19 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_status_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_status_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
|
-
terminalName:
|
35
|
+
terminalName: config[:defaultTerminalName]
|
29
36
|
}
|
30
37
|
|
31
38
|
response = blockchyp.terminal_status(request)
|
32
|
-
|
33
39
|
assert_not_nil(response)
|
34
40
|
# response assertions
|
35
41
|
assert(response[:success])
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalTimeoutTest < TestCase
|
13
13
|
def test_terminal_timeout
|
14
|
+
|
15
|
+
puts "Running test_terminal_timeout..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,13 +23,17 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_timeout_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_timeout_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
timeout: 1,
|
29
|
-
terminalName:
|
36
|
+
terminalName: config[:defaultTerminalName],
|
30
37
|
amount: '25.15',
|
31
38
|
test: true
|
32
39
|
}
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TermsAndConditionsTest < TestCase
|
13
13
|
def test_terms_and_conditions
|
14
|
+
|
15
|
+
puts "Running test_terms_and_conditions..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,13 +23,17 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terms_and_conditions_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terms_and_conditions_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
test: true,
|
29
|
-
terminalName:
|
36
|
+
terminalName: config[:defaultTerminalName],
|
30
37
|
tcName: 'HIPPA Disclosure',
|
31
38
|
tcContent: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ullamcorper id urna quis pulvinar. Pellentesque vestibulum justo ac nulla consectetur tristique. Suspendisse arcu arcu, viverra vel luctus non, dapibus vitae augue. Aenean ac volutpat purus. Curabitur in lacus nisi. Nam vel sagittis eros. Curabitur faucibus ut nisl in pulvinar. Nunc egestas, orci ut porttitor tempus, ante mauris pellentesque ex, nec feugiat purus arcu ac metus. Cras sodales ornare lobortis. Aenean lacinia ultricies purus quis pharetra. Cras vestibulum nulla et magna eleifend eleifend. Nunc nibh dolor, malesuada ut suscipit vitae, bibendum quis dolor. Phasellus ultricies ex vitae dolor malesuada, vel dignissim neque accumsan.',
|
32
39
|
sigFormat: SignatureFormat::PNG,
|
@@ -35,7 +42,6 @@ module BlockChyp
|
|
35
42
|
}
|
36
43
|
|
37
44
|
response = blockchyp.terms_and_conditions(request)
|
38
|
-
|
39
45
|
assert_not_nil(response)
|
40
46
|
# response assertions
|
41
47
|
assert(response[:success])
|
data/test/test_helper.rb
CHANGED
@@ -24,8 +24,6 @@ module BlockChyp
|
|
24
24
|
|
25
25
|
file_name = File.join(config_home, 'blockchyp', 'sdk-itest-config.json')
|
26
26
|
|
27
|
-
puts 'load config: ' + file_name
|
28
|
-
|
29
27
|
raise 'file not found: ' + file_name unless File.file?(file_name)
|
30
28
|
|
31
29
|
config_file = File.open(file_name)
|
@@ -34,7 +32,7 @@ module BlockChyp
|
|
34
32
|
JSON.parse(content, symbolize_names: true)
|
35
33
|
end
|
36
34
|
|
37
|
-
def test_delay(client, test_name)
|
35
|
+
def test_delay(client, test_name, terminal_name)
|
38
36
|
test_delay = ENV['BC_TEST_DELAY']
|
39
37
|
|
40
38
|
if test_delay
|
@@ -42,7 +40,7 @@ module BlockChyp
|
|
42
40
|
if test_delay_int.positive?
|
43
41
|
request = {
|
44
42
|
test: true,
|
45
|
-
terminalName:
|
43
|
+
terminalName: terminal_name,
|
46
44
|
message: "Running #{test_name} in #{test_delay} seconds.."
|
47
45
|
}
|
48
46
|
response = client.message(request)
|
Binary file
|
data/test/text_prompt_test.rb
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TextPromptTest < TestCase
|
13
13
|
def test_text_prompt
|
14
|
+
|
15
|
+
puts "Running test_text_prompt..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,18 +23,21 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'text_prompt_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'text_prompt_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
test: true,
|
29
|
-
terminalName:
|
36
|
+
terminalName: config[:defaultTerminalName],
|
30
37
|
promptType: PromptType::EMAIL
|
31
38
|
}
|
32
39
|
|
33
40
|
response = blockchyp.text_prompt(request)
|
34
|
-
|
35
41
|
assert_not_nil(response)
|
36
42
|
# response assertions
|
37
43
|
assert(response[:success])
|