blockchyp 2.4.0 → 2.5.0
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/lib/blockchyp/version.rb +1 -1
- data/test/partial_refund_test.rb +51 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1317d0a6cafd6d53ea3497dc9be092cd315b8e42376004e6843cf7def9bab30b
|
4
|
+
data.tar.gz: 88caba33c2f2dad6282f8349b39a58c719e5f5a8cc727e1a8f2c15bfb2ef1cad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d14b2d8be2c5ed48d7166c72abe01b1053178abaf421920e6da531edee47acd1d64968a002156a161a7a5dce8f0be3559df8acdbcfd4265e8b6797b88214ae0
|
7
|
+
data.tar.gz: 8d4354ccb8d224d229170aad7aefa136b0a76094852479adca635650e48bc07c354db94ca1441ab15789fbfcb354fbb702a03ee672e0fdb3b4051142d92e977a
|
data/lib/blockchyp/version.rb
CHANGED
@@ -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 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
|
+
amount: '25.55',
|
30
|
+
test: true,
|
31
|
+
transactionRef: uuid
|
32
|
+
}
|
33
|
+
|
34
|
+
response = blockchyp.charge(setup_request)
|
35
|
+
|
36
|
+
# Set request parameters
|
37
|
+
request = {
|
38
|
+
transactionId: response[:transactionId],
|
39
|
+
amount: '5.00',
|
40
|
+
test: true
|
41
|
+
}
|
42
|
+
|
43
|
+
response = blockchyp.refund(request)
|
44
|
+
|
45
|
+
assert_not_nil(response)
|
46
|
+
# response assertions
|
47
|
+
assert(response[:success])
|
48
|
+
assert(response[:approved])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BlockChyp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-29 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
|