blockchyp 2.3.2 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d481215ba0fe7d5cee061463d93274a0d8f088fdec08a0a6cb8236c47366917
4
- data.tar.gz: fab48021f9c4d0afd995a2027d65125d13e7827eb427389729292be5cee2083c
3
+ metadata.gz: 84600e7a021f154105d836a1de1e8b91d61b938b29bfc56d61301ca6c03abff6
4
+ data.tar.gz: ba8d5e4fffb814af4171aae03ad55f204ee9abd0d9d8fbc49681b91bd71aba39
5
5
  SHA512:
6
- metadata.gz: 78ea652f19b13953b7c6b146416eaff3120709756e4231dd70c656069d08bc1ac4dd18969cd2bfc83dcd82d0b5d5a18efea3290ff7ac9b817f7b6fec4b87c33e
7
- data.tar.gz: 7d9d412d62e19e33ba6f1b057ca6f21b2ff3c3d74c6ef1213fbc0868a8bd904390d9214d49e8b518a26fdaf4b7e2e730fea9fddc945b284097834204645bd477
6
+ metadata.gz: d3d544fecac3fe221cb8a3afa65d7a835999385c48782be5e6cbd7c62821781b52b4b6c3bb5c63a373096ae083be2f451f70e8fef0f7670ae4bef19d621dd989
7
+ data.tar.gz: 9c5b14f4bf92c016da7ea7d901d5fabd8afb5f668449ab92fb6813e1979caf849bff0d37368c893f801b83f534c014a7eda9c4b7e8c115a270b7deab2303da63
data/README.md CHANGED
@@ -49,35 +49,11 @@ end
49
49
 
50
50
 
51
51
 
52
- ## The Rest APIs
52
+ ## Additional Documentation
53
53
 
54
- All BlockChyp SDKs provide a convenient way of accessing the BlockChyp REST APIs.
55
- You can checkout the REST API documentation via the links below.
54
+ Complete documentation can be found on our [Developer Documentation Portal].
56
55
 
