This repository has been archived by the owner on Dec 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Dependency updates - Unit test updates - CI map updated
- Loading branch information
Antonio Buedo
authored
May 22, 2019
1 parent
3f45611
commit 9654bd4
Showing
7 changed files
with
35 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
language: python | ||
python: 3.4 | ||
python: | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
install: | ||
- pip install . | ||
- pip install -r requirements.txt | ||
script: | ||
- nosetests --with-coverage --cover-package=bitpay --cover-html | ||
- behave | ||
script: | ||
- nosetests --with-coverage --cover-package=bitpay --cover-html | ||
after_success: | ||
- coveralls |
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
import pprint | ||
import requests | ||
import json | ||
import re | ||
import os.path | ||
|
||
#API_HOST = "https://bitpay.com" #for production, live bitcoin | ||
|
@@ -38,7 +37,7 @@ def fetch_token(facade): | |
pairingCode = client.create_token(facade) | ||
print("Creating " + facade + " token.") | ||
print("Please go to: %s/dashboard/merchant/api-tokens then enter \"%s\" then click the \"Find\" button, then click \"Approve\"" % (API_HOST, pairingCode)) | ||
raw_input("When you've complete the above, hit enter to continue...") | ||
input("When you've complete the above, hit enter to continue...") | ||
print("token is: %s" % client.tokens[facade]) | ||
f = open(TOKEN_FILE + facade, 'w') | ||
f.write(client.tokens[facade]) | ||
|
@@ -89,7 +88,7 @@ def post_to_bitpay_api(client, uri, resource, params): | |
print("Creating a payout batch now") | ||
print("token = " + token) | ||
# posting a payout batch | ||
params = {"token":token, "notificationURL":"http://test.merchant.com/IPNlogger.php", "notificationEmail":"[email protected]", "effectiveDate":"2017-08-23", "amount":"400","currency":"USD","instructions":[ {"label":"Test1","address":"mzDTjhkfJfatXHRUWKcE2BXxHt4Pfz2PK7","amount":"300"},{"label":"Test2","address":"mfadguj41aYgEwPATAFnkKcKQNqhpNTrdi","amount":"100"}]} | ||
params = {"token":token, "notificationURL":"https://hookb.in/3OBkOPk23ouKeKj2M2WQ", "effectiveDate":"2019-05-21", "amount":"10","currency":"USD","instructions":[ {"label":"Test1","address":"mx2Wv5j8SrPnxAQtNB3uf8mii1Vc5UDKsZ","amount":"7"},{"label":"Test2","address":"mx2Wv5j8SrPnxAQtNB3uf8mii1Vc5UDKsZ","amount":"3"}]} | ||
payoutBatch = post_to_bitpay_api(client, "https://test.bitpay.com", "payouts", params) | ||
pp.pprint(payoutBatch) | ||
|
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
behave==1.2.5 | ||
ecdsa==0.13 | ||
httmock==1.2.2 | ||
nose==1.3.4 | ||
parse==1.6.6 | ||
parse-type==0.3.4 | ||
pymongo==2.8 | ||
requests==2.5.1 | ||
selenium==2.44.0 | ||
six==1.9.0 | ||
splinter==0.7.0 | ||
virtualenv==12.0.7 | ||
coveralls | ||
certifi==2019.3.9 | ||
chardet==3.0.4 | ||
coverage==4.5.3 | ||
coveralls==1.7.0 | ||
docopt==0.6.2 | ||
ecdsa==0.13.2 | ||
httmock==1.3.0 | ||
idna==2.8 | ||
nose==1.3.7 | ||
parse==1.12.0 | ||
pymongo==3.8.0 | ||
requests==2.21.0 | ||
selenium==3.141.0 | ||
splinter==0.10.0 | ||
urllib3==1.25.2 | ||
virtualenv==16.6.0 |
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