bkash_rs/lib.rs
1//! # bkash-rs
2//!
3//! Idiomatic async-first Rust client for the bKash Payment Gateway API.
4//!
5//! `bkash-rs` provides a strongly-typed, ergonomic interface to the bKash
6//! Payment Gateway. It supports tokenized checkout, classic checkout, payment
7//! authentication & capture, subscriptions, and webhook verification.
8//!
9//! ## Quickstart
10//!
11//! ```no_run
12//! use bkash_rs::prelude::*;
13//! # async fn run() -> Result<(), bkash_rs::Error> {
14//! let bkash = Bkash::builder()
15//! .environment(Environment::Sandbox)
16//! .app_key("your_app_key")
17//! .app_secret("your_app_secret")
18//! .username("your_username")
19//! .password("your_password")
20//! .build()?;
21//! let bkash = Bkash::new(bkash).await?;
22//! # let _ = bkash;
23//! # Ok(())
24//! # }
25//! ```
26//!
27//! ## Features
28//!
29//! - `rustls-tls` (default): Use `rustls` for TLS.
30//! - `native-tls`: Use the platform's native TLS implementation.
31//! - `tokenized-checkout` (default): Enable tokenized checkout endpoints.
32//! - `checkout` (default): Enable classic checkout endpoints.
33//! - `auth-capture`: Enable authorization & capture endpoints.
34//! - `subscriptions`: Enable subscription endpoints.
35//! - `webhooks`: Enable webhook signature verification.
36
37#![deny(missing_docs)]
38#![warn(rust_2018_idioms)]
39
40#[cfg(feature = "auth-capture")]
41pub mod auth_capture;
42#[cfg(feature = "checkout")]
43pub mod checkout;
44pub mod client;
45pub mod config;
46pub mod error;
47pub mod models;
48pub mod prelude;
49#[cfg(feature = "subscriptions")]
50pub mod subscriptions;
51pub mod token;
52#[cfg(feature = "tokenized-checkout")]
53pub mod tokenized;
54pub mod transport;
55#[cfg(feature = "webhooks")]
56pub mod webhooks;
57
58pub use crate::client::Bkash;
59pub use crate::config::{Config, ConfigBuilder, Environment, Product};
60pub use crate::error::{Error, ErrorCode};