-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from blockchyp/feature/CHYP-3620
Added merchant application submission
- Loading branch information
1 parent
d99ef45
commit 35bd131
Showing
5 changed files
with
203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
|
||
# populate request parameters. | ||
request = { | ||
"merchantId": "<MERCHANT ID>", | ||
} | ||
|
||
# run the transaction. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
|
||
import blockchyp | ||
|
||
# initialize a client. | ||
client = blockchyp.Client( | ||
api_key=os.environ["BC_API_KEY"], | ||
bearer_token=os.environ["BC_BEARER_TOKEN"], | ||
signing_key=os.environ["BC_SIGNING_KEY"], | ||
) | ||
|
||
# populate request parameters. | ||
request = { | ||
} | ||
|
||
# run the transaction. | ||
response = client.submit_application(request) | ||
|
||
print("Response: %r" % response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is | ||
# governed by a license that can be found in the LICENSE file. | ||
# | ||
# This file was generated automatically by the BlockChyp SDK Generator. Changes | ||
# to this file will be lost every time the code is regenerated. | ||
import os | ||
import os.path | ||
import time | ||
import uuid | ||
import pkg_resources | ||
|
||
import pytest | ||
|
||
import blockchyp | ||
|
||
from .util import _get_test_client, _get_test_config | ||
|
||
|
||
@pytest.mark.itest | ||
def test_submit_application(): | ||
"""Can submit an application to add a new merchant.""" | ||
|
||
|
||
terminal = _get_test_config().get("defaultTerminalName") | ||
|
||
|
||
client = _get_test_client("partner") | ||
|
||
request = { | ||
"test": True, | ||
"inviteCode": "asdf", | ||
"dbaName": "BlockChyp", | ||
"corporateName": "BlockChyp Inc.", | ||
"webSite": "https://www.blockchyp.com", | ||
"taxIdNumber": "123456789", | ||
"entityType": "CORPORATION", | ||
"stateOfIncorporation": "UT", | ||
"merchantType": "RETAIL", | ||
"businessDescription": "Payment processing solutions", | ||
"yearsInBusiness": "5", | ||
"businessPhoneNumber": "5555551234", | ||
"physicalAddress": { | ||
"address1": "355 S 520 W", | ||
"city": "Lindon", | ||
"stateOrProvince": "UT", | ||
"postalCode": "84042", | ||
"countryCode": "US", | ||
}, | ||
"mailingAddress": { | ||
"address1": "355 S 520 W", | ||
"city": "Lindon", | ||
"stateOrProvince": "UT", | ||
"postalCode": "84042", | ||
"countryCode": "US", | ||
}, | ||
"contactFirstName": "John", | ||
"contactLastName": "Doe", | ||
"contactPhoneNumber": "5555555678", | ||
"contactEmail": "john.doe@example.com", | ||
"contactTitle": "CEO", | ||
"contactTaxIdNumber": "987654321", | ||
"contactDOB": "1980-01-01", | ||
"contactDlNumber": "D1234567", | ||
"contactDlStateOrProvince": "NY", | ||
"contactDlExpiration": "2025-12-31", | ||
"contactHomeAddress": { | ||
"address1": "355 S 520 W", | ||
"city": "Lindon", | ||
"stateOrProvince": "UT", | ||
"postalCode": "84042", | ||
"countryCode": "US", | ||
}, | ||
"contactRole": "OWNER", | ||
"owners": [ | ||
{ | ||
"firstName": "John", | ||
"lastName": "Doe", | ||
"jobTitle": "CEO", | ||
"taxIdNumber": "876543210", | ||
"phoneNumber": "5555559876", | ||
"dob": "1981-02-02", | ||
"ownership": "50", | ||
"email": "john.doe@example.com", | ||
"dlNumber": "D7654321", | ||
"dlStateOrProvince": "UT", | ||
"dlExpiration": "2024-12-31", | ||
"address": { | ||
"address1": "355 S 520 W", | ||
"city": "Lindon", | ||
"stateOrProvince": "UT", | ||
"postalCode": "84042", | ||
"countryCode": "US", | ||
}, | ||
}, | ||
], | ||
"manualAccount": { | ||
"name": "Business Checking", | ||
"bank": "Test Bank", | ||
"accountHolderName": "BlockChyp Inc.", | ||
"routingNumber": "124001545", | ||
"accountNumber": "987654321", | ||
}, | ||
"averageTransaction": "100.00", | ||
"highTransaction": "1000.00", | ||
"averageMonth": "10000.00", | ||
"highMonth": "20000.00", | ||
"refundPolicy": "30_DAYS", | ||
"refundDays": "30", | ||
"timeZone": "America/Denver", | ||
"batchCloseTime": "23:59", | ||
"multipleLocations": "false", | ||
"ebtRequested": "false", | ||
"ecommerce": "true", | ||
"cardPresentPercentage": "70", | ||
"phoneOrderPercentage": "10", | ||
"ecomPercentage": "20", | ||
"signerName": "John Doe", | ||
} | ||
|
||
response = client.submit_application(request) | ||
print("Response: %r" % response) | ||
|
||
assert response.get("success") is True |