Trait mpesa::MpesaSecurity[][src]

pub trait MpesaSecurity {
    fn gen_security_credentials(&self) -> MpesaResult<String>;
}
Expand description

Trait responsible for implementation of security configs for Mpesa

Required methods

fn gen_security_credentials(&self) -> MpesaResult<String>[src]

Expand description

Generates security credentials M-Pesa Core authenticates a transaction by decrypting the security credentials. Security credentials are generated by encrypting the base64 encoded initiator password with M-Pesa’s public key, a X509 certificate. Returns base64 encoded string.

Error

Returns EncryptionError variant of MpesaError

Implementors