Skip to content

Commit

Permalink
Updated service endpoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
lexara-prime-ai committed May 22, 2024
1 parent 26c3f49 commit 3cbe267
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/environment_manager/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ impl<'c> Config<'c> {
match environment {
Environment::Live => Self {
// To do -> Update existing URL with [LIVE] url.
BASE_URL: "https://sandbox.safaricom.co.ke/mpesa/".to_string(),
BASE_URL: "https://sandbox.safaricom.co.ke/".to_string(),
TOKEN: token,
},
Environment::Sandbox => Self {
BASE_URL: "https://sandbox.safaricom.co.ke/mpesa/".to_string(),
BASE_URL: "https://sandbox.safaricom.co.ke/".to_string(),
TOKEN: token,
},
}
Expand Down
7 changes: 3 additions & 4 deletions src/service_endpoints/endpoints.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#![allow(unused)]

/// The following list contains the required URLs.
const AUTHORIZATION_URL: &str =
"https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials";
const CUSTOMER_TO_BUSINESS_URL: &str = "https://sandbox.safaricom.co.ke/mpesa/c2b/v1/registerurl";
const MPESA_EXPRESS_URL: &str = "https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest";
const AUTHORIZATION_URL: &str = "oauth/v1/generate?grant_type=client_credentials";
const CUSTOMER_TO_BUSINESS_URL: &str = "mpesa/c2b/v1/registerurl";
const MPESA_EXPRESS_URL: &str = "mpesa/stkpush/v1/processrequest";

#[derive(Debug, Clone)]
pub enum RequestTypes {
Expand Down

0 comments on commit 3cbe267

Please sign in to comment.