blockchyp 2.10.0 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2443 -480
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +217 -3
- data/lib/blockchyp_client.rb +78 -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 +10 -4
- data/test/cancel_payment_link_test.rb +10 -6
- data/test/capture_signature_test.rb +10 -4
- data/test/deactivate_terminal_test.rb +42 -0
- data/test/delete_branding_asset_test.rb +50 -0
- data/test/delete_customer_test.rb +10 -6
- 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 +16 -7
- data/test/empty_branding_asset_test.rb +44 -0
- data/test/empty_slide_show_test.rb +45 -0
- data/test/gateway_timeout_test.rb +10 -3
- 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 +10 -4
- data/test/pan_charge_test.rb +10 -4
- data/test/pan_enroll_test.rb +16 -5
- data/test/pan_preauth_test.rb +10 -4
- data/test/partial_refund_test.rb +10 -5
- data/test/search_customer_test.rb +10 -6
- data/test/send_payment_link_test.rb +10 -5
- data/test/simple_batch_close_test.rb +10 -6
- data/test/simple_capture_test.rb +10 -6
- data/test/simple_gift_activate_test.rb +10 -4
- data/test/simple_locate_test.rb +44 -0
- data/test/simple_message_test.rb +10 -4
- data/test/simple_ping_test.rb +11 -5
- data/test/simple_refund_test.rb +10 -5
- 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 +11 -5
- data/test/terminal_clear_test.rb +10 -4
- data/test/terminal_ebt_balance_test.rb +10 -4
- data/test/terminal_ebt_charge_test.rb +10 -4
- data/test/terminal_enroll_test.rb +10 -4
- data/test/terminal_gift_card_balance_test.rb +10 -4
- data/test/terminal_keyed_charge_test.rb +10 -4
- data/test/terminal_manual_ebt_charge_test.rb +10 -4
- data/test/terminal_preauth_test.rb +10 -4
- data/test/terminal_queued_transaction_test.rb +51 -0
- data/test/terminal_status_test.rb +10 -4
- data/test/terminal_timeout_test.rb +10 -3
- data/test/terms_and_conditions_test.rb +10 -4
- data/test/test_helper.rb +0 -2
- data/test/testdata/aviato.png +0 -0
- data/test/text_prompt_test.rb +10 -4
- 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 +10 -4
- data/test/upload_status_test.rb +53 -0
- metadata +46 -2
@@ -0,0 +1,52 @@
|
|
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 GetMerchantsTest < TestCase
|
13
|
+
def test_get_merchants
|
14
|
+
|
15
|
+
puts "Running test_get_merchants..."
|
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
|
+
|
29
|
+
profile = config[:profiles][:partner]
|
30
|
+
blockchyp = BlockChyp.new(
|
31
|
+
profile[:apiKey],
|
32
|
+
profile[:bearerToken],
|
33
|
+
profile[:signingKey]
|
34
|
+
)
|
35
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
36
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
37
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
# Set request parameters
|
42
|
+
request = {
|
43
|
+
test: true
|
44
|
+
}
|
45
|
+
|
46
|
+
response = blockchyp.get_merchants(request)
|
47
|
+
assert_not_nil(response)
|
48
|
+
# response assertions
|
49
|
+
assert(response[:success])
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,45 @@
|
|
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 InviteMerchantUserTest < TestCase
|
13
|
+
def test_invite_merchant_user
|
14
|
+
|
15
|
+
puts "Running test_invite_merchant_user..."
|
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
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
email: 'doublea@blockchypteam.m8r.co',
|
35
|
+
firstName: 'Aaron',
|
36
|
+
lastName: 'Anderson'
|
37
|
+
}
|
38
|
+
|
39
|
+
response = blockchyp.invite_merchant_user(request)
|
40
|
+
assert_not_nil(response)
|
41
|
+
# response assertions
|
42
|
+
assert(response[:success])
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,56 @@
|
|
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 LinkTokenTest < TestCase
|
13
|
+
def test_link_token
|
14
|
+
|
15
|
+
puts "Running test_link_token..."
|
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
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
pan: '4111111111111111',
|
35
|
+
test: true,
|
36
|
+
customer: {
|
37
|
+
customerRef: 'TESTCUSTOMER',
|
38
|
+
firstName: 'Test',
|
39
|
+
lastName: 'Customer'
|
40
|
+
}
|
41
|
+
}
|
42
|
+
response = blockchyp.enroll(setup_request)
|
43
|
+
|
44
|
+
# Set request parameters
|
45
|
+
request = {
|
46
|
+
token: response[:token],
|
47
|
+
customerId: response[:customer][:id]
|
48
|
+
}
|
49
|
+
|
50
|
+
response = blockchyp.link_token(request)
|
51
|
+
assert_not_nil(response)
|
52
|
+
# response assertions
|
53
|
+
assert(response[:success])
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,55 @@
|
|
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 ListQueuedTransactionsTest < TestCase
|
13
|
+
def test_list_queued_transactions
|
14
|
+
|
15
|
+
puts "Running test_list_queued_transactions..."
|
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, 'list_queued_transactions_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
# Set request parameters
|
34
|
+
setup_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
|
+
response = blockchyp.charge(setup_request)
|
43
|
+
|
44
|
+
# Set request parameters
|
45
|
+
request = {
|
46
|
+
terminalName: config[:defaultTerminalName]
|
47
|
+
}
|
48
|
+
|
49
|
+
response = blockchyp.list_queued_transactions(request)
|
50
|
+
assert_not_nil(response)
|
51
|
+
# response assertions
|
52
|
+
assert(response[:success])
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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 ListTerminalsTest < TestCase
|
13
|
+
def test_list_terminals
|
14
|
+
|
15
|
+
puts "Running test_list_terminals..."
|
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
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
}
|
35
|
+
|
36
|
+
response = blockchyp.terminals(request)
|
37
|
+
assert_not_nil(response)
|
38
|
+
# response assertions
|
39
|
+
assert(response[:success])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,57 @@
|
|
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 MediaAssetTest < TestCase
|
13
|
+
def test_media_asset
|
14
|
+
|
15
|
+
puts "Running test_media_asset..."
|
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
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
fileName: 'aviato.png',
|
35
|
+
fileSize: 18843,
|
36
|
+
uploadId: uuid
|
37
|
+
}
|
38
|
+
file = File.open("test/testdata/aviato.png")
|
39
|
+
content = file.read
|
40
|
+
response = blockchyp.upload_media(setup_request, content)
|
41
|
+
|
42
|
+
# Set request parameters
|
43
|
+
request = {
|
44
|
+
mediaId: response[:id]
|
45
|
+
}
|
46
|
+
|
47
|
+
response = blockchyp.media_asset(request)
|
48
|
+
assert_not_nil(response)
|
49
|
+
# response assertions
|
50
|
+
assert(response[:success])
|
51
|
+
assert(!response[:id].empty?)
|
52
|
+
assert_equal('aviato.png', response[:originalFile])
|
53
|
+
assert(!response[:fileUrl].empty?)
|
54
|
+
assert(!response[:thumbnailUrl].empty?)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/test/media_test.rb
ADDED
@@ -0,0 +1,42 @@
|
|
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 MediaTest < TestCase
|
13
|
+
def test_media
|
14
|
+
|
15
|
+
puts "Running test_media..."
|
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
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
}
|
35
|
+
|
36
|
+
response = blockchyp.media(request)
|
37
|
+
assert_not_nil(response)
|
38
|
+
# response assertions
|
39
|
+
assert(response[:success])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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 MediaUploadTest < TestCase
|
13
|
+
def test_media_upload
|
14
|
+
|
15
|
+
puts "Running test_media_upload..."
|
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
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
fileName: 'aviato.png',
|
35
|
+
fileSize: 18843,
|
36
|
+
uploadId: uuid
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
file = File.open("test/testdata/aviato.png")
|
41
|
+
content = file.read
|
42
|
+
response = blockchyp.upload_media(request, content)
|
43
|
+
assert_not_nil(response)
|
44
|
+
# response assertions
|
45
|
+
assert(response[:success])
|
46
|
+
assert(!response[:id].empty?)
|
47
|
+
assert_equal('aviato.png', response[:originalFile])
|
48
|
+
assert(!response[:fileUrl].empty?)
|
49
|
+
assert(!response[:thumbnailUrl].empty?)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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 MerchantPlatformsTest < TestCase
|
13
|
+
def test_merchant_platforms
|
14
|
+
|
15
|
+
puts "Running test_merchant_platforms..."
|
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
|
+
|
29
|
+
profile = config[:profiles][:partner]
|
30
|
+
blockchyp = BlockChyp.new(
|
31
|
+
profile[:apiKey],
|
32
|
+
profile[:bearerToken],
|
33
|
+
profile[:signingKey]
|
34
|
+
)
|
35
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
36
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
37
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
# Set request parameters
|
42
|
+
setup_request = {
|
43
|
+
dbaName: 'Test Merchant',
|
44
|
+
companyName: 'Test Merchant'
|
45
|
+
}
|
46
|
+
response = blockchyp.add_test_merchant(setup_request)
|
47
|
+
|
48
|
+
# Set request parameters
|
49
|
+
request = {
|
50
|
+
merchantId: response[:merchantId]
|
51
|
+
}
|
52
|
+
|
53
|
+
response = blockchyp.merchant_platforms(request)
|
54
|
+
assert_not_nil(response)
|
55
|
+
# response assertions
|
56
|
+
assert(response[:success])
|
57
|
+
end
|
58
|
+
end
|
59
|
+
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 MerchantProfileTest < TestCase
|
13
13
|
def test_merchant_profile
|
14
|
+
|
15
|
+
puts "Running test_merchant_profile..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,8 +23,11 @@ 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
|
+
|
29
|
+
|
23
30
|
|
24
|
-
test_delay(blockchyp, 'merchant_profile_test', config[:defaultTerminalName])
|
25
31
|
|
26
32
|
# Set request parameters
|
27
33
|
request = {
|
@@ -29,7 +35,6 @@ module BlockChyp
|
|
29
35
|
}
|
30
36
|
|
31
37
|
response = blockchyp.merchant_profile(request)
|
32
|
-
|
33
38
|
assert_not_nil(response)
|
34
39
|
# response assertions
|
35
40
|
assert(response[:success])
|
@@ -0,0 +1,42 @@
|
|
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 MerchantUsersTest < TestCase
|
13
|
+
def test_merchant_users
|
14
|
+
|
15
|
+
puts "Running test_merchant_users..."
|
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
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
}
|
35
|
+
|
36
|
+
response = blockchyp.merchant_users(request)
|
37
|
+
assert_not_nil(response)
|
38
|
+
# response assertions
|
39
|
+
assert(response[:success])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
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 NewTransactionDisplayTest < TestCase
|
13
13
|
def test_new_transaction_display
|
14
|
+
|
15
|
+
puts "Running test_new_transaction_display..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,9 +23,13 @@ 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]
|
23
27
|
|
24
28
|
test_delay(blockchyp, 'new_transaction_display_test', config[:defaultTerminalName])
|
25
29
|
|
30
|
+
|
31
|
+
|
32
|
+
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
test: true,
|
@@ -49,7 +56,6 @@ module BlockChyp
|
|
49
56
|
}
|
50
57
|
|
51
58
|
response = blockchyp.new_transaction_display(request)
|
52
|
-
|
53
59
|
assert_not_nil(response)
|
54
60
|
# response assertions
|
55
61
|
assert(response[:success])
|
data/test/pan_charge_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 PANChargeTest < TestCase
|
13
13
|
def test_pan_charge
|
14
|
+
|
15
|
+
puts "Running test_pan_charge..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,9 +23,13 @@ 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]
|
23
27
|
|
24
28
|
test_delay(blockchyp, 'pan_charge_test', config[:defaultTerminalName])
|
25
29
|
|
30
|
+
|
31
|
+
|
32
|
+
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
pan: '4111111111111111',
|
@@ -34,7 +41,6 @@ module BlockChyp
|
|
34
41
|
}
|
35
42
|
|
36
43
|
response = blockchyp.charge(request)
|
37
|
-
|
38
44
|
assert_not_nil(response)
|
39
45
|
# response assertions
|
40
46
|
assert(response[:success])
|
data/test/pan_enroll_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 PANEnrollTest < TestCase
|
13
13
|
def test_pan_enroll
|
14
|
+
|
15
|
+
puts "Running test_pan_enroll..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,17 +23,25 @@ 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]
|
23
27
|
|
24
28
|
test_delay(blockchyp, 'pan_enroll_test', config[:defaultTerminalName])
|
25
29
|
|
30
|
+
|
31
|
+
|
32
|
+
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
35
|
pan: '4111111111111111',
|
29
|
-
test: true
|
36
|
+
test: true,
|
37
|
+
customer: {
|
38
|
+
customerRef: 'TESTCUSTOMER',
|
39
|
+
firstName: 'Test',
|
40
|
+
lastName: 'Customer'
|
41
|
+
}
|
30
42
|
}
|
31
43
|
|
32
44
|
response = blockchyp.enroll(request)
|
33
|
-
|
34
45
|
assert_not_nil(response)
|
35
46
|
# response assertions
|
36
47
|
assert(response[:success])
|