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.
This is a simple api wrapper that implements both asynchronous and synchronous http requests to interact with Paystack APIs.
PayStackEase API Library is a Python library that simplifies interacting with the Paystack API. It provides both asynchronous and synchronous wrappers for various Paystack functionalities, making it easier to integrate payment processing into your Python projects.
📝: Read more on paystack api documentation: Paystack API DOCUMENTATION
📝: Read more on paystackease api documentation: PayStackEase DOCUMENTATION
You should create a Paystack account to generate a Paystack Secret Key. You can see this in the settings page >> API keys and Webhook section.
⚠️: Warning: Do not expose your secret key or commit your secret key to git, or use them in client-side code.
💡: Take Note: Public key is to be used from your front-end when integrating using Paystack Inline. In this case you have to use you secret key
✅: Good: Set your secret key in environment variables as seen: PAYSTACK_SECRET_KEY=your-secret-key
For Windows:
Create virtual environment
py -m venv <environment_name>
Activate the virtual environment
<environment_name>\Scripts\activate
For Unix/macOS
Create virtual environment
python3 -m venv <environment_name>
Activate the virtual environment
<environment_name>/bin/activate
pip install paystackease
pipx install paystackease
poetry add paystackease
Download the wheel distribution file and install using pip
pip install paystackease-2.0.0-py3-none-any.whl
Download the source distribution file, and install using pip
pip install paystackease-2.0.0.tar.gz
Clone from the dev
branch GitHub repository, unzip and install:
git clone -b dev https://github.com/cla-bit/PayStackEase.git
cd PayStackEase
pip install paystackease
If after setting your secret key in environment variables, for a synchronous transaction process all you need to do is use the transaction API to make a transaction.
To create a transaction or initialize a transaction:
from paystackease import PayStackBase
paystack_client = PayStackBase()
create_transaction = paystack_client.transactions.initialize(
email="johndoe@email.com",
amount=10000000)
print(f"Transaction Created: {create_transaction}")
✅: Good: You can check your Paystack account, go to the Transaction page, and you will see the transaction just created.
Similar to calling the PayStackBase, you can also call other tools to make your work easy. For example:
from paystackease import AccountType
val1 = AccountType.PERSONAL.value
print(val1)
"personal"
from paystackease import convert_to_subunit
# amount should be in subunit in this case 10000 kobo = 100 naira
money = convert_to_subunit(100, Currency.NGN)
print(money)
10000
from paystackease import Channels
bank = Channels.BANK.value
print(bank)
"bank"
from paystackease import Currency
val1 = Currency.NGN.value
print(val1)
"NGN"
from paystackease import DocumentType
val1 = DocumentType.IDENTITY_NUMBER.value
print(val1)
"identityNumber"
Others are: EventType, Interval, MobileMoney, PWT, QRCODE, RecipientType, ResendOTP, Resolution, RiskAction, SplitType, STATUS, etc.
FAQs
This is a simple api wrapper that implements both asynchronous and synchronous http requests to interact with Paystack APIs.
We found that paystackease 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.