Open pipozzz opened 4 years ago
Python API wrapper for Crypto.com Pay Checkout
pip3 install cryptopay
python3 setup.py install
The connection below makes an implicit assumption that you will be using a local enviornment variable to specify the secret key:
export CRYPTOPAY_SECRET_KEY="MY_SECRET_KEY_HERE"
The example above is the command you would set if you were using a Linux Bash terminal.
from pprint import pprint
from cryptopay import Client
client = Client()
response = client.get_payments()
payments = response.json()
pprint(payments)
As an alternative, you can specify the secret key upon instantiation:
from pprint import pprint
from cryptopay import Client
client = Client("MY_SECRET_KEY_HERE")
response = client.get_payments()
payments = response.json()
pprint(payments)
Below is a highlight of all the options possible to be passed to the 'Client' object upon instantiation:
(secret_key=None, api_endpoint_url='https://pay.crypto.com/api', timeout=30, ssl_verify=True, proxies=None):
Friendly attempt to resolve the 'update documentation' issue you have open. I am new to open source contributions so, sorry if I bumble a process or something. Best regards!
describe how to set secret_key for API (env, directly in constructor)
put examples for all actions (create payment, refund payment etc.)