57
- [Terminal REST API Docs](https://docs.blockchyp.com/rest-api/terminal/index.html)
58
-
59
- [Gateway REST API Docs](https://docs.blockchyp.com/rest-api/gateway/index.html)
60
-
61
- ## Other SDKs
62
-
63
- BlockChyp has officially supported SDKs for eight different development platforms and counting.
64
- Here's the full list with links to their GitHub repositories.
65
-
66
- [Go SDK](https://github.com/blockchyp/blockchyp-go)
67
-
68
- [Node.js/JavaScript SDK](https://github.com/blockchyp/blockchyp-js)
69
-
70
- [Java SDK](https://github.com/blockchyp/blockchyp-java)
71
-
72
- [.net/C# SDK](https://github.com/blockchyp/blockchyp-csharp)
73
-
74
- [Ruby SDK](https://github.com/blockchyp/blockchyp-ruby)
75
-
76
- [PHP SDK](https://github.com/blockchyp/blockchyp-php)
77
-
78
- [Python SDK](https://github.com/blockchyp/blockchyp-python)
79
-
80
- [iOS (Objective-C/Swift) SDK](https://github.com/blockchyp/blockchyp-ios)
56
+ [Developer Documentation Portal]: https://docs.blockchyp.com/
81
57
 
82
58
  ## Getting a Developer Kit
83
59
 
@@ -110,7 +86,7 @@ If you get a positive response, you've successfully verified all of the followin
110
86
 
111
87
  * The terminal is online.
112
88
  * There is a valid route to the terminal.
113
- * The API Credential are valid.
89
+ * The API Credentials are valid.
114
90
 
115
91
 
116
92
 
@@ -171,7 +147,7 @@ might be maliciously running on the point-of-sale system.
171
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.
172
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.
173
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.
174
- * **Prompting for Tips**: Set the `promptForTips` flag if you'd like to prompt the customer for a tip before authorization. Good for pay-at-the-table and other services related scenarios.
150
+ * **Prompting for Tips**: Set the `promptForTips` flag if you'd like to prompt the customer for a tip before authorization. Good for pay-at-the-table and other service related scenarios.
175
151
  * **Cash Discounting and Surcharging**: The `surcharge` and `cashDiscount` flags can be used together to support cash discounting or surcharge problems. Consult the Cash Discount documentation for more details.
176
152
 
177
153
 
@@ -206,8 +182,8 @@ puts "Response: #{response.inspect}"
206
182
 
207
183
 
208
184
  A preauthorization puts a hold on funds and must be captured later. This is used
209
- in scenarios where the final transaction amount might change. Examples would
210
- be fine dining where a tip adjustment is required prior to capture or hotels
185
+ in scenarios where the final transaction amount might change. A common examples would
186
+ be fine dining where a tip adjustment is required prior to final settlement.
211
187
 
212
188
  Another use case for preauthorization is e-commerce. Typically, an online order
213
189
  is preauthorized at the time of the order and then captured when the order ships.
@@ -317,14 +293,14 @@ returned in a BlockChyp response. To refund the full amount of the previous tra
317
293
 
318
294
  **Partial Refunds**
319
295
 
320
- For a partial refund, just passing an amount along with the Transaction ID.
296
+ For a partial refund, just pass in an amount along with the Transaction ID.
321
297
  The only rule is that the amount has to be equal to or less than the original
322
- transaction. You can even execute multiple partial refunds against the same
323
- original transaction as long as the total refunded amount doesn't exceed the original transaction.
298
+ transaction. You can execute multiple partial refunds against the same
299
+ original transaction as long as the total refunded amount doesn't exceed the original amount.
324
300
 
325
301
  **Tokenized Refunds**
326
302
 
327
- You can also use a token to execute a refund. Just pass in a token instead
303
+ You can also use a token to execute a refund. Pass in a token instead
328
304
  of the Transaction ID along with the desired refund amount.
329
305
 
330
306
  **Free Range Refunds**
@@ -332,10 +308,10 @@ of the Transaction ID along with the desired refund amount.
332
308
  When you execute a refund without referencing a previous transaction, we
333
309
  call this a *free range refund*.
334
310
 
335
- We don't recommend it, but it is permitted. Just pass in a
336
- Terminal Name and an amount.
311
+ We don't recommend it, but it is permitted. If you absolutely insist on
312
+ doing it, pass in a Terminal Name and an amount.
337
313
 
338
- You can even execute a manual or keyed refund by passing the `manual` flag
314
+ You can execute a manual or keyed refund by passing the `manual` flag
339
315
  to a free range refund request.
340
316
 
341
317
  **Gift Card Refunds**
@@ -370,7 +346,6 @@ blockchyp = BlockChyp::BlockChyp.new(
370
346
 
371
347
  # Set request parameters
372
348
  request = {
373
- "terminalName": 'Test Terminal',
374
349
  "transactionId": '<PREVIOUS TRANSACTION ID>',
375
350
 
376
351
  # Optional amount for partial refunds.
@@ -479,13 +454,13 @@ are retried during shaky network conditions.
479
454
  We highly recommend developers use this API whenever a charge, preauth, or refund transaction times out. If you don't receive a definitive response
480
455
  from BlockChyp, you can't be certain about whether or not the transaction went through.
481
456
 
482
- A best practice in this situation is to send a time out reversal request. Time out reversals check for a transaction and void it if it exists.
457
+ The best practice in this situation is to send a time out reversal request. Time out reversals check for a transaction and void it if it exists.
483
458
 
484
459
  The only caveat is that developers must use the `transactionRef` property (`txRef` for the CLI) when executing charge, preauth, and refund transactions.
485
460
 
486
461
  The reason for this requirement is that if a system never receives a definitive
487
462
  response for a transaction, the system would never have received the BlockChyp
488
- generated Transaction ID. We have to fallback to transaction ref to identify
463
+ generated Transaction ID. We have to fallback to Transaction Ref to identify
489
464
  a transaction.
490
465
 
491
466
 
@@ -522,7 +497,7 @@ Just pass in the terminal name and the amount to add to the card.
522
497
  Once the customer swipes their card, the terminal will use keys
523
498
  on the mag stripe to add value to the card.
524
499
 
525
- You don't need to handle a new gift card or a gift card recharge any
500
+ You don't need to handle a new gift card activation or a gift card recharge any
526
501
  differently. The terminal firmware will figure out what to do on its
527
502
  own and also returns the new balance for the gift card.
528
503
 
@@ -532,8 +507,7 @@ use gift card numbers. This means they can't be stolen.
532
507
 
533
508
  BlockChyp identifies cards with an elliptic curve public key instead.
534
509
  Gift card transactions are actually blocks signed with those keys.
535
- This means there are no shared secrets sent over the network with
536
- BlockChyp gift cards.
510
+ This means there are no shared secrets sent over the network.
537
511
  To keep track of a BlockChyp gift card, hang on to the **public key** returned
538
512
  during gift card activation. That's the gift card's elliptic curve public key.
539
513
 
@@ -555,7 +529,7 @@ voiding or reversing a conventional payment transaction.
555
529
  BlockChyp does have the ability to import gift card liability from
556
530
  conventional gift card platforms. Unfortunately, BlockChyp does not
557
531
  support activating cards on third party systems, but you can import
558
- your outstanding gift cards and customerSearch can swipe them on the
532
+ your outstanding gift cards and customers can swipe them on the
559
533
  terminals just like BlockChyp's standard gift cards.
560
534
 
561
535
  No special coding is required to access this feature. The gateway and
@@ -564,8 +538,10 @@ terminal firmware handle everything for you.
564
538
  **Third Party Gift Card Networks**
565
539
 
566
540
  BlockChyp does not currently provide any native support for other gift card
567
- platforms beyond importing gift card liability. We do have a white listing system however that be used support your own custom gift card implementations. We have a security review
568
- process before we allow a BIN range to be white listed, so contact support@blockchyp.com if you need to white list a BIN range.
541
+ platforms beyond importing gift card liability. We do have a white listing system
542
+ that can be used to support your own custom gift card implementations. We have a security review
543
+ process before we allow a BIN range to be white listed, so contact
544
+ support@blockchyp.com if you need to white list a BIN range.
569
545
 
570
546
 
571
547
 
@@ -612,11 +588,11 @@ briefly on the terminal screen and the API response will include the gift card's
612
588
  All EBT transactions require a PIN, so in order to check an EBT card balance,
613
589
  you need to pass in the `ebt` flag just like you would for a normal EBT
614
590
  charge transaction. The customer will be prompted to swipe their card and
615
- enter a PIN code. If everything checks out, the remaining balance on the card will be displayed on terminal for the customer and returned in the API.
591
+ enter a PIN code. If everything checks out, the remaining balance on the card will be displayed on the terminal for the customer and returned in the API.
616
592
 
617
593
  **Testing Gift Card Balance Checks**
618
594
 
619
- Test gift card balance checks works no differently than live gift cards. You
595
+ Test gift card balance checks work no differently than live gift cards. You
620
596
  must activate a test gift card first in order to test balance checks. Test
621
597
  gift cards are real blockchain cards that live on our parallel test blockchain.
622
598
 
@@ -656,7 +632,7 @@ puts "Response: #{response.inspect}"
656
632
  #### Close Batch
657
633
 
658
634
 
659
- This API will close the merchant's batch, if it's currently open.
635
+ This API will close the merchant's batch if it's currently open.
660
636
 
661
637
  By default, merchant batches will close automatically at 3 AM in their
662
638
  local time zone. The automatic batch closure time can be changed
@@ -703,43 +679,54 @@ more control over the look of the email message, you can omit the `autoSend`
703
679
  flag and send the customer email yourself.
704
680
 
705
681
  There are a lot of optional parameters for this API, but at a minimum
706
- you'll need to pass in a total, customer name, and email address.
682
+ you'll need to pass in a total, customer name, and email address. (Unless
683
+ you use the `cashier` flag.)
707
684
 
708
685
  **Customer Info**
709
686
 
710
- You must specify a customer, either by creating a new customer record inline
711
- or by passing in an existing Customer ID or Customer Ref.
687
+ Unless you're using the `cashier` flag, you must specify a customer, either by
688
+ creating a new customer record inline or by passing in an existing Customer ID or Customer Ref.
712
689
 
713
690
  **Line Item Level Data**
714
691
 
715
692
  It's not strictly required, but we strongly recommend sending line item level
716
- data with every request. It will make the invoice look a little more complete
693
+ detail with every request. It will make the invoice look a little more complete
717
694
  and the data format for line item level data is the exact same format used
718
695
  for terminal line item display, so the same code can be used to support both areas.
719
696
 
720
697
  **Descriptions**
721
698
 
722
- You can also send a free form description or message that's displayed near
699
+ You can also provide a free form description or message that's displayed near
723
700
  the bottom of the invoice. Usually this is some kind of thank you note
724
- or instructions.
701
+ or instruction.
725
702
 
726
703
  **Terms and Conditions**
727
704
 
728
705
  You can include long form contract language with a request and capture
729
706
  terms and conditions acceptance at the same time payment is captured.
730
707
 
731
- The interface is identical to that used for the terminal based terms and
732
- conditions API in that you can pass in content directly via `tcContent` or via
733
- a preconfigured template via `tcAlias`. The terms and conditions log will also be updated when
734
- terms and conditions acceptance is incorporated into a send link request.
708
+ The interface is identical to that used for the terminal based Terms and
709
+ Conditions API in that you can pass in content directly via `tcContent` or via
710
+ a preconfigured template via `tcAlias`. The Terms and Conditions log will also be updated when
711
+ agreement acceptance is incorporated into a send link request.
735
712
 
736
713
  **Auto Send**
737
714
 
738
- By default, BlockChyp does not send the email notification automatically. This is
739
- really just a safeguard to prevent real emails from going out when you may not expect it.
715
+ BlockChyp does not send the email notification automatically. This is
716
+ a safeguard to prevent real emails from going out when you may not expect it.
740
717
  If you want BlockChyp to send the email for you, just add the `autoSend` flag with
741
718
  all requests.
742
719
 
720
+ **Cashier Facing Card Entry**
721
+
722
+ BlockChyp can be used to generate internal/cashier facing card entry pages as well. This is
723
+ designed for situations where you might need to take a phone order and you don't
724
+ have a terminal.
725
+
726
+ If you pass in the `cashier` flag, no email will be sent and you'll be be able to
727
+ load the link in a browser or iframe for payment entry. When the `cashier` flag
728
+ is used, the `autoSend` flag will be ignored.
729
+
743
730
  **Payment Notifications**
744
731
 
745
732
  When a customer successfully submits payment, the merchant will receive an email
@@ -747,7 +734,7 @@ notifying them that the payment was received.
747
734
 
748
735
  **Real Time Callback Notifications**
749
736
 
750
- Email notifications are fine, but you may also want your system to be informed
737
+ Email notifications are fine, but you may want your system to be informed
751
738
  immediately whenever a payment event occurs. By using the optional `callbackUrl` request
752
739
  property, you can specify a URL to which the Authorization Response will be posted
753
740
  every time the user submits a payment, whether approved or otherwise.
@@ -757,7 +744,7 @@ same format as all BlockChyp charge and preauth transaction responses.
757
744
 
758
745
  **Status Polling**
759
746
 
760
- If real time callbacks aren't practical or necesary in your environment, you can
747
+ If real time callbacks aren't practical or necessary in your environment, you can
761
748
  always use the Transaction Status API described below.
762
749
 
763
750
  A common use case for the send link API with status polling is curbside pickup.
@@ -899,7 +886,7 @@ will also return the timestamp of the last status change in the `since` field.
899
886
 
900
887
  If the system is running a payment transaction and you wisely passed in a
901
888
  Transaction Ref, this API will also return the Transaction Ref of the in progress
902
- transaction in the response.
889
+ transaction.
903
890
 
904
891
 
905
892
 
@@ -932,7 +919,7 @@ puts "Response: #{response.inspect}"
932
919
 
933
920
 
934
921
  This API allows you to prompt a customer to accept a legal agreement on the terminal
935
- and optionally capture their signature.
922
+ and (usually) capture their signature.
936
923
 
937
924
  Content for the agreement can be specified in two ways. You can reference a
938
925
  previously configured T&C template or pass in the full agreement text with every request.
@@ -953,12 +940,12 @@ pass in the contract text. Note that only plain text is supported.
953
940
  **Bypassing Signatures**
954
941
 
955
942
  Signature images are captured by default. If for some reason this doesn't fit your
956
- use case and you'd like to capture acceptance without actually capturing a signature image set
943
+ use case and you'd like to capture acceptance without actually capturing a signature image, set
957
944
  the `disableSignature` flag in the request.
958
945
 
959
946
  **Terms & Conditions Log**
960
947
 
961
- Every time a user accepts an agreement on the terminal the signature image (if captured),
948
+ Every time a user accepts an agreement on the terminal, the signature image (if captured),
962
949
  will be uploaded to the gateway and added to the log along with the full text of the
963
950
  agreement. This preserves the historical record in the event that standard agreements
964
951
  or templates change over time.
@@ -1365,7 +1352,7 @@ puts "Response: #{response.inspect}"
1365
1352
  Adds or updates a customer record.
1366
1353
 
1367
1354
  If you pass in customer information including `firstName`, `lastName`, `email`,
1368
- `email`, or `sms` without any Customer ID or Customer Ref, a new record will
1355
+ or `sms` without any Customer ID or Customer Ref, a new record will
1369
1356
  be created.
1370
1357
 
1371
1358
  If you pass in `customerRef` and `customerId`, the customer record will be updated
@@ -1526,6 +1513,198 @@ response = blockchyp.cashDiscount(request)
1526
1513
  puts "Response: #{response.inspect}"
1527
1514
 
1528
1515
 
1516
+ ```
1517
+
1518
+ #### Batch History
1519
+
1520
+
1521
+
1522
+ This endpoint allows developers to query the gateway for the merchant's batch history.
1523
+ The data will be returned in descending order of open date with the most recent
1524
+ batch returned first. The results will include basic information about the batch.
1525
+ For more detail about a specific batch, consider using the Batch Details API.
1526
+
1527
+ **Limiting Results**
1528
+
1529
+ This API will return a maximum of 250 results. Use the `maxResults` property to
1530
+ limit maximum results even further and use the `startIndex` property to
1531
+ page through results that span multiple queries.
1532
+
1533
+ For example, if you want the ten most recent batches, just pass in a value of
1534
+ `10` for `maxResults`. Also note that `startIndex` is zero based. Use a value of `0` to
1535
+ get the first batch in the dataset.
1536
+
1537
+ **Filtering By Date Range**
1538
+
1539
+ You can also filter results by date. Use the `startDate` and `endDate`
1540
+ properties to return only those batches opened between those dates.
1541
+ You can use either `startDate` and `endDate` and you can use date filters
1542
+ in conjunction with `maxResults` and `startIndex`
1543
+
1544
+
1545
+
1546
+
1547
+ ```ruby
1548
+ # frozen_string_literal: true
1549
+
1550
+ require 'blockchyp'
1551
+
1552
+ blockchyp = BlockChyp::BlockChyp.new(
1553
+ ENV['BC_API_KEY'],
1554
+ ENV['BC_BEARER_TOKEN'],
1555
+ ENV['BC_SIGNING_KEY']
1556
+ )
1557
+
1558
+ # Set request parameters
1559
+ request = {
1560
+ "maxResults": 250,
1561
+ "startIndex": 1
1562
+ }
1563
+
1564
+ response = blockchyp.batchHistory(request)
1565
+
1566
+ puts "Response: #{response.inspect}"
1567
+
1568
+
1569
+ ```
1570
+
1571
+ #### Batch Details
1572
+
1573
+
1574
+
1575
+ This endpoint allows developers to pull down details for a specific batch,
1576
+ including captured volume, gift card activity, expected deposit, and
1577
+ captured volume broken down by terminal.
1578
+
1579
+ The only required request parameter is `batchId`. Batch IDs are returned
1580
+ with every transaction response and can also be discovered using the Batch
1581
+ History API.
1582
+
1583
+
1584
+
1585
+
1586
+ ```ruby
1587
+ # frozen_string_literal: true
1588
+
1589
+ require 'blockchyp'
1590
+
1591
+ blockchyp = BlockChyp::BlockChyp.new(
1592
+ ENV['BC_API_KEY'],
1593
+ ENV['BC_BEARER_TOKEN'],
1594
+ ENV['BC_SIGNING_KEY']
1595
+ )
1596
+
1597
+ # Set request parameters
1598
+ request = {
1599
+ "batchId": 'BATCHID'
1600
+ }
1601
+
1602
+ response = blockchyp.batchDetails(request)
1603
+
1604
+ puts "Response: #{response.inspect}"
1605
+
1606
+
1607
+ ```
1608
+
1609
+ #### Transaction History
1610
+
1611
+
1612
+
1613
+ This endpoint provides a number of different methods to sift through
1614
+ transaction history.
1615
+
1616
+ By default with no filtering properties, this endpoint will return the 250
1617
+ most recent transactions.
1618
+
1619
+ **Limiting Results**
1620
+
1621
+ This API will return a maximum of 250 results in a single query. Use the `maxResults` property
1622
+ to limit maximum results even further and use the `startIndex` property to
1623
+ page through results that span multiple queries.
1624
+
1625
+ For example, if you want the ten most recent batches, just pass in a value of
1626
+ `10` for `maxResults`. Also note that `startIndex` is zero based. Use a value of `0` to
1627
+ get the first transaction in the dataset.
1628
+
1629
+ **Filtering By Date Range**
1630
+
1631
+ You can also filter results by date. Use the `startDate` and `endDate`
1632
+ properties to return only transactions run between those dates.
1633
+ You can use either `startDate` or `endDate` and you can use date filters
1634
+ in conjunction with `maxResults` and `startIndex`
1635
+
1636
+ **Filtering By Batch**
1637
+
1638
+ To restrict results to a single batch, pass in the `batchId` parameter.
1639
+
1640
+ **Filtering By Terminal**
1641
+
1642
+ To restrict results to those executed on a single terminal, just
1643
+ pass in the terminal name.
1644
+
1645
+ **Combining Filters**
1646
+
1647
+ None of the above filters are mutually exclusive. You can combine any of the
1648
+ above properties in a single request to restrict transaction results to a
1649
+ narrower set of results.
1650
+
1651
+
1652
+
1653
+
1654
+ ```ruby
1655
+ # frozen_string_literal: true
1656
+
1657
+ require 'blockchyp'
1658
+
1659
+ blockchyp = BlockChyp::BlockChyp.new(
1660
+ ENV['BC_API_KEY'],
1661
+ ENV['BC_BEARER_TOKEN'],
1662
+ ENV['BC_SIGNING_KEY']
1663
+ )
1664
+
1665
+ # Set request parameters
1666
+ request = {
1667
+ "maxResults": 10
1668
+ }
1669
+
1670
+ response = blockchyp.transactionHistory(request)
1671
+
1672
+ puts "Response: #{response.inspect}"
1673
+
1674
+
1675
+ ```
1676
+
1677
+ #### Merchant Profile
1678
+
1679
+
1680
+
1681
+ Returns detailed metadata about the merchant's configuraton, including
1682
+ basic identity information, terminal settings, store and forward settings,
1683
+ and bank account information for merchants that support split settlement.
1684
+
1685
+
1686
+
1687
+
1688
+ ```ruby
1689
+ # frozen_string_literal: true
1690
+
1691
+ require 'blockchyp'
1692
+
1693
+ blockchyp = BlockChyp::BlockChyp.new(
1694
+ ENV['BC_API_KEY'],
1695
+ ENV['BC_BEARER_TOKEN'],
1696
+ ENV['BC_SIGNING_KEY']
1697
+ )
1698
+
1699
+ # Set request parameters
1700
+ request = {
1701
+ }
1702
+
1703
+ response = blockchyp.merchantProfile(request)
1704
+
1705
+ puts "Response: #{response.inspect}"
1706
+
1707
+
1529
1708
  ```
1530
1709
 
1531
1710
  ## Running Integration Tests
@@ -1582,3 +1761,24 @@ Copyright BlockChyp, Inc., 2019
1582
1761
  Distributed under the terms of the [MIT] license, blockchyp-ruby is free and open source software.
1583
1762
 
1584
1763
  [MIT]: https://github.com/blockchyp/blockchyp-ruby/blob/master/LICENSE
1764
+
1765
+ ## Other SDKs
1766
+
1767
+ BlockChyp has officially supported SDKs for eight different development platforms and counting.
1768
+ Here's the full list with links to their GitHub repositories.
1769
+
1770
+ [Go SDK](https://github.com/blockchyp/blockchyp-go)
1771
+
1772
+ [Node.js/JavaScript SDK](https://github.com/blockchyp/blockchyp-js)
1773
+
1774
+ [Java SDK](https://github.com/blockchyp/blockchyp-java)
1775
+
1776
+ [.net/C# SDK](https://github.com/blockchyp/blockchyp-csharp)
1777
+
1778
+ [Ruby SDK](https://github.com/blockchyp/blockchyp-ruby)
1779
+
1780
+ [PHP SDK](https://github.com/blockchyp/blockchyp-php)
1781
+
1782
+ [Python SDK](https://github.com/blockchyp/blockchyp-python)
1783
+
1784
+ [iOS (Objective-C/Swift) SDK](https://github.com/blockchyp/blockchyp-ios)
@@ -191,5 +191,25 @@ module BlockChyp
191
191
  gateway_request('POST', '/api/cash-discount', request)
192
192
  end
193
193
 
194
+ # Returns the batch history for a merchant.
195
+ def batch_history(request)
196
+ gateway_request('POST', '/api/batch-history', request)
197
+ end
198
+
199
+ # Returns the batch details for a single batch.
200
+ def batch_details(request)
201
+ gateway_request('POST', '/api/batch-details', request)
202
+ end
203
+
204
+ # Returns the transaction history for a merchant.
205
+ def transaction_history(request)
206
+ gateway_request('POST', '/api/tx-history', request)
207
+ end
208
+
209
+ # Returns profile information for a merchant.
210
+ def merchant_profile(request)
211
+ gateway_request('POST', '/api/public-merchant-profile', request)
212
+ end
213
+
194
214
  end
195
215
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlockChyp
4
- VERSION = '2.3.2'
4
+ VERSION = '2.3.7'
5
5
  end
@@ -0,0 +1,48 @@
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 BatchHistoryTest < TestCase
13
+ def test_batch_history
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, 'batch_history_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
+ "maxResults": 10
39
+ }
40
+
41
+ response = blockchyp.batch_history(request)
42
+
43
+ assert_not_nil(response)
44
+ # response assertions
45
+ assert(response['success'])
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,38 @@
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 MerchantProfileTest < TestCase
13
+ def test_merchant_profile
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, 'merchant_profile_test')
25
+
26
+ # Set request parameters
27
+ request = {
28
+ "test": true
29
+ }
30
+
31
+ response = blockchyp.merchant_profile(request)
32
+
33
+ assert_not_nil(response)
34
+ # response assertions
35
+ assert(response['success'])
36
+ end
37
+ end
38
+ end
@@ -43,8 +43,6 @@ module BlockChyp
43
43
  assert_not_nil(response)
44
44
  # response assertions
45
45
  assert(response['success'])
46
- assert(!response['capturedTotal'].empty?)
47
- assert(!response['openPreauths'].empty?)
48
46
  end
49
47
  end
50
48
  end
@@ -0,0 +1,48 @@
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 TransactionHistoryTest < TestCase
13
+ def test_transaction_history
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, 'transaction_history_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
+ "maxResults": 10
39
+ }
40
+
41
+ response = blockchyp.transaction_history(request)
42
+
43
+ assert_not_nil(response)
44
+ # response assertions
45
+ assert(response['success'])
46
+ end
47
+ end
48
+ 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.3.2
4
+ version: 2.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlockChyp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-05 00:00:00.000000000 Z
11
+ date: 2020-07-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -23,11 +23,13 @@ files:
23
23
  - lib/blockchyp/version.rb
24
24
  - lib/blockchyp_client.rb
25
25
  - lib/crypto_utils.rb
26
+ - test/batch_history_test.rb
26
27
  - test/boolean_prompt_test.rb
27
28
  - test/capture_signature_test.rb
28
29
  - test/gateway_timeout_test.rb
29
30
  - test/get_customer_test.rb
30
31
  - test/heartbeat_test.rb
32
+ - test/merchant_profile_test.rb
31
33
  - test/new_transaction_display_test.rb
32
34
  - test/pan_charge_test.rb
33
35
  - test/pan_enroll_test.rb
@@ -56,6 +58,7 @@ files:
56
58
  - test/terms_and_conditions_test.rb
57
59
  - test/test_helper.rb
58
60
  - test/text_prompt_test.rb
61
+ - test/transaction_history_test.rb
59
62
  - test/update_customer_test.rb
60
63
  - test/update_transaction_display_test.rb
61
64
  homepage: https://github.com/blockchyp/blockchyp-ruby