mtnmomo 0.1.9

MTN Momo Payment API for Rust, with support for both the Sandbox and Production environments. All products are supported: Collections, Disbursements and Remittances.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[doc(hidden)]
use reqwest::Body;

#[doc(hidden)]
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct DeliveryNotification {
    #[serde(rename = "notificationMessage")]
    pub notification_message: String,
}

impl From<DeliveryNotification> for Body {
    fn from(delivery_notification: DeliveryNotification) -> Self {
        Body::from(serde_json::to_string(&delivery_notification).unwrap())
    }
}