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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49dc32372aabccb3d15971f69deb80b427934ddc9c810fa5e9132c6856b12b90
4
- data.tar.gz: 21ad4be26072a746a7db7494ae60c624f0aab00f17dd6c49e60a3a442578251e
3
+ metadata.gz: 6ca7677d78c85630b93fb9bf78d789bfe1b725cce8308479081a7976150f7501
4
+ data.tar.gz: d28a5450a9160b30660c15ecb42b96edd9234b5e6340d2d783063747b9d18826
5
5
  SHA512:
6
- metadata.gz: b9871571c1d25f338af7a5419ef5c369ab41428d373fa7fabed9d5e94aafea9e5cefa06350bcc65c20d13bcbedd8ef0fe25682c8f1a58e58b70ec6763ff938a8
7
- data.tar.gz: b899f32df715af449cd2a00e8d1c3f0e2d88118259a7d27ccd3708f792da3f04e23dcefd8da27f9a85c6b142e84a2c92a75cdb0e4bd5547cb42374a298499d56
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 alway assume a balance of $100.00, so test EBT transactions over that amount may be declined.
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 250 results in a single query. Use the `maxResults` property
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 preauth transaction.
148
+ # Discards a previous transaction.
141
149
  def void(request)
142
150
  gateway_request('POST', '/api/void', request)
143
151
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlockChyp
4
- VERSION = '2.4.0'
4
+ VERSION = '2.8.1'
5
5
  end
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  setup_request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true,
31
33
  transactionRef: uuid
@@ -27,6 +27,8 @@ module BlockChyp
27
27
  request = {
28
28
  timeout: 1,
29
29
  pan: '5555555555554444',
30
+ expMonth: '12',
31
+ expYear: '2025',
30
32
  amount: '25.55',
31
33
  test: true,
32
34
  transactionRef: uuid
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true,
31
33
  transactionRef: uuid
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true
31
33
  }
@@ -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
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  setup_request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true,
31
33
  transactionRef: uuid
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  setup_request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true
31
33
  }
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  setup_request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true,
31
33
  transactionRef: uuid
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  setup_request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true,
31
33
  transactionRef: uuid
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  setup_request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true,
31
33
  transactionRef: uuid
@@ -26,6 +26,8 @@ module BlockChyp
26
26
  # Set request parameters
27
27
  setup_request = {
28
28
  pan: '4111111111111111',
29
+ expMonth: '12',
30
+ expYear: '2025',
29
31
  amount: '25.55',
30
32
  test: true,
31
33
  transactionRef: uuid
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.0
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: 2020-08-13 00:00:00.000000000 Z
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