blockchyp 2.9.3 → 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/README.md +165 -0
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +25 -0
- data/lib/blockchyp_client.rb +2 -0
- data/test/batch_history_test.rb +1 -1
- data/test/boolean_prompt_test.rb +2 -2
- data/test/cancel_payment_link_test.rb +68 -0
- data/test/capture_signature_test.rb +2 -2
- data/test/delete_customer_test.rb +51 -0
- data/test/delete_token_test.rb +46 -0
- data/test/gateway_timeout_test.rb +1 -1
- data/test/get_customer_test.rb +1 -1
- data/test/merchant_profile_test.rb +1 -1
- data/test/new_transaction_display_test.rb +2 -2
- data/test/pan_charge_test.rb +1 -1
- data/test/pan_enroll_test.rb +1 -1
- data/test/pan_preauth_test.rb +1 -1
- data/test/partial_refund_test.rb +1 -1
- data/test/search_customer_test.rb +1 -1
- data/test/send_payment_link_test.rb +1 -1
- data/test/simple_batch_close_test.rb +1 -1
- data/test/simple_capture_test.rb +1 -1
- data/test/simple_gift_activate_test.rb +2 -2
- data/test/simple_message_test.rb +2 -2
- data/test/simple_ping_test.rb +2 -2
- data/test/simple_refund_test.rb +1 -1
- data/test/simple_reversal_test.rb +1 -1
- data/test/simple_void_test.rb +1 -1
- data/test/terminal_charge_test.rb +2 -2
- data/test/terminal_clear_test.rb +2 -2
- data/test/terminal_ebt_balance_test.rb +2 -2
- data/test/terminal_ebt_charge_test.rb +2 -2
- data/test/terminal_enroll_test.rb +2 -2
- data/test/terminal_gift_card_balance_test.rb +2 -2
- data/test/terminal_keyed_charge_test.rb +2 -2
- data/test/terminal_manual_ebt_charge_test.rb +2 -2
- data/test/terminal_preauth_test.rb +2 -2
- data/test/terminal_status_test.rb +2 -2
- data/test/terminal_timeout_test.rb +2 -2
- data/test/terms_and_conditions_test.rb +2 -2
- data/test/test_helper.rb +2 -2
- data/test/text_prompt_test.rb +2 -2
- data/test/transaction_history_test.rb +1 -1
- data/test/update_customer_test.rb +1 -1
- data/test/update_transaction_display_test.rb +2 -2
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfa58d2ca1b9dced275caf2d275cc8365c01253ae9da66a98f69674c3eac94c9
|
4
|
+
data.tar.gz: a73a9b7015fac83379021f425c57802c4f078575116311ceff795d1352e985fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc39925a046375cee1ddfb9bca6dce5584085a272ae2d8998c0af52fce2aa6fa70ae3d5b158c4c2acc1d7bdc1fa8a1ab30504cbaa2a1cd91c84d678fe2523f07
|
7
|
+
data.tar.gz: 3851804bdd7ba2c9525bdc678d546e098869da2ccc76857b3425bc1ebbd785e810514aa5b61dc5f239635162442e294f2881b025ed3177f5aa1b371436689247
|
data/README.md
CHANGED
@@ -804,6 +804,38 @@ response = blockchyp.sendPaymentLink(request)
|
|
804
804
|
puts "Response: #{response.inspect}"
|
805
805
|
|
806
806
|
|
807
|
+
```
|
808
|
+
|
809
|
+
#### Cancel Payment Link
|
810
|
+
|
811
|
+
|
812
|
+
|
813
|
+
Cancels a payment link.
|
814
|
+
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
```ruby
|
819
|
+
# frozen_string_literal: true
|
820
|
+
|
821
|
+
require 'blockchyp'
|
822
|
+
|
823
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
824
|
+
ENV['BC_API_KEY'],
|
825
|
+
ENV['BC_BEARER_TOKEN'],
|
826
|
+
ENV['BC_SIGNING_KEY']
|
827
|
+
)
|
828
|
+
|
829
|
+
# Set request parameters
|
830
|
+
request = {
|
831
|
+
linkCode: 'Payment link code to cancel'
|
832
|
+
}
|
833
|
+
|
834
|
+
response = blockchyp.cancelPaymentLink(request)
|
835
|
+
|
836
|
+
puts "Response: #{response.inspect}"
|
837
|
+
|
838
|
+
|
807
839
|
```
|
808
840
|
|
809
841
|
#### Transaction Status
|
@@ -1710,6 +1742,139 @@ response = blockchyp.merchantProfile(request)
|
|
1710
1742
|
puts "Response: #{response.inspect}"
|
1711
1743
|
|
1712
1744
|
|
1745
|
+
```
|
1746
|
+
|
1747
|
+
#### List Queued Transactions
|
1748
|
+
|
1749
|
+
|
1750
|
+
|
1751
|
+
Returns a list of transaction refs of transactions queued on a terminal.
|
1752
|
+
Details about the transactions can be retrieved using the Transaction Status
|
1753
|
+
API.
|
1754
|
+
|
1755
|
+
|
1756
|
+
|
1757
|
+
|
1758
|
+
```ruby
|
1759
|
+
# frozen_string_literal: true
|
1760
|
+
|
1761
|
+
require 'blockchyp'
|
1762
|
+
|
1763
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
1764
|
+
ENV['BC_API_KEY'],
|
1765
|
+
ENV['BC_BEARER_TOKEN'],
|
1766
|
+
ENV['BC_SIGNING_KEY']
|
1767
|
+
)
|
1768
|
+
|
1769
|
+
# Set request parameters
|
1770
|
+
request = {
|
1771
|
+
terminalName: 'Test Terminal'
|
1772
|
+
}
|
1773
|
+
|
1774
|
+
response = blockchyp.listQueuedTransactions(request)
|
1775
|
+
|
1776
|
+
puts "Response: #{response.inspect}"
|
1777
|
+
|
1778
|
+
|
1779
|
+
```
|
1780
|
+
|
1781
|
+
#### Delete Queued Transaction
|
1782
|
+
|
1783
|
+
|
1784
|
+
|
1785
|
+
Deletes one or all queued transactions from a terminal. If `*` is passed as
|
1786
|
+
a transaction ref, then the entire terminal queue will be cleared. An error is
|
1787
|
+
returned if the passed transaction ref is not queued on the terminal.
|
1788
|
+
|
1789
|
+
|
1790
|
+
|
1791
|
+
|
1792
|
+
```ruby
|
1793
|
+
# frozen_string_literal: true
|
1794
|
+
|
1795
|
+
require 'blockchyp'
|
1796
|
+
|
1797
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
1798
|
+
ENV['BC_API_KEY'],
|
1799
|
+
ENV['BC_BEARER_TOKEN'],
|
1800
|
+
ENV['BC_SIGNING_KEY']
|
1801
|
+
)
|
1802
|
+
|
1803
|
+
# Set request parameters
|
1804
|
+
request = {
|
1805
|
+
terminalName: 'Test Terminal',
|
1806
|
+
transactionRef: '*'
|
1807
|
+
}
|
1808
|
+
|
1809
|
+
response = blockchyp.deleteQueuedTransaction(request)
|
1810
|
+
|
1811
|
+
puts "Response: #{response.inspect}"
|
1812
|
+
|
1813
|
+
|
1814
|
+
```
|
1815
|
+
|
1816
|
+
#### Delete Customer
|
1817
|
+
|
1818
|
+
|
1819
|
+
|
1820
|
+
Deletes a customer record.
|
1821
|
+
|
1822
|
+
|
1823
|
+
|
1824
|
+
|
1825
|
+
```ruby
|
1826
|
+
# frozen_string_literal: true
|
1827
|
+
|
1828
|
+
require 'blockchyp'
|
1829
|
+
|
1830
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
1831
|
+
ENV['BC_API_KEY'],
|
1832
|
+
ENV['BC_BEARER_TOKEN'],
|
1833
|
+
ENV['BC_SIGNING_KEY']
|
1834
|
+
)
|
1835
|
+
|
1836
|
+
# Set request parameters
|
1837
|
+
request = {
|
1838
|
+
customerId: 'ID of the customer to delete'
|
1839
|
+
}
|
1840
|
+
|
1841
|
+
response = blockchyp.deleteCustomer(request)
|
1842
|
+
|
1843
|
+
puts "Response: #{response.inspect}"
|
1844
|
+
|
1845
|
+
|
1846
|
+
```
|
1847
|
+
|
1848
|
+
#### Delete Token
|
1849
|
+
|
1850
|
+
|
1851
|
+
|
1852
|
+
Deletes a payment token from the gateway.
|
1853
|
+
|
1854
|
+
|
1855
|
+
|
1856
|
+
|
1857
|
+
```ruby
|
1858
|
+
# frozen_string_literal: true
|
1859
|
+
|
1860
|
+
require 'blockchyp'
|
1861
|
+
|
1862
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
1863
|
+
ENV['BC_API_KEY'],
|
1864
|
+
ENV['BC_BEARER_TOKEN'],
|
1865
|
+
ENV['BC_SIGNING_KEY']
|
1866
|
+
)
|
1867
|
+
|
1868
|
+
# Set request parameters
|
1869
|
+
request = {
|
1870
|
+
token: 'Token to delete'
|
1871
|
+
}
|
1872
|
+
|
1873
|
+
response = blockchyp.deleteToken(request)
|
1874
|
+
|
1875
|
+
puts "Response: #{response.inspect}"
|
1876
|
+
|
1877
|
+
|
1713
1878
|
```
|
1714
1879
|
|
1715
1880
|
## Running Integration Tests
|
data/lib/blockchyp/version.rb
CHANGED
data/lib/blockchyp.rb
CHANGED
@@ -139,6 +139,16 @@ module BlockChyp
|
|
139
139
|
def text_prompt(request)
|
140
140
|
route_terminal_request('POST', '/api/text-prompt', '/api/text-prompt', request)
|
141
141
|
end
|
142
|
+
|
143
|
+
# Returns a list of queued transactions on a terminal.
|
144
|
+
def list_queued_transactions(request)
|
145
|
+
route_terminal_request('POST', '/api/queue/list', '/api/queue/list', request)
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deletes a queued transaction from the terminal.
|
149
|
+
def delete_queued_transaction(request)
|
150
|
+
route_terminal_request('POST', '/api/queue/delete', '/api/queue/delete', request)
|
151
|
+
end
|
142
152
|
|
143
153
|
# Captures a preauthorization.
|
144
154
|
def capture(request)
|
@@ -174,6 +184,11 @@ module BlockChyp
|
|
174
184
|
gateway_request('POST', '/api/send-payment-link', request)
|
175
185
|
end
|
176
186
|
|
187
|
+
# Cancels a payment link.
|
188
|
+
def cancel_payment_link(request)
|
189
|
+
gateway_request('POST', '/api/cancel-payment-link', request)
|
190
|
+
end
|
191
|
+
|
177
192
|
# Retrieves the current status of a transaction.
|
178
193
|
def transaction_status(request)
|
179
194
|
gateway_request('POST', '/api/tx-status', request)
|
@@ -219,5 +234,15 @@ module BlockChyp
|
|
219
234
|
gateway_request('POST', '/api/public-merchant-profile', request)
|
220
235
|
end
|
221
236
|
|
237
|
+
# Deletes a customer record.
|
238
|
+
def delete_customer(request)
|
239
|
+
gateway_request('DELETE', '/api/customer/' + request[:customerId], request)
|
240
|
+
end
|
241
|
+
|
242
|
+
# Deletes a payment token.
|
243
|
+
def delete_token(request)
|
244
|
+
gateway_request('DELETE', '/api/token/' + request[:token], request)
|
245
|
+
end
|
246
|
+
|
222
247
|
end
|
223
248
|
end
|
data/lib/blockchyp_client.rb
CHANGED
data/test/batch_history_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'batch_history_test')
|
24
|
+
test_delay(blockchyp, 'batch_history_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
data/test/boolean_prompt_test.rb
CHANGED
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'boolean_prompt_test')
|
24
|
+
test_delay(blockchyp, 'boolean_prompt_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
prompt: 'Would you like to become a member?',
|
31
31
|
yesCaption: 'Yes',
|
32
32
|
noCaption: 'No'
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 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. Changes to this file will be lost
|
7
|
+
# every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class CancelPaymentLinkTest < TestCase
|
13
|
+
def test_cancel_payment_link
|
14
|
+
config = load_test_config
|
15
|
+
|
16
|
+
blockchyp = BlockChyp.new(
|
17
|
+
config[:apiKey],
|
18
|
+
config[:bearerToken],
|
19
|
+
config[:signingKey]
|
20
|
+
)
|
21
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
22
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
|
+
|
24
|
+
test_delay(blockchyp, 'cancel_payment_link_test', config[:defaultTerminalName])
|
25
|
+
|
26
|
+
# Set request parameters
|
27
|
+
setup_request = {
|
28
|
+
amount: '199.99',
|
29
|
+
description: 'Widget',
|
30
|
+
subject: 'Widget invoice',
|
31
|
+
transaction: {
|
32
|
+
subtotal: '195.00',
|
33
|
+
tax: '4.99',
|
34
|
+
total: '199.99',
|
35
|
+
items: [
|
36
|
+
{
|
37
|
+
description: 'Widget',
|
38
|
+
price: '195.00',
|
39
|
+
quantity: 1
|
40
|
+
}
|
41
|
+
]
|
42
|
+
},
|
43
|
+
autoSend: true,
|
44
|
+
customer: {
|
45
|
+
customerRef: 'Customer reference string',
|
46
|
+
firstName: 'FirstName',
|
47
|
+
lastName: 'LastName',
|
48
|
+
companyName: 'Company Name',
|
49
|
+
emailAddress: 'support@blockchyp.com',
|
50
|
+
smsNumber: '(123) 123-1231'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
response = blockchyp.send_payment_link(setup_request)
|
55
|
+
|
56
|
+
# Set request parameters
|
57
|
+
request = {
|
58
|
+
linkCode: response[:linkCode]
|
59
|
+
}
|
60
|
+
|
61
|
+
response = blockchyp.cancel_payment_link(request)
|
62
|
+
|
63
|
+
assert_not_nil(response)
|
64
|
+
# response assertions
|
65
|
+
assert(response[:success])
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -21,11 +21,11 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'capture_signature_test')
|
24
|
+
test_delay(blockchyp, 'capture_signature_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
|
-
terminalName:
|
28
|
+
terminalName: config[:defaultTerminalName],
|
29
29
|
sigFormat: SignatureFormat::PNG,
|
30
30
|
sigWidth: 200
|
31
31
|
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 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. Changes to this file will be lost
|
7
|
+
# every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class DeleteCustomerTest < TestCase
|
13
|
+
def test_delete_customer
|
14
|
+
config = load_test_config
|
15
|
+
|
16
|
+
blockchyp = BlockChyp.new(
|
17
|
+
config[:apiKey],
|
18
|
+
config[:bearerToken],
|
19
|
+
config[:signingKey]
|
20
|
+
)
|
21
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
22
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
|
+
|
24
|
+
test_delay(blockchyp, 'delete_customer_test', config[:defaultTerminalName])
|
25
|
+
|
26
|
+
# Set request parameters
|
27
|
+
setup_request = {
|
28
|
+
customer: {
|
29
|
+
firstName: 'Test',
|
30
|
+
lastName: 'Customer',
|
31
|
+
companyName: 'Test Company',
|
32
|
+
emailAddress: 'support@blockchyp.com',
|
33
|
+
smsNumber: '(123) 123-1234'
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
response = blockchyp.update_customer(setup_request)
|
38
|
+
|
39
|
+
# Set request parameters
|
40
|
+
request = {
|
41
|
+
customerId: response[:customer][:id]
|
42
|
+
}
|
43
|
+
|
44
|
+
response = blockchyp.delete_customer(request)
|
45
|
+
|
46
|
+
assert_not_nil(response)
|
47
|
+
# response assertions
|
48
|
+
assert(response[:success])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 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. Changes to this file will be lost
|
7
|
+
# every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class DeleteTokenTest < TestCase
|
13
|
+
def test_delete_token
|
14
|
+
config = load_test_config
|
15
|
+
|
16
|
+
blockchyp = BlockChyp.new(
|
17
|
+
config[:apiKey],
|
18
|
+
config[:bearerToken],
|
19
|
+
config[:signingKey]
|
20
|
+
)
|
21
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
22
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
|
+
|
24
|
+
test_delay(blockchyp, 'delete_token_test', config[:defaultTerminalName])
|
25
|
+
|
26
|
+
# Set request parameters
|
27
|
+
setup_request = {
|
28
|
+
pan: '4111111111111111',
|
29
|
+
test: true
|
30
|
+
}
|
31
|
+
|
32
|
+
response = blockchyp.enroll(setup_request)
|
33
|
+
|
34
|
+
# Set request parameters
|
35
|
+
request = {
|
36
|
+
token: response[:token]
|
37
|
+
}
|
38
|
+
|
39
|
+
response = blockchyp.delete_token(request)
|
40
|
+
|
41
|
+
assert_not_nil(response)
|
42
|
+
# response assertions
|
43
|
+
assert(response[:success])
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'gateway_timeout_test')
|
24
|
+
test_delay(blockchyp, 'gateway_timeout_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
data/test/get_customer_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'get_customer_test')
|
24
|
+
test_delay(blockchyp, 'get_customer_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'merchant_profile_test')
|
24
|
+
test_delay(blockchyp, 'merchant_profile_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'new_transaction_display_test')
|
24
|
+
test_delay(blockchyp, 'new_transaction_display_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
transaction: {
|
31
31
|
subtotal: '35.00',
|
32
32
|
tax: '5.00',
|
data/test/pan_charge_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'pan_charge_test')
|
24
|
+
test_delay(blockchyp, 'pan_charge_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
data/test/pan_enroll_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'pan_enroll_test')
|
24
|
+
test_delay(blockchyp, 'pan_enroll_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
data/test/pan_preauth_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'pan_preauth_test')
|
24
|
+
test_delay(blockchyp, 'pan_preauth_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
data/test/partial_refund_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'partial_refund_test')
|
24
|
+
test_delay(blockchyp, 'partial_refund_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'search_customer_test')
|
24
|
+
test_delay(blockchyp, 'search_customer_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'send_payment_link_test')
|
24
|
+
test_delay(blockchyp, 'send_payment_link_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'simple_batch_close_test')
|
24
|
+
test_delay(blockchyp, 'simple_batch_close_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
data/test/simple_capture_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'simple_capture_test')
|
24
|
+
test_delay(blockchyp, 'simple_capture_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'simple_gift_activate_test')
|
24
|
+
test_delay(blockchyp, 'simple_gift_activate_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
amount: '50.00'
|
31
31
|
}
|
32
32
|
|
data/test/simple_message_test.rb
CHANGED
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'simple_message_test')
|
24
|
+
test_delay(blockchyp, 'simple_message_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
message: 'Thank You For Your Business'
|
31
31
|
}
|
32
32
|
|
data/test/simple_ping_test.rb
CHANGED
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'simple_ping_test')
|
24
|
+
test_delay(blockchyp, 'simple_ping_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName: '
|
29
|
+
terminalName: '$testTerminal'
|
30
30
|
}
|
31
31
|
|
32
32
|
response = blockchyp.ping(request)
|
data/test/simple_refund_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'simple_refund_test')
|
24
|
+
test_delay(blockchyp, 'simple_refund_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'simple_reversal_test')
|
24
|
+
test_delay(blockchyp, 'simple_reversal_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
data/test/simple_void_test.rb
CHANGED
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'simple_void_test')
|
24
|
+
test_delay(blockchyp, 'simple_void_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
@@ -21,11 +21,11 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_charge_test')
|
24
|
+
test_delay(blockchyp, 'terminal_charge_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
|
-
terminalName: '
|
28
|
+
terminalName: '$testTerminal',
|
29
29
|
amount: '25.15',
|
30
30
|
test: true
|
31
31
|
}
|
data/test/terminal_clear_test.rb
CHANGED
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_clear_test')
|
24
|
+
test_delay(blockchyp, 'terminal_clear_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName]
|
30
30
|
}
|
31
31
|
|
32
32
|
response = blockchyp.clear(request)
|
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_ebt_balance_test')
|
24
|
+
test_delay(blockchyp, 'terminal_ebt_balance_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
cardType: CardType::EBT
|
31
31
|
}
|
32
32
|
|
@@ -21,11 +21,11 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_ebt_charge_test')
|
24
|
+
test_delay(blockchyp, 'terminal_ebt_charge_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
|
-
terminalName:
|
28
|
+
terminalName: config[:defaultTerminalName],
|
29
29
|
amount: '25.00',
|
30
30
|
test: true,
|
31
31
|
cardType: CardType::EBT
|
@@ -21,11 +21,11 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_enroll_test')
|
24
|
+
test_delay(blockchyp, 'terminal_enroll_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
|
-
terminalName:
|
28
|
+
terminalName: config[:defaultTerminalName],
|
29
29
|
test: true
|
30
30
|
}
|
31
31
|
|
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_gift_card_balance_test')
|
24
|
+
test_delay(blockchyp, 'terminal_gift_card_balance_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName]
|
30
30
|
}
|
31
31
|
|
32
32
|
response = blockchyp.balance(request)
|
@@ -21,11 +21,11 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_keyed_charge_test')
|
24
|
+
test_delay(blockchyp, 'terminal_keyed_charge_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
|
-
terminalName:
|
28
|
+
terminalName: config[:defaultTerminalName],
|
29
29
|
amount: '11.11',
|
30
30
|
manualEntry: true,
|
31
31
|
test: true
|
@@ -21,11 +21,11 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_manual_ebt_charge_test')
|
24
|
+
test_delay(blockchyp, 'terminal_manual_ebt_charge_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
|
-
terminalName:
|
28
|
+
terminalName: config[:defaultTerminalName],
|
29
29
|
amount: '27.00',
|
30
30
|
test: true,
|
31
31
|
cardType: CardType::EBT,
|
@@ -21,11 +21,11 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_preauth_test')
|
24
|
+
test_delay(blockchyp, 'terminal_preauth_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
|
-
terminalName:
|
28
|
+
terminalName: config[:defaultTerminalName],
|
29
29
|
amount: '15.15',
|
30
30
|
test: true
|
31
31
|
}
|
@@ -21,11 +21,11 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_status_test')
|
24
|
+
test_delay(blockchyp, 'terminal_status_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
|
-
terminalName:
|
28
|
+
terminalName: config[:defaultTerminalName]
|
29
29
|
}
|
30
30
|
|
31
31
|
response = blockchyp.terminal_status(request)
|
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terminal_timeout_test')
|
24
|
+
test_delay(blockchyp, 'terminal_timeout_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
timeout: 1,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
amount: '25.15',
|
31
31
|
test: true
|
32
32
|
}
|
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'terms_and_conditions_test')
|
24
|
+
test_delay(blockchyp, 'terms_and_conditions_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
tcName: 'HIPPA Disclosure',
|
31
31
|
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
32
|
sigFormat: SignatureFormat::PNG,
|
data/test/test_helper.rb
CHANGED
@@ -34,7 +34,7 @@ module BlockChyp
|
|
34
34
|
JSON.parse(content, symbolize_names: true)
|
35
35
|
end
|
36
36
|
|
37
|
-
def test_delay(client, test_name)
|
37
|
+
def test_delay(client, test_name, terminal_name)
|
38
38
|
test_delay = ENV['BC_TEST_DELAY']
|
39
39
|
|
40
40
|
if test_delay
|
@@ -42,7 +42,7 @@ module BlockChyp
|
|
42
42
|
if test_delay_int.positive?
|
43
43
|
request = {
|
44
44
|
test: true,
|
45
|
-
terminalName:
|
45
|
+
terminalName: terminal_name,
|
46
46
|
message: "Running #{test_name} in #{test_delay} seconds.."
|
47
47
|
}
|
48
48
|
response = client.message(request)
|
data/test/text_prompt_test.rb
CHANGED
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'text_prompt_test')
|
24
|
+
test_delay(blockchyp, 'text_prompt_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
promptType: PromptType::EMAIL
|
31
31
|
}
|
32
32
|
|
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'transaction_history_test')
|
24
|
+
test_delay(blockchyp, 'transaction_history_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
setup_request = {
|
@@ -21,7 +21,7 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'update_customer_test')
|
24
|
+
test_delay(blockchyp, 'update_customer_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
@@ -21,12 +21,12 @@ module BlockChyp
|
|
21
21
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
22
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
23
23
|
|
24
|
-
test_delay(blockchyp, 'update_transaction_display_test')
|
24
|
+
test_delay(blockchyp, 'update_transaction_display_test', config[:defaultTerminalName])
|
25
25
|
|
26
26
|
# Set request parameters
|
27
27
|
request = {
|
28
28
|
test: true,
|
29
|
-
terminalName:
|
29
|
+
terminalName: config[:defaultTerminalName],
|
30
30
|
transaction: {
|
31
31
|
subtotal: '35.00',
|
32
32
|
tax: '5.00',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blockchyp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BlockChyp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -25,7 +25,10 @@ files:
|
|
25
25
|
- lib/crypto_utils.rb
|
26
26
|
- test/batch_history_test.rb
|
27
27
|
- test/boolean_prompt_test.rb
|
28
|
+
- test/cancel_payment_link_test.rb
|
28
29
|
- test/capture_signature_test.rb
|
30
|
+
- test/delete_customer_test.rb
|
31
|
+
- test/delete_token_test.rb
|
29
32
|
- test/gateway_timeout_test.rb
|
30
33
|
- test/get_customer_test.rb
|
31
34
|
- test/heartbeat_test.rb
|