Juno Python
Project description
Juno Python Library
The Juno Python library provides integration access to the Juno Gateway.
Installing
This lib can be found on pip. To install it, use:
$ pip install juno-python
Documentation
Quick Start Example
import juno
juno.init(
client_id="CLIENT_ID_JUNO",
client_secret="CLIENT_SECRET_JUNO",
resource_token="RESOURCE_TOKEN_JUNO",
sandbox=False,
)
result_charge = juno.charge.create(
{
"charge": {
"description": "Description",
"amount": "100.00",
"references": [""],
"payment_types": ["CREDIT_CARD"],
},
"billing": {
"name": "Name Test",
"document": "00000000000", # Add a valid CPF
},
}
)
if result_charge.is_success:
result_payment = juno.payment.create(
{
"charge_id": result_charge.charge.id,
"billing": {
"email": "name@test.com", # Add a valid email
"address": { # Add a valid address
"street": "",
"number": "",
"complement": "",
"neighborhood": "",
"city": "",
"state": "",
"post_code": "",
},
"delayed": False, # for capture delayed, use: "delayed": True
},
# if card is attached: "credit_card_details": {"credit_card_id": "id"}
"credit_card_details": {"credit_card_hash": "hash"},
}
)
if result_payment.is_success:
print(f"Success payment: {result_payment.payment.id}")
else:
print(result_payment.errors)
else:
print(result_charge.errors)
Capture Delayed
# ...
juno.payment.capture(result_payment.payment.id, {"charge_id": result_charge.charge.id, "amount": "100.00"})
Support
If you have any problem or suggestion please open an issue here.
License
Check here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
juno-python-0.2.2.tar.gz
(10.0 kB
view hashes)
Built Distribution
Close
Hashes for juno_python-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e882d863042d8ef7fde3a06426a36e700bae5c0d353cf4f1b93c65d560b4083 |
|
MD5 | bb62260cdd4030eb9c164df1c045e932 |
|
BLAKE2b-256 | b2eb1d35c4d6e829a1541142e8c0a48560a5c30d7ecf8975fd418e34c8e98b69 |