blockchyp 2.15.24 → 2.15.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +39 -1
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +5 -0
- data/test/payment_link_status_test.rb +72 -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: 2790b1798c7d64d41af7489dfd7b894f866301be2ef737d8e0258b5ab2511cd4
|
4
|
+
data.tar.gz: 473b3a257d984c8fcd77cc29b710753a3643f7e15e906fe1458f4d139a801671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa9da544a25bba2460dd73ec469fbbfdc832cd4a6a6d95d395fa485888a201c9375e3f38fb9e418b1108ba09d12bf92deb812984fc180f04aa78be83c956898f
|
7
|
+
data.tar.gz: 6d06215d3a5a7e0e3f434a0f9ce97c5e4fb6c4d29b299d6ae7186fe245a4797f5b5d1ca26b0a3a85a1dfbbce45a35c34c74b6f8a6a5859313d5aa8dd4f586470
|
data/README.md
CHANGED
@@ -705,6 +705,8 @@ display additional UI widgets that allowing customers to switch to a crypto paym
|
|
705
705
|
Add the `enroll` flag to a send link request to enroll the payment method
|
706
706
|
in the token vault.
|
707
707
|
|
708
|
+
Add the `enrollOnly` flag to enroll the payment method in the token vault without any immediate payment taking place. The payment link will ask the user for their payment information and inform them that they will not be charged immediately, but that their payment may be used for future transactions.
|
709
|
+
|
708
710
|
**Cashier Facing Card Entry**
|
709
711
|
|
710
712
|
BlockChyp can be used to generate internal/cashier facing card entry pages as well. This is
|
@@ -825,6 +827,42 @@ response = blockchyp.cancelPaymentLink(request)
|
|
825
827
|
puts "Response: #{response.inspect}"
|
826
828
|
|
827
829
|
|
830
|
+
```
|
831
|
+
|
832
|
+
#### Payment Link Status
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
* **API Credential Types:** Merchant
|
837
|
+
* **Required Role:** Payment API Access
|
838
|
+
|
839
|
+
This API allows you to check on the status of a payment link, including transaction data
|
840
|
+
and the full history of attempted transactions.
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
```ruby
|
846
|
+
# frozen_string_literal: true
|
847
|
+
|
848
|
+
require 'blockchyp'
|
849
|
+
|
850
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
851
|
+
ENV['BC_API_KEY'],
|
852
|
+
ENV['BC_BEARER_TOKEN'],
|
853
|
+
ENV['BC_SIGNING_KEY']
|
854
|
+
)
|
855
|
+
|
856
|
+
# Set request parameters
|
857
|
+
request = {
|
858
|
+
linkCode: response[:linkCode]
|
859
|
+
}
|
860
|
+
|
861
|
+
response = blockchyp.paymentLinkStatus(request)
|
862
|
+
|
863
|
+
puts "Response: #{response.inspect}"
|
864
|
+
|
865
|
+
|
828
866
|
```
|
829
867
|
|
830
868
|
#### Transaction Status
|
@@ -1617,7 +1655,7 @@ puts "Response: #{response.inspect}"
|
|
1617
1655
|
* **API Credential Types:** Merchant
|
1618
1656
|
* **Required Role:** Payment API Access
|
1619
1657
|
|
1620
|
-
This API
|
1658
|
+
This API prompts the customer to answer a yes or no question.
|
1621
1659
|
|
1622
1660
|
You can specify the question or prompt with the `prompt` parameter and
|
1623
1661
|
the response is returned in the `response` field.
|
data/lib/blockchyp/version.rb
CHANGED
data/lib/blockchyp.rb
CHANGED
@@ -214,6 +214,11 @@ module BlockChyp
|
|
214
214
|
gateway_request('POST', '/api/cancel-payment-link', request)
|
215
215
|
end
|
216
216
|
|
217
|
+
# Retrieves the status of a payment link.
|
218
|
+
def payment_link_status(request)
|
219
|
+
gateway_request('POST', '/api/payment-link-status', request)
|
220
|
+
end
|
221
|
+
|
217
222
|
# Retrieves the current status of a transaction.
|
218
223
|
def transaction_status(request)
|
219
224
|
gateway_request('POST', '/api/tx-status', request)
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2023 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 by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class PaymentLinkStatusTest < TestCase
|
13
|
+
def test_payment_link_status
|
14
|
+
|
15
|
+
puts "Running test_payment_link_status..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
amount: '199.99',
|
35
|
+
description: 'Widget',
|
36
|
+
subject: 'Widget invoice',
|
37
|
+
transaction: {
|
38
|
+
subtotal: '195.00',
|
39
|
+
tax: '4.99',
|
40
|
+
total: '199.99',
|
41
|
+
items: [
|
42
|
+
{
|
43
|
+
description: 'Widget',
|
44
|
+
price: '195.00',
|
45
|
+
quantity: 1
|
46
|
+
}
|
47
|
+
]
|
48
|
+
},
|
49
|
+
autoSend: true,
|
50
|
+
customer: {
|
51
|
+
customerRef: 'Customer reference string',
|
52
|
+
firstName: 'FirstName',
|
53
|
+
lastName: 'LastName',
|
54
|
+
companyName: 'Company Name',
|
55
|
+
emailAddress: 'notifications@blockchypteam.m8r.co',
|
56
|
+
smsNumber: '(123) 123-1231'
|
57
|
+
}
|
58
|
+
}
|
59
|
+
response = blockchyp.send_payment_link(setup_request)
|
60
|
+
|
61
|
+
# Set request parameters
|
62
|
+
request = {
|
63
|
+
transactionRef: response[:transactionRef]
|
64
|
+
}
|
65
|
+
|
66
|
+
response = blockchyp.payment_link_status(request)
|
67
|
+
assert_not_nil(response)
|
68
|
+
# response assertions
|
69
|
+
assert(response[:success])
|
70
|
+
end
|
71
|
+
end
|
72
|
+
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.15.
|
4
|
+
version: 2.15.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BlockChyp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- test/pan_enroll_test.rb
|
60
60
|
- test/pan_preauth_test.rb
|
61
61
|
- test/partial_refund_test.rb
|
62
|
+
- test/payment_link_status_test.rb
|
62
63
|
- test/search_customer_test.rb
|
63
64
|
- test/send_payment_link_test.rb
|
64
65
|
- test/simple_batch_close_test.rb
|