blockchyp 2.15.25 → 2.15.26
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 +36 -0
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +5 -0
- data/test/resend_payment_link_test.rb +49 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3deacf875401f15866ccb30d023d0fea003f9ae2a409097ff2467e4b83626858
|
|
4
|
+
data.tar.gz: cda2f4369908eeaba76d25c98b1bdb8e8ccc7b1f843c5af984cae13c840f728b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91d9ab49675b04289c980d7da4eb5c1dbfe5f6454a8f212c74f4caca781134307453a17699c4a45fac2d8ca946838094d7477f5744c87983e8750673ded26189
|
|
7
|
+
data.tar.gz: 2b5f2b95df428d1bf31a105d99961a262a7d27c5288126212bea1e7bb2de80fab5cef175ad70fdedaf965580d4775dec9a54ad781b5a3a3f98dc0bf7094e1c1f
|
data/README.md
CHANGED
|
@@ -792,6 +792,42 @@ response = blockchyp.sendPaymentLink(request)
|
|
|
792
792
|
puts "Response: #{response.inspect}"
|
|
793
793
|
|
|
794
794
|
|
|
795
|
+
```
|
|
796
|
+
|
|
797
|
+
#### Resend Payment Link
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
* **API Credential Types:** Merchant
|
|
802
|
+
* **Required Role:** Payment API Access
|
|
803
|
+
|
|
804
|
+
This API will resend a previously created payment link. An error is returned if the payment link is expired, has been
|
|
805
|
+
cancelled, or has already been paid.
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
```ruby
|
|
811
|
+
# frozen_string_literal: true
|
|
812
|
+
|
|
813
|
+
require 'blockchyp'
|
|
814
|
+
|
|
815
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
|
816
|
+
ENV['BC_API_KEY'],
|
|
817
|
+
ENV['BC_BEARER_TOKEN'],
|
|
818
|
+
ENV['BC_SIGNING_KEY']
|
|
819
|
+
)
|
|
820
|
+
|
|
821
|
+
# Set request parameters
|
|
822
|
+
request = {
|
|
823
|
+
linkCode: '<PAYMENT LINK CODE>'
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
response = blockchyp.resendPaymentLink(request)
|
|
827
|
+
|
|
828
|
+
puts "Response: #{response.inspect}"
|
|
829
|
+
|
|
830
|
+
|
|
795
831
|
```
|
|
796
832
|
|
|
797
833
|
#### Cancel Payment Link
|
data/lib/blockchyp/version.rb
CHANGED
data/lib/blockchyp.rb
CHANGED
|
@@ -209,6 +209,11 @@ module BlockChyp
|
|
|
209
209
|
gateway_request('POST', '/api/send-payment-link', request)
|
|
210
210
|
end
|
|
211
211
|
|
|
212
|
+
# Resends payment link.
|
|
213
|
+
def resend_payment_link(request)
|
|
214
|
+
gateway_request('POST', '/api/resend-payment-link', request)
|
|
215
|
+
end
|
|
216
|
+
|
|
212
217
|
# Cancels a payment link.
|
|
213
218
|
def cancel_payment_link(request)
|
|
214
219
|
gateway_request('POST', '/api/cancel-payment-link', request)
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ResendPaymentLinkTest < TestCase
|
|
13
|
+
def test_resend_payment_link
|
|
14
|
+
|
|
15
|
+
puts "Running test_resend_payment_link..."
|
|
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
|
+
linkCode: response[:linkCode]
|
|
35
|
+
}
|
|
36
|
+
response = blockchyp.resend_payment_link(setup_request)
|
|
37
|
+
|
|
38
|
+
# Set request parameters
|
|
39
|
+
request = {
|
|
40
|
+
linkCode: response[:linkCode]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
response = blockchyp.resend_payment_link(request)
|
|
44
|
+
assert_not_nil(response)
|
|
45
|
+
# response assertions
|
|
46
|
+
assert(response[:success])
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.26
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- BlockChyp
|
|
@@ -60,6 +60,7 @@ files:
|
|
|
60
60
|
- test/pan_preauth_test.rb
|
|
61
61
|
- test/partial_refund_test.rb
|
|
62
62
|
- test/payment_link_status_test.rb
|
|
63
|
+
- test/resend_payment_link_test.rb
|
|
63
64
|
- test/search_customer_test.rb
|
|
64
65
|
- test/send_payment_link_test.rb
|
|
65
66
|
- test/simple_batch_close_test.rb
|