Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
The Dischub Python SDK allows developers to easily integrate with the Dischub API for online payment processing. This SDK provides a simple interface for creating payments via the Dischub API.
You can install the Dischub SDK using pip:
pip install dischub
Copy and paste code below as a function called "payment" in your functions' file
from dischub import Dischub
def payment():
data = {
"api_key" : "your-api-key",
"sender": "sender-dischub-account-email-@gmail.com",
"recipient": "your-dischub-business-account-email-@gmail.com",
"amount": 100,
"currency": "USD",
}
payment_instance = Dischub()
response = payment_instance.create_payment(data)
print(response)
payment()
If your integration is done so well, you will get the below response
{'status': 'success', 'message': 'payment initiated', 'response_code': 200}
if you miss one or more keys in the data dictionary, you will get below response
{'status': 'error', 'message': 'missing or invalid required keys', 'response_code': 400}
if you upload currency type other than 'USD' and 'ZWG' on the currency key in the data dictionary, you will get below response
{'status': 'error', 'message': 'Invalid or unsupported currency', 'response_code': 400}
if use invalid api_key or you Dischub business account email on the api_key or reciepient keys respectively, you will get the below response
{'status': 'error', 'message': 'authorization failed', 'response_code': 401}
FAQs
A Python SDK to initiate online payment to the Dischub API
We found that dischub demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.