blockchyp 2.16.0 → 2.16.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -4
- data/lib/blockchyp/version.rb +1 -1
- data/test/payment_link_status_test.rb +1 -1
- data/test/resend_payment_link_test.rb +25 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49fe4c55af2de1c7aa6e0236d4416b7d83f1283e478cea60250713604aff3e0a
|
4
|
+
data.tar.gz: 285d113837e076bac757f33fdce0ae7fa5793ee3217dd93a0a3590c2e4b6160f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfcb5489b6d1a11e6fa5163f357eaeb1fdf2cab25287e8a11f4c583c05660f1f775db71e432a41c819de0987626be913c07d3afee112f46c603dc152ac471029
|
7
|
+
data.tar.gz: 134f3fc9624de085885d07972165dd78202d1873fde8559dcc1a2fd985513ccf688757d6186e595e9d32d3c898454db26d79a5ce4041d035e2ffb94ec2a287ab
|
data/README.md
CHANGED
@@ -737,10 +737,10 @@ same format as all BlockChyp charge and preauth transaction responses.
|
|
737
737
|
**Status Polling**
|
738
738
|
|
739
739
|
If real time callbacks aren't practical or necessary in your environment, you can
|
740
|
-
always use the
|
740
|
+
always use the Payment Link Status API described futher on.
|
741
741
|
|
742
742
|
A common use case for the send link API with status polling is curbside pickup.
|
743
|
-
You could have your system check the
|
743
|
+
You could have your system check the Payment Link Status when a customer arrives to
|
744
744
|
ensure it's been paid without necessarily needing to create background threads
|
745
745
|
to constantly poll for status updates.
|
746
746
|
|
@@ -875,6 +875,15 @@ puts "Response: #{response.inspect}"
|
|
875
875
|
This API allows you to check on the status of a payment link, including transaction data
|
876
876
|
and the full history of attempted transactions.
|
877
877
|
|
878
|
+
This API is the preferred source of truth and best practice when you want to check on the
|
879
|
+
status of a payment link (as opposed to Transaction Status). The Transaction Status API is not
|
880
|
+
ideal because of ambiguity when there are multiple transactions associated with a single
|
881
|
+
payment link.
|
882
|
+
|
883
|
+
You must pass the `linkCode` value associated with the payment link. It is included in the response from BlockChyp when the payment link is originally created.
|
884
|
+
|
885
|
+
|
886
|
+
|
878
887
|
|
879
888
|
|
880
889
|
|
@@ -891,7 +900,7 @@ blockchyp = BlockChyp::BlockChyp.new(
|
|
891
900
|
|
892
901
|
# Set request parameters
|
893
902
|
request = {
|
894
|
-
linkCode:
|
903
|
+
linkCode: '<PAYMENT LINK CODE>'
|
895
904
|
}
|
896
905
|
|
897
906
|
response = blockchyp.paymentLinkStatus(request)
|
@@ -911,7 +920,7 @@ puts "Response: #{response.inspect}"
|
|
911
920
|
This API returns the current status for any transaction. You can lookup a transaction
|
912
921
|
by its BlockChyp assigned Transaction ID or your own Transaction Ref.
|
913
922
|
|
914
|
-
You should
|
923
|
+
You should always use globally unique Transaction Ref values, but in the event
|
915
924
|
that you duplicate Transaction Refs, the most recent transaction matching your
|
916
925
|
Transaction Ref is returned.
|
917
926
|
|
data/lib/blockchyp/version.rb
CHANGED
@@ -31,9 +31,32 @@ module BlockChyp
|
|
31
31
|
|
32
32
|
# Set request parameters
|
33
33
|
setup_request = {
|
34
|
-
|
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
|
+
}
|
35
58
|
}
|
36
|
-
response = blockchyp.
|
59
|
+
response = blockchyp.send_payment_link(setup_request)
|
37
60
|
|
38
61
|
# Set request parameters
|
39
62
|
request = {
|
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.16.
|
4
|
+
version: 2.16.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BlockChyp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|