blockchyp 2.2.4 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -0
- data/lib/blockchyp.rb +5 -0
- data/lib/blockchyp/version.rb +1 -1
- data/test/get_customer_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/search_customer_test.rb +2 -2
- data/test/simple_batch_close_test.rb +2 -2
- data/test/simple_capture_test.rb +2 -2
- data/test/simple_refund_test.rb +2 -2
- data/test/simple_reversal_test.rb +2 -2
- data/test/simple_void_test.rb +2 -2
- data/test/terminal_charge_test.rb +1 -1
- data/test/terminal_ebt_charge_test.rb +1 -1
- data/test/terminal_enroll_test.rb +1 -1
- data/test/terminal_keyed_charge_test.rb +1 -1
- data/test/terminal_manual_ebt_charge_test.rb +1 -1
- data/test/terminal_preauth_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9b0bc43922617adfcb4e8f0d20eef4d54a5dac3aee17efd246aaa6789caeac7
|
4
|
+
data.tar.gz: c21e621def8bc145fe223771f205912ea20a0596ade43bf04f1a9c462ba476c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7e80346fa5aef7adacb2d2328cf4639bd937c235a750ab835dfa16a576c26223df9c5ca7fdfec9b1b6f49ab36b13898240cc07660aff3e7b7184e7181e11670
|
7
|
+
data.tar.gz: 5855fa07b214ba2eee7327c93af6eaefd73b2781e1a584658637ba63c89eb12a8af583a6226490fff027a5ea62eee900ba9de41c604f1c413c752b607dbcc699
|
data/README.md
CHANGED
@@ -852,6 +852,34 @@ response = blockchyp.customerSearch(request)
|
|
852
852
|
puts "Response: #{response.inspect}"
|
853
853
|
|
854
854
|
|
855
|
+
```
|
856
|
+
|
857
|
+
#### Cash Discount
|
858
|
+
|
859
|
+
Calculates the discount for actual cash transactions.
|
860
|
+
|
861
|
+
|
862
|
+
```ruby
|
863
|
+
# frozen_string_literal: true
|
864
|
+
|
865
|
+
require 'blockchyp'
|
866
|
+
|
867
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
868
|
+
ENV['BC_API_KEY'],
|
869
|
+
ENV['BC_BEARER_TOKEN'],
|
870
|
+
ENV['BC_SIGNING_KEY']
|
871
|
+
)
|
872
|
+
|
873
|
+
# Set request parameters
|
874
|
+
request = {
|
875
|
+
"amount": '100.00'
|
876
|
+
}
|
877
|
+
|
878
|
+
response = blockchyp.cashDiscount(request)
|
879
|
+
|
880
|
+
puts "Response: #{response.inspect}"
|
881
|
+
|
882
|
+
|
855
883
|
```
|
856
884
|
|
857
885
|
#### Transaction Status
|
data/lib/blockchyp.rb
CHANGED
@@ -176,6 +176,11 @@ module BlockChyp
|
|
176
176
|
gateway_request('POST', '/api/customer-search', request)
|
177
177
|
end
|
178
178
|
|
179
|
+
# Calculates the discount for actual cash transactions.
|
180
|
+
def cash_discount(request)
|
181
|
+
gateway_request('POST', '/api/cash-discount', request)
|
182
|
+
end
|
183
|
+
|
179
184
|
# Retrieves the current status of a transaction.
|
180
185
|
def transaction_status(request)
|
181
186
|
gateway_request('POST', '/api/tx-status', request)
|
data/lib/blockchyp/version.rb
CHANGED
data/test/get_customer_test.rb
CHANGED
@@ -24,7 +24,7 @@ module BlockChyp
|
|
24
24
|
test_delay(blockchyp, 'get_customer_test')
|
25
25
|
|
26
26
|
# Set request parameters
|
27
|
-
|
27
|
+
setup_request = {
|
28
28
|
"customer": {
|
29
29
|
"firstName": 'Test',
|
30
30
|
"lastName": 'Customer',
|
@@ -34,7 +34,7 @@ module BlockChyp
|
|
34
34
|
}
|
35
35
|
}
|
36
36
|
|
37
|
-
response = blockchyp.
|
37
|
+
response = blockchyp.update_customer(setup_request)
|
38
38
|
|
39
39
|
# Set request parameters
|
40
40
|
request = {
|
data/test/pan_charge_test.rb
CHANGED
@@ -42,7 +42,7 @@ module BlockChyp
|
|
42
42
|
assert(!response['transactionId'].empty?)
|
43
43
|
assert(!response['timestamp'].empty?)
|
44
44
|
assert(!response['tickBlock'].empty?)
|
45
|
-
assert_equal('
|
45
|
+
assert_equal('approved', response['responseDescription'])
|
46
46
|
assert(!response['paymentType'].empty?)
|
47
47
|
assert(!response['maskedPan'].empty?)
|
48
48
|
assert(!response['entryMethod'].empty?)
|
data/test/pan_enroll_test.rb
CHANGED
@@ -40,7 +40,7 @@ module BlockChyp
|
|
40
40
|
assert(!response['transactionId'].empty?)
|
41
41
|
assert(!response['timestamp'].empty?)
|
42
42
|
assert(!response['tickBlock'].empty?)
|
43
|
-
assert_equal('
|
43
|
+
assert_equal('approved', response['responseDescription'])
|
44
44
|
assert(!response['paymentType'].empty?)
|
45
45
|
assert(!response['maskedPan'].empty?)
|
46
46
|
assert(!response['entryMethod'].empty?)
|
data/test/pan_preauth_test.rb
CHANGED
@@ -41,7 +41,7 @@ module BlockChyp
|
|
41
41
|
assert(!response['transactionId'].empty?)
|
42
42
|
assert(!response['timestamp'].empty?)
|
43
43
|
assert(!response['tickBlock'].empty?)
|
44
|
-
assert_equal('
|
44
|
+
assert_equal('approved', response['responseDescription'])
|
45
45
|
assert(!response['paymentType'].empty?)
|
46
46
|
assert(!response['maskedPan'].empty?)
|
47
47
|
assert(!response['entryMethod'].empty?)
|
@@ -24,7 +24,7 @@ module BlockChyp
|
|
24
24
|
test_delay(blockchyp, 'search_customer_test')
|
25
25
|
|
26
26
|
# Set request parameters
|
27
|
-
|
27
|
+
setup_request = {
|
28
28
|
"customer": {
|
29
29
|
"firstName": 'Test',
|
30
30
|
"lastName": 'Customer',
|
@@ -34,7 +34,7 @@ module BlockChyp
|
|
34
34
|
}
|
35
35
|
}
|
36
36
|
|
37
|
-
response = blockchyp.
|
37
|
+
response = blockchyp.update_customer(setup_request)
|
38
38
|
|
39
39
|
# Set request parameters
|
40
40
|
request = {
|
@@ -24,14 +24,14 @@ module BlockChyp
|
|
24
24
|
test_delay(blockchyp, 'simple_batch_close_test')
|
25
25
|
|
26
26
|
# Set request parameters
|
27
|
-
|
27
|
+
setup_request = {
|
28
28
|
"pan": '4111111111111111',
|
29
29
|
"amount": '25.55',
|
30
30
|
"test": true,
|
31
31
|
"transactionRef": uuid
|
32
32
|
}
|
33
33
|
|
34
|
-
response = blockchyp.
|
34
|
+
response = blockchyp.charge(setup_request)
|
35
35
|
|
36
36
|
# Set request parameters
|
37
37
|
request = {
|
data/test/simple_capture_test.rb
CHANGED
@@ -24,13 +24,13 @@ module BlockChyp
|
|
24
24
|
test_delay(blockchyp, 'simple_capture_test')
|
25
25
|
|
26
26
|
# Set request parameters
|
27
|
-
|
27
|
+
setup_request = {
|
28
28
|
"pan": '4111111111111111',
|
29
29
|
"amount": '25.55',
|
30
30
|
"test": true
|
31
31
|
}
|
32
32
|
|
33
|
-
response = blockchyp.
|
33
|
+
response = blockchyp.preauth(setup_request)
|
34
34
|
|
35
35
|
# Set request parameters
|
36
36
|
request = {
|
data/test/simple_refund_test.rb
CHANGED
@@ -24,14 +24,14 @@ module BlockChyp
|
|
24
24
|
test_delay(blockchyp, 'simple_refund_test')
|
25
25
|
|
26
26
|
# Set request parameters
|
27
|
-
|
27
|
+
setup_request = {
|
28
28
|
"pan": '4111111111111111',
|
29
29
|
"amount": '25.55',
|
30
30
|
"test": true,
|
31
31
|
"transactionRef": uuid
|
32
32
|
}
|
33
33
|
|
34
|
-
response = blockchyp.
|
34
|
+
response = blockchyp.charge(setup_request)
|
35
35
|
|
36
36
|
# Set request parameters
|
37
37
|
request = {
|
@@ -24,14 +24,14 @@ module BlockChyp
|
|
24
24
|
test_delay(blockchyp, 'simple_reversal_test')
|
25
25
|
|
26
26
|
# Set request parameters
|
27
|
-
|
27
|
+
setup_request = {
|
28
28
|
"pan": '4111111111111111',
|
29
29
|
"amount": '25.55',
|
30
30
|
"test": true,
|
31
31
|
"transactionRef": uuid
|
32
32
|
}
|
33
33
|
|
34
|
-
response = blockchyp.
|
34
|
+
response = blockchyp.charge(setup_request)
|
35
35
|
|
36
36
|
# Set request parameters
|
37
37
|
request = {
|
data/test/simple_void_test.rb
CHANGED
@@ -24,14 +24,14 @@ module BlockChyp
|
|
24
24
|
test_delay(blockchyp, 'simple_void_test')
|
25
25
|
|
26
26
|
# Set request parameters
|
27
|
-
|
27
|
+
setup_request = {
|
28
28
|
"pan": '4111111111111111',
|
29
29
|
"amount": '25.55',
|
30
30
|
"test": true,
|
31
31
|
"transactionRef": uuid
|
32
32
|
}
|
33
33
|
|
34
|
-
response = blockchyp.
|
34
|
+
response = blockchyp.charge(setup_request)
|
35
35
|
|
36
36
|
# Set request parameters
|
37
37
|
request = {
|
@@ -41,7 +41,7 @@ module BlockChyp
|
|
41
41
|
assert(!response['transactionId'].empty?)
|
42
42
|
assert(!response['timestamp'].empty?)
|
43
43
|
assert(!response['tickBlock'].empty?)
|
44
|
-
assert_equal('
|
44
|
+
assert_equal('approved', response['responseDescription'])
|
45
45
|
assert(!response['paymentType'].empty?)
|
46
46
|
assert(!response['maskedPan'].empty?)
|
47
47
|
assert(!response['entryMethod'].empty?)
|
@@ -42,7 +42,7 @@ module BlockChyp
|
|
42
42
|
assert(!response['transactionId'].empty?)
|
43
43
|
assert(!response['timestamp'].empty?)
|
44
44
|
assert(!response['tickBlock'].empty?)
|
45
|
-
assert_equal('
|
45
|
+
assert_equal('approved', response['responseDescription'])
|
46
46
|
assert(!response['paymentType'].empty?)
|
47
47
|
assert(!response['maskedPan'].empty?)
|
48
48
|
assert(!response['entryMethod'].empty?)
|
@@ -40,7 +40,7 @@ module BlockChyp
|
|
40
40
|
assert(!response['transactionId'].empty?)
|
41
41
|
assert(!response['timestamp'].empty?)
|
42
42
|
assert(!response['tickBlock'].empty?)
|
43
|
-
assert_equal('
|
43
|
+
assert_equal('approved', response['responseDescription'])
|
44
44
|
assert(!response['paymentType'].empty?)
|
45
45
|
assert(!response['maskedPan'].empty?)
|
46
46
|
assert(!response['entryMethod'].empty?)
|
@@ -42,7 +42,7 @@ module BlockChyp
|
|
42
42
|
assert(!response['transactionId'].empty?)
|
43
43
|
assert(!response['timestamp'].empty?)
|
44
44
|
assert(!response['tickBlock'].empty?)
|
45
|
-
assert_equal('
|
45
|
+
assert_equal('approved', response['responseDescription'])
|
46
46
|
assert(!response['paymentType'].empty?)
|
47
47
|
assert(!response['maskedPan'].empty?)
|
48
48
|
assert(!response['entryMethod'].empty?)
|
@@ -43,7 +43,7 @@ module BlockChyp
|
|
43
43
|
assert(!response['transactionId'].empty?)
|
44
44
|
assert(!response['timestamp'].empty?)
|
45
45
|
assert(!response['tickBlock'].empty?)
|
46
|
-
assert_equal('
|
46
|
+
assert_equal('approved', response['responseDescription'])
|
47
47
|
assert(!response['paymentType'].empty?)
|
48
48
|
assert(!response['maskedPan'].empty?)
|
49
49
|
assert(!response['entryMethod'].empty?)
|
@@ -41,7 +41,7 @@ module BlockChyp
|
|
41
41
|
assert(!response['transactionId'].empty?)
|
42
42
|
assert(!response['timestamp'].empty?)
|
43
43
|
assert(!response['tickBlock'].empty?)
|
44
|
-
assert_equal('
|
44
|
+
assert_equal('approved', response['responseDescription'])
|
45
45
|
assert(!response['paymentType'].empty?)
|
46
46
|
assert(!response['maskedPan'].empty?)
|
47
47
|
assert(!response['entryMethod'].empty?)
|
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.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BlockChyp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|