Crate paystack_transaction
source ·Expand description
Paystack Transaction
A Simple to use package to use Paystack with Rust
Usage
#[tokio::main]
async fn main() {
let key = cred_from_env("SECRET_KEY".to_string()).unwrap();
let mut builder = Payment::builder(
"test@example.com".to_string(),
100.0,
key,
);
builder.channel(Channel::Card);
builder.label("label".to_string());
builder.reference("reference".to_string());
builder.build().send().await.unwrap();
}Structs
- Mobile money object data
- Data wrapper for payment ready to send for initialization
- Building blocks for initiating a Paystack Payment
Enums
- Authentication Error types
- Available payment channels
- Supported Currencies
- Response Error wrapping error response from Paystack API
Functions
- Helper function that looks for Secret Key from your
.envfile and returns aSecret<String>. - Helper for unmasking
Secretwrapper