Skip to main content

Crate mpay

Crate mpay 

Source
Expand description

mpay - Machine Payment Protocol for Rust

A Rust library implementing the Web Payment Auth protocol.

§Quick Start

use mpay::{PaymentChallenge, PaymentCredential, Receipt, ChargeRequest};
use mpay::{parse_www_authenticate, format_authorization};

§Signer Integration

use mpay::{Signer, PrivateKeySigner};

Consumers provide their own signer. The library does not manage keystores.

Re-exports§

pub use error::MppError;
pub use error::Result;
pub use error::ResultExt;
pub use error::SigningContext;
pub use error::PaymentError;
pub use error::PaymentErrorDetails;
pub use error::PROBLEM_TYPE_BASE;
pub use protocol::core::ChallengeEcho;
pub use protocol::core::PaymentChallenge;
pub use protocol::core::PaymentCredential;
pub use protocol::core::PaymentPayload;
pub use protocol::core::Receipt;
pub use protocol::core::ReceiptStatus;
pub use protocol::core::format_authorization;
pub use protocol::core::format_receipt;
pub use protocol::core::format_www_authenticate;
pub use protocol::core::format_www_authenticate_many;
pub use protocol::core::parse_authorization;
pub use protocol::core::parse_receipt;
pub use protocol::core::parse_www_authenticate;
pub use protocol::core::parse_www_authenticate_all;
pub use protocol::core::base64url_decode;
pub use protocol::core::base64url_encode;
pub use protocol::core::Base64UrlJson;
pub use protocol::core::IntentName;
pub use protocol::core::MethodName;
pub use protocol::core::PayloadType;
pub use protocol::core::PaymentProtocol;
pub use protocol::core::AUTHORIZATION_HEADER;
pub use protocol::core::PAYMENT_RECEIPT_HEADER;
pub use protocol::core::PAYMENT_SCHEME;
pub use protocol::core::WWW_AUTHENTICATE_HEADER;
pub use protocol::intents::ChargeRequest;

Modules§

error
Error types for the mpp library.
protocol
Payment protocol implementations for Web Payment Auth (IETF draft-ietf-httpauth-payment).
utils
Utility functions for mpay-rs library

Constants§

VERSION