blockchyp 2.4.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/blockchyp.rb +9 -1
- data/lib/blockchyp/version.rb +1 -1
- data/test/batch_history_test.rb +2 -0
- data/test/gateway_timeout_test.rb +2 -0
- data/test/pan_charge_test.rb +2 -0
- data/test/pan_preauth_test.rb +2 -0
- data/test/partial_refund_test.rb +53 -0
- data/test/simple_batch_close_test.rb +2 -0
- data/test/simple_capture_test.rb +2 -0
- data/test/simple_refund_test.rb +2 -0
- data/test/simple_reversal_test.rb +2 -0
- data/test/simple_void_test.rb +2 -0
- data/test/transaction_history_test.rb +2 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ca7677d78c85630b93fb9bf78d789bfe1b725cce8308479081a7976150f7501
|
4
|
+
data.tar.gz: d28a5450a9160b30660c15ecb42b96edd9234b5e6340d2d783063747b9d18826
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543efe438e6fa01ad95cec127f3d029838e9e6436385ed39332c29690921838daafa0605a9a808d2bf4800e2a8952bd4b1c72af535b8543921a893de02137b5b
|
7
|
+
data.tar.gz: 8c7cff2a427c0019351fb4714efe104b383c4f48f74a09138fd005205922a33d759e9c64bbdfb4da64d99cf0ef5169a5bf75e758f30cd7960802440afddd3fb0
|
data/README.md
CHANGED
@@ -143,7 +143,7 @@ might be maliciously running on the point-of-sale system.
|
|
143
143
|
**Common Variations**
|
144
144
|
|
145
145
|
* **Gift Card Redemption**: There's no special API for gift card redemption in BlockChyp. Just execute a plain charge transaction and if the customer happens to swipe a gift card, our terminals will identify the gift card and run a gift card redemption. Also note that if for some reason the gift card's original purchase transaction is associated with fraud or a chargeback, the transaction will be rejected.
|
146
|
-
* **EBT**: Set the `ebt` flag to process an EBT SNAP transaction. Note that test EBT transactions
|
146
|
+
* **EBT**: Set the `ebt` flag to process an EBT SNAP transaction. Note that test EBT transactions always assume a balance of $100.00, so test EBT transactions over that amount may be declined.
|
147
147
|
* **Cash Back**: To enable cash back for debit transactions, set the `cashBack` flag. If the card presented isn't a debit card, the `cashBack` flag will be ignored.
|
148
148
|
* **Manual Card Entry**: Set the `manual` flag to enable manual card entry. Good as a backup when chips and MSR's don't work or for more secure phone orders. You can even combine the `manual` flag with the `ebt` flag for manual EBT card entry.
|
149
149
|
* **Inline Tokenization**: You can enroll the payment method in the token vault inline with a charge transaction by setting the `enroll` flag. You'll get a token back in the response. You can even bind the token to a customer record if you also pass in customer data.
|
@@ -1623,7 +1623,7 @@ most recent transactions.
|
|
1623
1623
|
|
1624
1624
|
**Limiting Results**
|
1625
1625
|
|
1626
|
-
This API will return a maximum of
|
1626
|
+
This API will return a maximum of 50 results in a single query. Use the `maxResults` property
|
1627
1627
|
to limit maximum results even further and use the `startIndex` property to
|
1628
1628
|
page through results that span multiple queries.
|
1629
1629
|
|
data/lib/blockchyp.rb
CHANGED
@@ -42,6 +42,14 @@ module AVSResponse
|
|
42
42
|
ADDRESS_AND_POSTAL_CODE_MATCH = 'match'
|
43
43
|
end
|
44
44
|
|
45
|
+
module CVMType
|
46
|
+
SIGNATURE = 'Signature'
|
47
|
+
OFFLINE_PIN = 'Offline PIN'
|
48
|
+
ONLINE_PIN = 'Online PIN'
|
49
|
+
CDCVM = 'CDCVM'
|
50
|
+
NO_CVM = 'No CVM'
|
51
|
+
end
|
52
|
+
|
45
53
|
module BlockChyp
|
46
54
|
# the main autogenerated blockchyp client
|
47
55
|
class BlockChyp < BlockChypClient
|
@@ -137,7 +145,7 @@ module BlockChyp
|
|
137
145
|
gateway_request('POST', '/api/capture', request)
|
138
146
|
end
|
139
147
|
|
140
|
-
# Discards a previous
|
148
|
+
# Discards a previous transaction.
|
141
149
|
def void(request)
|
142
150
|
gateway_request('POST', '/api/void', request)
|
143
151
|
end
|
data/lib/blockchyp/version.rb
CHANGED
data/test/batch_history_test.rb
CHANGED
data/test/pan_charge_test.rb
CHANGED
data/test/pan_preauth_test.rb
CHANGED
@@ -0,0 +1,53 @@
|
|
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 PartialRefundTest < TestCase
|
13
|
+
def test_partial_refund
|
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, 'partial_refund_test')
|
25
|
+
|
26
|
+
# Set request parameters
|
27
|
+
setup_request = {
|
28
|
+
pan: '4111111111111111',
|
29
|
+
expMonth: '12',
|
30
|
+
expYear: '2025',
|
31
|
+
amount: '25.55',
|
32
|
+
test: true,
|
33
|
+
transactionRef: uuid
|
34
|
+
}
|
35
|
+
|
36
|
+
response = blockchyp.charge(setup_request)
|
37
|
+
|
38
|
+
# Set request parameters
|
39
|
+
request = {
|
40
|
+
transactionId: response[:transactionId],
|
41
|
+
amount: '5.00',
|
42
|
+
test: true
|
43
|
+
}
|
44
|
+
|
45
|
+
response = blockchyp.refund(request)
|
46
|
+
|
47
|
+
assert_not_nil(response)
|
48
|
+
# response assertions
|
49
|
+
assert(response[:success])
|
50
|
+
assert(response[:approved])
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/test/simple_capture_test.rb
CHANGED
data/test/simple_refund_test.rb
CHANGED
data/test/simple_void_test.rb
CHANGED
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.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BlockChyp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -34,6 +34,7 @@ files:
|
|
34
34
|
- test/pan_charge_test.rb
|
35
35
|
- test/pan_enroll_test.rb
|
36
36
|
- test/pan_preauth_test.rb
|
37
|
+
- test/partial_refund_test.rb
|
37
38
|
- test/search_customer_test.rb
|
38
39
|
- test/send_payment_link_test.rb
|
39
40
|
- test/simple_batch_close_test.rb
|
@@ -81,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
82
|
- !ruby/object:Gem::Version
|
82
83
|
version: '0'
|
83
84
|
requirements: []
|
84
|
-
rubygems_version: 3.0.3
|
85
|
+
rubygems_version: 3.0.3.1
|
85
86
|
signing_key:
|
86
87
|
specification_version: 4
|
87
88
|
summary: BlockChyp Ruby SDK
|