blockchyp 2.9.6 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +1 -8
- data/README.md +479 -2442
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +3 -217
- data/lib/blockchyp_client.rb +0 -78
- data/test/batch_history_test.rb +6 -10
- data/test/boolean_prompt_test.rb +4 -10
- data/test/cancel_payment_link_test.rb +7 -11
- data/test/capture_signature_test.rb +4 -10
- data/test/delete_customer_test.rb +6 -10
- data/test/delete_token_test.rb +7 -16
- data/test/gateway_timeout_test.rb +3 -10
- data/test/get_customer_test.rb +6 -10
- data/test/merchant_profile_test.rb +5 -10
- data/test/new_transaction_display_test.rb +4 -10
- data/test/pan_charge_test.rb +4 -10
- data/test/pan_enroll_test.rb +5 -16
- data/test/pan_preauth_test.rb +4 -10
- data/test/partial_refund_test.rb +5 -10
- data/test/search_customer_test.rb +6 -10
- data/test/send_payment_link_test.rb +6 -11
- data/test/simple_batch_close_test.rb +6 -10
- data/test/simple_capture_test.rb +6 -10
- data/test/simple_gift_activate_test.rb +4 -10
- data/test/simple_message_test.rb +4 -10
- data/test/simple_ping_test.rb +5 -11
- data/test/simple_refund_test.rb +5 -10
- data/test/simple_reversal_test.rb +6 -10
- data/test/simple_void_test.rb +6 -10
- data/test/terminal_charge_test.rb +5 -11
- data/test/terminal_clear_test.rb +4 -10
- data/test/terminal_ebt_balance_test.rb +4 -10
- data/test/terminal_ebt_charge_test.rb +4 -10
- data/test/terminal_enroll_test.rb +4 -10
- data/test/terminal_gift_card_balance_test.rb +4 -10
- data/test/terminal_keyed_charge_test.rb +4 -10
- data/test/terminal_manual_ebt_charge_test.rb +4 -10
- data/test/terminal_preauth_test.rb +4 -10
- data/test/terminal_status_test.rb +4 -10
- data/test/terminal_timeout_test.rb +3 -10
- data/test/terms_and_conditions_test.rb +4 -10
- data/test/test_helper.rb +2 -0
- data/test/text_prompt_test.rb +4 -10
- data/test/transaction_history_test.rb +6 -10
- data/test/update_customer_test.rb +5 -10
- data/test/update_transaction_display_test.rb +4 -10
- metadata +2 -46
- data/test/activate_terminal_test.rb +0 -45
- data/test/add_test_merchant_test.rb +0 -56
- data/test/deactivate_terminal_test.rb +0 -42
- data/test/delete_branding_asset_test.rb +0 -50
- data/test/delete_media_asset_test.rb +0 -53
- data/test/delete_queued_transaction_test.rb +0 -56
- data/test/delete_slide_show_test.rb +0 -50
- data/test/delete_survey_question_test.rb +0 -51
- data/test/delete_test_merchant_test.rb +0 -59
- data/test/empty_branding_asset_test.rb +0 -44
- data/test/empty_slide_show_test.rb +0 -45
- data/test/get_merchants_test.rb +0 -52
- data/test/invite_merchant_user_test.rb +0 -45
- data/test/link_token_test.rb +0 -56
- data/test/list_queued_transactions_test.rb +0 -55
- data/test/list_terminals_test.rb +0 -42
- data/test/media_asset_test.rb +0 -57
- data/test/media_test.rb +0 -42
- data/test/media_upload_test.rb +0 -52
- data/test/merchant_platforms_test.rb +0 -59
- data/test/merchant_users_test.rb +0 -42
- data/test/simple_locate_test.rb +0 -44
- data/test/slide_show_test.rb +0 -51
- data/test/slide_shows_test.rb +0 -49
- data/test/survey_question_test.rb +0 -48
- data/test/survey_questions_test.rb +0 -50
- data/test/survey_results_test.rb +0 -48
- data/test/tc_delete_template_test.rb +0 -51
- data/test/tc_entry_test.rb +0 -56
- data/test/tc_log_test.rb +0 -42
- data/test/tc_template_test.rb +0 -53
- data/test/tc_template_update_test.rb +0 -48
- data/test/tc_templates_test.rb +0 -42
- data/test/terminal_branding_test.rb +0 -42
- data/test/terminal_queued_transaction_test.rb +0 -51
- data/test/testdata/aviato.png +0 -0
- data/test/token_metadata_test.rb +0 -55
- data/test/unlink_token_test.rb +0 -56
- data/test/update_branding_asset_test.rb +0 -62
- data/test/update_merchant_platforms_test.rb +0 -61
- data/test/update_merchant_test.rb +0 -60
- data/test/update_slide_show_test.rb +0 -60
- data/test/update_survey_question_test.rb +0 -47
- data/test/upload_status_test.rb +0 -53
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 GatewayTimeoutTest < TestCase
|
13
13
|
def test_gateway_timeout
|
14
|
-
|
15
|
-
puts "Running test_gateway_timeout..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,13 +20,9 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
23
|
|
28
24
|
test_delay(blockchyp, 'gateway_timeout_test', config[:defaultTerminalName])
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
26
|
# Set request parameters
|
34
27
|
request = {
|
35
28
|
timeout: 1,
|
data/test/get_customer_test.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 GetCustomerTest < TestCase
|
13
13
|
def test_get_customer
|
14
|
-
|
15
|
-
puts "Running test_get_customer..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,11 +20,8 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
-
|
28
|
-
|
29
|
-
|
30
23
|
|
24
|
+
test_delay(blockchyp, 'get_customer_test', config[:defaultTerminalName])
|
31
25
|
|
32
26
|
# Set request parameters
|
33
27
|
setup_request = {
|
@@ -39,6 +33,7 @@ module BlockChyp
|
|
39
33
|
smsNumber: '(123) 123-1234'
|
40
34
|
}
|
41
35
|
}
|
36
|
+
|
42
37
|
response = blockchyp.update_customer(setup_request)
|
43
38
|
|
44
39
|
# Set request parameters
|
@@ -47,6 +42,7 @@ module BlockChyp
|
|
47
42
|
}
|
48
43
|
|
49
44
|
response = blockchyp.customer(request)
|
45
|
+
|
50
46
|
assert_not_nil(response)
|
51
47
|
# response assertions
|
52
48
|
assert(response[:success])
|
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 MerchantProfileTest < TestCase
|
13
13
|
def test_merchant_profile
|
14
|
-
|
15
|
-
puts "Running test_merchant_profile..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,11 +20,8 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
-
|
28
|
-
|
29
|
-
|
30
23
|
|
24
|
+
test_delay(blockchyp, 'merchant_profile_test', config[:defaultTerminalName])
|
31
25
|
|
32
26
|
# Set request parameters
|
33
27
|
request = {
|
@@ -35,6 +29,7 @@ module BlockChyp
|
|
35
29
|
}
|
36
30
|
|
37
31
|
response = blockchyp.merchant_profile(request)
|
32
|
+
|
38
33
|
assert_not_nil(response)
|
39
34
|
# response assertions
|
40
35
|
assert(response[:success])
|
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 NewTransactionDisplayTest < TestCase
|
13
13
|
def test_new_transaction_display
|
14
|
-
|
15
|
-
puts "Running test_new_transaction_display..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,13 +20,9 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
23
|
|
28
24
|
test_delay(blockchyp, 'new_transaction_display_test', config[:defaultTerminalName])
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
26
|
# Set request parameters
|
34
27
|
request = {
|
35
28
|
test: true,
|
@@ -56,6 +49,7 @@ module BlockChyp
|
|
56
49
|
}
|
57
50
|
|
58
51
|
response = blockchyp.new_transaction_display(request)
|
52
|
+
|
59
53
|
assert_not_nil(response)
|
60
54
|
# response assertions
|
61
55
|
assert(response[:success])
|
data/test/pan_charge_test.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 PANChargeTest < TestCase
|
13
13
|
def test_pan_charge
|
14
|
-
|
15
|
-
puts "Running test_pan_charge..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,13 +20,9 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
23
|
|
28
24
|
test_delay(blockchyp, 'pan_charge_test', config[:defaultTerminalName])
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
26
|
# Set request parameters
|
34
27
|
request = {
|
35
28
|
pan: '4111111111111111',
|
@@ -41,6 +34,7 @@ module BlockChyp
|
|
41
34
|
}
|
42
35
|
|
43
36
|
response = blockchyp.charge(request)
|
37
|
+
|
44
38
|
assert_not_nil(response)
|
45
39
|
# response assertions
|
46
40
|
assert(response[:success])
|
data/test/pan_enroll_test.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 PANEnrollTest < TestCase
|
13
13
|
def test_pan_enroll
|
14
|
-
|
15
|
-
puts "Running test_pan_enroll..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,25 +20,17 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
23
|
|
28
24
|
test_delay(blockchyp, 'pan_enroll_test', config[:defaultTerminalName])
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
26
|
# Set request parameters
|
34
27
|
request = {
|
35
28
|
pan: '4111111111111111',
|
36
|
-
test: true
|
37
|
-
customer: {
|
38
|
-
customerRef: 'TESTCUSTOMER',
|
39
|
-
firstName: 'Test',
|
40
|
-
lastName: 'Customer'
|
41
|
-
}
|
29
|
+
test: true
|
42
30
|
}
|
43
31
|
|
44
32
|
response = blockchyp.enroll(request)
|
33
|
+
|
45
34
|
assert_not_nil(response)
|
46
35
|
# response assertions
|
47
36
|
assert(response[:success])
|
data/test/pan_preauth_test.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 PANPreauthTest < TestCase
|
13
13
|
def test_pan_preauth
|
14
|
-
|
15
|
-
puts "Running test_pan_preauth..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,13 +20,9 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
23
|
|
28
24
|
test_delay(blockchyp, 'pan_preauth_test', config[:defaultTerminalName])
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
26
|
# Set request parameters
|
34
27
|
request = {
|
35
28
|
pan: '4111111111111111',
|
@@ -40,6 +33,7 @@ module BlockChyp
|
|
40
33
|
}
|
41
34
|
|
42
35
|
response = blockchyp.preauth(request)
|
36
|
+
|
43
37
|
assert_not_nil(response)
|
44
38
|
# response assertions
|
45
39
|
assert(response[:success])
|
data/test/partial_refund_test.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 PartialRefundTest < TestCase
|
13
13
|
def test_partial_refund
|
14
|
-
|
15
|
-
puts "Running test_partial_refund..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,13 +20,9 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
23
|
|
28
24
|
test_delay(blockchyp, 'partial_refund_test', config[:defaultTerminalName])
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
26
|
# Set request parameters
|
34
27
|
setup_request = {
|
35
28
|
pan: '4111111111111111',
|
@@ -39,6 +32,7 @@ module BlockChyp
|
|
39
32
|
test: true,
|
40
33
|
transactionRef: uuid
|
41
34
|
}
|
35
|
+
|
42
36
|
response = blockchyp.charge(setup_request)
|
43
37
|
|
44
38
|
# Set request parameters
|
@@ -49,6 +43,7 @@ module BlockChyp
|
|
49
43
|
}
|
50
44
|
|
51
45
|
response = blockchyp.refund(request)
|
46
|
+
|
52
47
|
assert_not_nil(response)
|
53
48
|
# response assertions
|
54
49
|
assert(response[:success])
|
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 SearchCustomerTest < TestCase
|
13
13
|
def test_search_customer
|
14
|
-
|
15
|
-
puts "Running test_search_customer..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,11 +20,8 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
-
|
28
|
-
|
29
|
-
|
30
23
|
|
24
|
+
test_delay(blockchyp, 'search_customer_test', config[:defaultTerminalName])
|
31
25
|
|
32
26
|
# Set request parameters
|
33
27
|
setup_request = {
|
@@ -39,6 +33,7 @@ module BlockChyp
|
|
39
33
|
smsNumber: '(123) 123-1234'
|
40
34
|
}
|
41
35
|
}
|
36
|
+
|
42
37
|
response = blockchyp.update_customer(setup_request)
|
43
38
|
|
44
39
|
# Set request parameters
|
@@ -47,6 +42,7 @@ module BlockChyp
|
|
47
42
|
}
|
48
43
|
|
49
44
|
response = blockchyp.customer_search(request)
|
45
|
+
|
50
46
|
assert_not_nil(response)
|
51
47
|
# response assertions
|
52
48
|
assert(response[:success])
|
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 SendPaymentLinkTest < TestCase
|
13
13
|
def test_send_payment_link
|
14
|
-
|
15
|
-
puts "Running test_send_payment_link..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,11 +20,8 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
-
|
28
|
-
|
29
|
-
|
30
23
|
|
24
|
+
test_delay(blockchyp, 'send_payment_link_test', config[:defaultTerminalName])
|
31
25
|
|
32
26
|
# Set request parameters
|
33
27
|
request = {
|
@@ -52,12 +46,13 @@ module BlockChyp
|
|
52
46
|
firstName: 'FirstName',
|
53
47
|
lastName: 'LastName',
|
54
48
|
companyName: 'Company Name',
|
55
|
-
emailAddress: '
|
49
|
+
emailAddress: 'support@blockchyp.com',
|
56
50
|
smsNumber: '(123) 123-1231'
|
57
51
|
}
|
58
52
|
}
|
59
53
|
|
60
54
|
response = blockchyp.send_payment_link(request)
|
55
|
+
|
61
56
|
assert_not_nil(response)
|
62
57
|
# response assertions
|
63
58
|
assert(response[:success])
|
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 SimpleBatchCloseTest < TestCase
|
13
13
|
def test_simple_batch_close
|
14
|
-
|
15
|
-
puts "Running test_simple_batch_close..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,11 +20,8 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
-
|
28
|
-
|
29
|
-
|
30
23
|
|
24
|
+
test_delay(blockchyp, 'simple_batch_close_test', config[:defaultTerminalName])
|
31
25
|
|
32
26
|
# Set request parameters
|
33
27
|
setup_request = {
|
@@ -38,6 +32,7 @@ module BlockChyp
|
|
38
32
|
test: true,
|
39
33
|
transactionRef: uuid
|
40
34
|
}
|
35
|
+
|
41
36
|
response = blockchyp.charge(setup_request)
|
42
37
|
|
43
38
|
# Set request parameters
|
@@ -46,6 +41,7 @@ module BlockChyp
|
|
46
41
|
}
|
47
42
|
|
48
43
|
response = blockchyp.close_batch(request)
|
44
|
+
|
49
45
|
assert_not_nil(response)
|
50
46
|
# response assertions
|
51
47
|
assert(response[:success])
|
data/test/simple_capture_test.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 SimpleCaptureTest < TestCase
|
13
13
|
def test_simple_capture
|
14
|
-
|
15
|
-
puts "Running test_simple_capture..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,11 +20,8 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
-
|
28
|
-
|
29
|
-
|
30
23
|
|
24
|
+
test_delay(blockchyp, 'simple_capture_test', config[:defaultTerminalName])
|
31
25
|
|
32
26
|
# Set request parameters
|
33
27
|
setup_request = {
|
@@ -37,6 +31,7 @@ module BlockChyp
|
|
37
31
|
amount: '25.55',
|
38
32
|
test: true
|
39
33
|
}
|
34
|
+
|
40
35
|
response = blockchyp.preauth(setup_request)
|
41
36
|
|
42
37
|
# Set request parameters
|
@@ -46,6 +41,7 @@ module BlockChyp
|
|
46
41
|
}
|
47
42
|
|
48
43
|
response = blockchyp.capture(request)
|
44
|
+
|
49
45
|
assert_not_nil(response)
|
50
46
|
# response assertions
|
51
47
|
assert(response[:success])
|
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 SimpleGiftActivateTest < TestCase
|
13
13
|
def test_simple_gift_activate
|
14
|
-
|
15
|
-
puts "Running test_simple_gift_activate..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,13 +20,9 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
23
|
|
28
24
|
test_delay(blockchyp, 'simple_gift_activate_test', config[:defaultTerminalName])
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
26
|
# Set request parameters
|
34
27
|
request = {
|
35
28
|
test: true,
|
@@ -38,6 +31,7 @@ module BlockChyp
|
|
38
31
|
}
|
39
32
|
|
40
33
|
response = blockchyp.gift_activate(request)
|
34
|
+
|
41
35
|
assert_not_nil(response)
|
42
36
|
# response assertions
|
43
37
|
assert(response[:success])
|
data/test/simple_message_test.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019
|
3
|
+
# Copyright 2019 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
|
-
#
|
6
|
+
# This file was generated automatically. Changes to this file will be lost
|
7
|
+
# 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 SimpleMessageTest < TestCase
|
13
13
|
def test_simple_message
|
14
|
-
|
15
|
-
puts "Running test_simple_message..."
|
16
|
-
|
17
14
|
config = load_test_config
|
18
15
|
|
19
16
|
blockchyp = BlockChyp.new(
|
@@ -23,13 +20,9 @@ module BlockChyp
|
|
23
20
|
)
|
24
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
25
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
27
23
|
|
28
24
|
test_delay(blockchyp, 'simple_message_test', config[:defaultTerminalName])
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
26
|
# Set request parameters
|
34
27
|
request = {
|
35
28
|
test: true,
|
@@ -38,6 +31,7 @@ module BlockChyp
|
|
38
31
|
}
|
39
32
|
|
40
33
|
response = blockchyp.message(request)
|
34
|
+
|
41
35
|
assert_not_nil(response)
|
42
36
|
# response assertions
|
43
37
|
assert(response[:success])
|