blockchyp 2.17.3 → 2.18.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -0
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +6 -1
- data/test/_test.rb +41 -0
- data/test/activate_terminal_test.rb +1 -1
- data/test/add_test_merchant_test.rb +1 -1
- data/test/batch_history_test.rb +1 -1
- data/test/boolean_prompt_test.rb +1 -1
- data/test/cancel_payment_link_test.rb +2 -1
- data/test/capture_signature_test.rb +1 -1
- data/test/deactivate_terminal_test.rb +1 -1
- data/test/delete_branding_asset_test.rb +1 -1
- data/test/delete_customer_test.rb +1 -1
- data/test/delete_media_asset_test.rb +1 -1
- data/test/delete_queued_transaction_test.rb +1 -1
- data/test/delete_slide_show_test.rb +1 -1
- data/test/delete_survey_question_test.rb +1 -1
- data/test/delete_test_merchant_test.rb +1 -1
- data/test/delete_token_test.rb +1 -1
- data/test/empty_branding_asset_test.rb +1 -1
- data/test/empty_slide_show_test.rb +1 -1
- data/test/gateway_timeout_test.rb +1 -1
- data/test/get_customer_test.rb +1 -1
- data/test/get_merchants_test.rb +1 -1
- data/test/invite_merchant_user_test.rb +1 -1
- data/test/link_token_test.rb +1 -1
- data/test/list_queued_transactions_test.rb +1 -1
- data/test/list_terminals_test.rb +1 -1
- data/test/media_asset_test.rb +1 -1
- data/test/media_test.rb +1 -1
- data/test/media_upload_test.rb +1 -1
- data/test/merchant_credential_generation_test.rb +60 -0
- data/test/merchant_invoice_detail_test.rb +1 -1
- data/test/merchant_invoices_test.rb +1 -1
- data/test/merchant_platforms_test.rb +1 -1
- data/test/merchant_profile_test.rb +1 -1
- data/test/merchant_users_test.rb +1 -1
- data/test/new_transaction_display_test.rb +1 -1
- data/test/pan_charge_test.rb +1 -1
- data/test/pan_enroll_test.rb +1 -1
- data/test/pan_preauth_test.rb +4 -4
- data/test/partial_refund_test.rb +1 -1
- data/test/partner_commission_breakdown_test.rb +10 -1
- data/test/partner_statement_detail_test.rb +10 -1
- data/test/partner_statements_test.rb +10 -1
- data/test/payment_link_status_test.rb +1 -1
- data/test/pricing_policy_test.rb +18 -2
- data/test/resend_payment_link_test.rb +2 -1
- data/test/search_customer_test.rb +1 -1
- data/test/send_payment_link_test.rb +1 -1
- data/test/simple_batch_close_test.rb +1 -1
- data/test/simple_capture_test.rb +4 -3
- data/test/simple_gift_activate_test.rb +1 -1
- data/test/simple_locate_test.rb +1 -1
- data/test/simple_message_test.rb +1 -1
- data/test/simple_ping_test.rb +1 -1
- data/test/simple_refund_test.rb +1 -1
- data/test/simple_reversal_test.rb +1 -1
- data/test/simple_void_test.rb +1 -1
- data/test/slide_show_test.rb +1 -1
- data/test/slide_shows_test.rb +1 -1
- data/test/survey_question_test.rb +1 -1
- data/test/survey_questions_test.rb +1 -1
- data/test/survey_results_test.rb +1 -1
- data/test/tc_delete_template_test.rb +1 -1
- data/test/tc_entry_test.rb +1 -1
- data/test/tc_log_test.rb +13 -1
- data/test/tc_template_test.rb +1 -1
- data/test/tc_template_update_test.rb +1 -1
- data/test/tc_templates_test.rb +1 -1
- data/test/terminal_branding_test.rb +1 -1
- data/test/terminal_charge_test.rb +1 -1
- data/test/terminal_clear_test.rb +1 -1
- data/test/terminal_ebt_balance_test.rb +1 -1
- data/test/terminal_ebt_charge_test.rb +1 -1
- data/test/terminal_enroll_test.rb +1 -1
- data/test/terminal_gift_card_balance_test.rb +1 -1
- data/test/terminal_keyed_charge_test.rb +1 -1
- data/test/terminal_manual_ebt_charge_test.rb +1 -1
- data/test/terminal_preauth_test.rb +1 -1
- data/test/terminal_queued_transaction_test.rb +1 -1
- data/test/terminal_status_test.rb +1 -1
- data/test/terminal_timeout_test.rb +1 -1
- data/test/terms_and_conditions_test.rb +1 -1
- data/test/text_prompt_test.rb +1 -1
- data/test/token_metadata_test.rb +1 -1
- data/test/transaction_history_test.rb +1 -1
- data/test/unlink_token_test.rb +1 -1
- data/test/update_branding_asset_test.rb +1 -1
- data/test/update_customer_test.rb +1 -1
- data/test/update_merchant_platforms_test.rb +1 -1
- data/test/update_merchant_test.rb +1 -1
- data/test/update_slide_show_test.rb +1 -1
- data/test/update_survey_question_test.rb +1 -1
- data/test/update_transaction_display_test.rb +1 -1
- data/test/upload_status_test.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbc87adfb0813ca7b9449159dddaf026b0d300a012886bbed50d2688c62ffc4c
|
4
|
+
data.tar.gz: f1dcaebcf805706f6d4539c9e4396799406d02540b3274c898d7216407136073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e33709921a52049f476964d035fc3f1590ebab3d1b524af28266a9456796ee4d1de486e9fe10dd5e78125c2c9be48c4106ac60d5a689a18481eb0b53086c68b7
|
7
|
+
data.tar.gz: 6f5653849ca5332de40aea8ae30ccaa6d972257d1a4a282fc5cf3fdf0be4a0ba9ce3f5f8b56157e3ee702a4a2a9f7ac7234852c824d1cef050de279aeb49b9cb
|
data/README.md
CHANGED
@@ -4204,6 +4204,48 @@ puts "Response: #{response.inspect}"
|
|
4204
4204
|
|
4205
4205
|
```
|
4206
4206
|
|
4207
|
+
#### Merchant Credential Generation
|
4208
|
+
|
4209
|
+
|
4210
|
+
|
4211
|
+
* **API Credential Types:** Partner
|
4212
|
+
* **Required Role:** Partner API Access
|
4213
|
+
|
4214
|
+
This API allows partners to generate API credentials for a merchant.
|
4215
|
+
|
4216
|
+
The `merchantId` is required and must be the id of a valid merchant.
|
4217
|
+
|
4218
|
+
Credentials are not delete protected by default. Pass in `deleteProtected` to enable delete protection.
|
4219
|
+
|
4220
|
+
The optional `notes` field will populate the notes in the credentials.
|
4221
|
+
|
4222
|
+
By default no roles will be assigned unless valid, comma-delimited, role codes are passed in the `roles` field.
|
4223
|
+
|
4224
|
+
|
4225
|
+
|
4226
|
+
|
4227
|
+
```ruby
|
4228
|
+
# frozen_string_literal: true
|
4229
|
+
|
4230
|
+
require 'blockchyp'
|
4231
|
+
|
4232
|
+
blockchyp = BlockChyp::BlockChyp.new(
|
4233
|
+
ENV['BC_API_KEY'],
|
4234
|
+
ENV['BC_BEARER_TOKEN'],
|
4235
|
+
ENV['BC_SIGNING_KEY']
|
4236
|
+
)
|
4237
|
+
|
4238
|
+
# Set request parameters
|
4239
|
+
request = {
|
4240
|
+
}
|
4241
|
+
|
4242
|
+
response = blockchyp.merchantCredentialGeneration(request)
|
4243
|
+
|
4244
|
+
puts "Response: #{response.inspect}"
|
4245
|
+
|
4246
|
+
|
4247
|
+
```
|
4248
|
+
|
4207
4249
|
|
4208
4250
|
|
4209
4251
|
|
@@ -4272,6 +4314,8 @@ Here's the full list with links to their GitHub repositories.
|
|
4272
4314
|
|
4273
4315
|
[Node.js/JavaScript SDK](https://github.com/blockchyp/blockchyp-js)
|
4274
4316
|
|
4317
|
+
[Typescript SDK](https://github.com/blockchyp/blockchyp-ts)
|
4318
|
+
|
4275
4319
|
[Java SDK](https://github.com/blockchyp/blockchyp-java)
|
4276
4320
|
|
4277
4321
|
[.net/C# SDK](https://github.com/blockchyp/blockchyp-csharp)
|
@@ -4283,3 +4327,5 @@ Here's the full list with links to their GitHub repositories.
|
|
4283
4327
|
[Python SDK](https://github.com/blockchyp/blockchyp-python)
|
4284
4328
|
|
4285
4329
|
[iOS (Objective-C/Swift) SDK](https://github.com/blockchyp/blockchyp-ios)
|
4330
|
+
|
4331
|
+
[Rust SDK](https://github.com/blockchyp/blockchyp-rust)
|
data/lib/blockchyp/version.rb
CHANGED
data/lib/blockchyp.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -326,6 +326,11 @@ module BlockChyp
|
|
326
326
|
end
|
327
327
|
|
328
328
|
|
329
|
+
# Generates and returns api credentials for a given merchant.
|
330
|
+
def merchant_credential_generation(request)
|
331
|
+
dashboard_request('POST', '/api/generate-merchant-creds', request)
|
332
|
+
end
|
333
|
+
|
329
334
|
# Adds a test merchant account.
|
330
335
|
def get_merchants(request)
|
331
336
|
dashboard_request('POST', '/api/get-merchants', request)
|
data/test/_test.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2024 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 Test < TestCase
|
13
|
+
def test_
|
14
|
+
|
15
|
+
puts "Running test_..."
|
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
|
+
request = {
|
34
|
+
}
|
35
|
+
|
36
|
+
response = blockchyp.merchant_credential_generation(request)
|
37
|
+
assert_not_nil(response)
|
38
|
+
# response assertions
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/batch_history_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/boolean_prompt_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -60,6 +60,7 @@ module BlockChyp
|
|
60
60
|
|
61
61
|
# Set request parameters
|
62
62
|
request = {
|
63
|
+
test: true,
|
63
64
|
linkCode: response[:linkCode]
|
64
65
|
}
|
65
66
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/delete_token_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/get_customer_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/get_merchants_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/link_token_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/list_terminals_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/media_asset_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/media_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/media_upload_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2024 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 MerchantCredentialGenerationTest < TestCase
|
13
|
+
def test_merchant_credential_generation
|
14
|
+
|
15
|
+
puts "Running test_merchant_credential_generation..."
|
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
|
+
profile = config[:profiles][:partner]
|
30
|
+
blockchyp = BlockChyp.new(
|
31
|
+
profile[:apiKey],
|
32
|
+
profile[:bearerToken],
|
33
|
+
profile[:signingKey]
|
34
|
+
)
|
35
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
36
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
37
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
# Set request parameters
|
42
|
+
setup_request = {
|
43
|
+
dbaName: 'Test Merchant',
|
44
|
+
companyName: 'Test Merchant'
|
45
|
+
}
|
46
|
+
response = blockchyp.add_test_merchant(setup_request)
|
47
|
+
|
48
|
+
# Set request parameters
|
49
|
+
request = {
|
50
|
+
test: true,
|
51
|
+
merchantId: response[:merchantId]
|
52
|
+
}
|
53
|
+
|
54
|
+
response = blockchyp.merchant_credential_generation(request)
|
55
|
+
assert_not_nil(response)
|
56
|
+
# response assertions
|
57
|
+
assert(response[:success])
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/merchant_users_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/pan_charge_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/pan_enroll_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
data/test/pan_preauth_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -35,8 +35,9 @@ module BlockChyp
|
|
35
35
|
pan: '4111111111111111',
|
36
36
|
expMonth: '12',
|
37
37
|
expYear: '2025',
|
38
|
-
amount: '
|
39
|
-
test: true
|
38
|
+
amount: '42.45',
|
39
|
+
test: true,
|
40
|
+
bypassDupeFilter: true
|
40
41
|
}
|
41
42
|
|
42
43
|
response = blockchyp.preauth(request)
|
@@ -53,7 +54,6 @@ module BlockChyp
|
|
53
54
|
assert(!response[:paymentType].empty?)
|
54
55
|
assert(!response[:maskedPan].empty?)
|
55
56
|
assert(!response[:entryMethod].empty?)
|
56
|
-
assert_equal('25.55', response[:authorizedAmount])
|
57
57
|
assert_equal('KEYED', response[:entryMethod])
|
58
58
|
end
|
59
59
|
end
|
data/test/partial_refund_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -26,6 +26,15 @@ module BlockChyp
|
|
26
26
|
blockchyp.dashboard_host = config[:dashboardHost]
|
27
27
|
|
28
28
|
|
29
|
+
profile = config[:profiles][:partner]
|
30
|
+
blockchyp = BlockChyp.new(
|
31
|
+
profile[:apiKey],
|
32
|
+
profile[:bearerToken],
|
33
|
+
profile[:signingKey]
|
34
|
+
)
|
35
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
36
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
37
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
29
38
|
|
30
39
|
|
31
40
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -26,6 +26,15 @@ module BlockChyp
|
|
26
26
|
blockchyp.dashboard_host = config[:dashboardHost]
|
27
27
|
|
28
28
|
|
29
|
+
profile = config[:profiles][:partner]
|
30
|
+
blockchyp = BlockChyp.new(
|
31
|
+
profile[:apiKey],
|
32
|
+
profile[:bearerToken],
|
33
|
+
profile[:signingKey]
|
34
|
+
)
|
35
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
36
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
37
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
29
38
|
|
30
39
|
|
31
40
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-
|
3
|
+
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
6
|
# This file was generated automatically by the BlockChyp SDK Generator.
|
@@ -26,6 +26,15 @@ module BlockChyp
|
|
26
26
|
blockchyp.dashboard_host = config[:dashboardHost]
|
27
27
|
|
28
28
|
|
29
|
+
profile = config[:profiles][:partner]
|
30
|
+
blockchyp = BlockChyp.new(
|
31
|
+
profile[:apiKey],
|
32
|
+
profile[:bearerToken],
|
33
|
+
profile[:signingKey]
|
34
|
+
)
|
35
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
36
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
37
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
29
38
|
|
30
39
|
|
31
40
|
|