Go
Zeno Package for Go (Golang)
Last updated
Zeno Package for Go (Golang)
Last updated
Effortlessly Integrate Payments with Zenopay
This package is an elegant solution for developers in the Golang community, designed and maintained by Dilunga the Great. The package simplifies interaction with the , making it easy to create payment orders and manage their statuses.
Effortless integration with Zenopay API.
Background polling to check payment statuses.
Customizable callbacks for handling successful or failed payments.
Open-source and community-driven by Dilunga the Great.
Dilunga the Great is a Tanzanian software engineer passionate about empowering people with tools that simplify their work. With expertise in Golang and a strong focus on simplifying tasks through code, he delivers this package to the Golang community to facilitate seamless payment workflows.
Contact Details:
WhatsApp:
Email:
GitHub:
Feel free to reach out for assistance, feedback, or collaboration opportunities!
How It Works
Step 1: Registration with ZenopayTo start using this package, register and verify your account with . After successful registration, you'll receive the following credentials:
Account ID
API Key
Secret Key
Step 2: Install the Package
Before creating a payment, configure the package with your API credentials.
Use the Pay
function to create a payment order. It accepts payment details and a callback function for handling success or failure.
Configures the Zenopay API with your credentials.
Parameters:
accountID
: Your Zenopay account ID.
APIKey
: Your Zenopay API key.
secreteKey
: Your Zenopay secret key.
Parameters:
amount
: Payment amount (string).
name
: Buyer's name.
phone
: Buyer's phone number.
email
: Buyer's email.
callback
: Function called when the payment status is determined.
Returns:
orderID
: Unique identifier for the payment order.
err
: Error, if any.
The package automatically polls the Zenopay API to check the payment status.
Polling Interval: Every 5 seconds.
Timeout: 50 seconds (aligns with Zenopay's USSD session expiry).
The callback
function is invoked when:
The payment succeeds (ok = true
).
The payment fails (ok = false
).
Ensure your callback function handles both success and failure scenarios.
Use secure storage for your API credentials.
Polling runs in the background, so you can scale your HTTP handlers without blocking.
Zenopay automatically expires a user's USSD prompt session after 50 seconds. Polling every 5 seconds is the optimal interval to balance system performance and ensure timely updates.
This package is written by Dilunga the Great for the Golang community and is open source.
Contact:
WhatsApp: +255742920510
Feel free to contribute, report issues, or contact me for further assistance.
"Code is poetry, and simplicity is key." — Dilunga the Great
Happy Coding! 🎉
GitHub Repository:
Zenopay Official Website:
Email:
This package is open-source, created for the Go community by Dilunga the Great. Feel free to contribute, report issues, or suggest enhancements on .