pub fn cred_from_env(env_key: String) -> Result<Secret<String>, AuthError>
Expand description

Helper function that looks for Secret Key from your .env file and returns a Secret<String>.

Example

let key = cred_from_env("SECRET_KEY".to_string()).unwrap();
 
let builder = PaymentBuilder::init_payment(
    "test@example.com".to_string(),
    100.0,
    key,
);
 
Payment(builder).send();