Skip to content

Commit b54d24d

Browse files
committed
chore: update env variables
1 parent e7e122d commit b54d24d

22 files changed

+115
-98
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
CLIENT_KEY=""
2-
CLIENT_SECRET=""
1+
CONSUMER_KEY=""
2+
COMSUMER_SECRET=""

.github/workflows/general.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
name: Test
1111
runs-on: ubuntu-latest
1212
env:
13-
CLIENT_KEY: ${{ secrets.CLIENT_KEY }}
14-
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
13+
CONSUMER_KEY: ${{ secrets.CLIENT_KEY }}
14+
CONSUMER_SECRET: ${{ secrets.CLIENT_SECRET }}
1515
steps:
1616
- uses: actions/checkout@v2
1717
- uses: actions-rs/toolchain@v1
@@ -58,8 +58,8 @@ jobs:
5858
name: Code coverage
5959
runs-on: ubuntu-latest
6060
env:
61-
CLIENT_KEY: ${{ secrets.CLIENT_KEY }}
62-
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
61+
CONSUMER_KEY: ${{ secrets.CONSUMER_KEY }}
62+
CONSUMER_SECRET: ${{ secrets.CONSUMER_SECRET }}
6363
steps:
6464
- name: Checkout repository
6565
uses: actions/checkout@v2
@@ -73,5 +73,5 @@ jobs:
7373
- name: Run cargo-tarpaulin
7474
uses: actions-rs/[email protected]
7575
with:
76-
args: '--ignore-tests --no-fail-fast'
77-
version: '0.22.0'
76+
args: "--ignore-tests --no-fail-fast"
77+
version: "0.22.0"

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ use mpesa::Mpesa;
3838

3939
### Creating a `Mpesa` client
4040

41-
You will first need to create an instance of the `Mpesa` instance (the client). You are required to provide a **CLIENT_KEY** and
42-
**CLIENT_SECRET**. [Here](https://developer.safaricom.co.ke/test_credentials) is how you can get these credentials for the Safaricom sandbox
41+
You will first need to create an instance of the `Mpesa` instance (the client). You are required to provide a **CONSUMER_KEY** and
42+
**CONSUMER_SECRET**. [Here](https://developer.safaricom.co.ke/test_credentials) is how you can get these credentials for the Safaricom sandbox
4343
environment. It's worth noting that these credentials are only valid in the sandbox environment. To go live and get production keys
4444
read the docs [here](https://developer.safaricom.co.ke/docs?javascript#going-live).
4545

@@ -53,8 +53,8 @@ async fn main() {
5353
dotenv::dotenv().ok();
5454

5555
let client = Mpesa::new(
56-
env!("CLIENT_KEY"),
57-
env!("CLIENT_SECRET"),
56+
env!("CONSUMER_KEY"),
57+
env!("CONSUMER_SECRET"),
5858
Environment::Sandbox,
5959
);
6060

@@ -76,8 +76,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
7676
dotenv::dotenv().ok();
7777

7878
let client = Mpesa::new(
79-
env!("CLIENT_KEY"),
80-
env!("CLIENT_SECRET"),
79+
env!("CONSUMER_KEY"),
80+
env!("CONSUMER_SECRET"),
8181
Environment::from_str("sandbox")?, // or
8282
// Environment::try_from("sandbox")?,
8383
);
@@ -124,8 +124,8 @@ async fn main() {
124124
dotenv::dotenv().ok();
125125

126126
let client = Mpesa::new(
127-
env!("CLIENT_KEY"),
128-
env!("CLIENT_SECRET"),
127+
env!("CONSUMER_KEY"),
128+
env!("CONSUMER_SECRET"),
129129
CustomEnvironment,
130130
);
131131
}
@@ -142,8 +142,8 @@ async fn main() {
142142
dotenv::dotenv().ok();
143143

144144
let client = Mpesa::new(
145-
env!("CLIENT_KEY"),
146-
env!("CLIENT_SECRET"),
145+
env!("CONSUMER_KEY"),
146+
env!("CONSUMER_SECRET"),
147147
Environment::Sandbox,
148148
);
149149

@@ -177,8 +177,8 @@ The table below shows all the MPESA APIs from Safaricom and those supported by t
177177

178178
**Collins Muriuki**
179179

180-
- Twitter: [@c12i\_](https://twitter.com/c12i_)
181-
- Not affiliated with Safaricom.
180+
- Twitter: [@c12i\_](https://twitter.com/c12i_)
181+
- Not affiliated with Safaricom.
182182

183183
## Contributing
184184

docs/client/account_balance.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Returns an `AccountBalanceBuilder` for enquiring the balance on an MPESA BuyGood
66
Safaricom API docs [reference](https://developer.safaricom.co.ke/APIs/AccountBalance)
77

88
# Example
9+
910
```rust
1011
use mpesa::{Mpesa, Environment};
1112

@@ -14,8 +15,8 @@ async fn main() {
1415
dotenv::dotenv().ok();
1516

1617
let client = Mpesa::new(
17-
env!("CLIENT_KEY"),
18-
env!("CLIENT_SECRET"),
18+
env!("CONSUMER_KEY"),
19+
env!("CONSUMER_SECRET"),
1920
Environment::Sandbox,
2021
);
2122

docs/client/b2b.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Requires an `initiator_name`, the credential/ username used to authenticate the
88
Safaricom API docs [reference](https://developer.safaricom.co.ke/APIs/BusinessPayBill)
99

1010
# Example
11+
1112
```rust
1213
use mpesa::{Mpesa, Environment};
1314

@@ -16,8 +17,8 @@ async fn main() {
1617
dotenv::dotenv().ok();
1718

1819
let client = Mpesa::new(
19-
env!("CLIENT_KEY"),
20-
env!("CLIENT_SECRET"),
20+
env!("CONSUMER_KEY"),
21+
env!("CONSUMER_SECRET"),
2122
Environment::Sandbox,
2223
);
2324

docs/client/b2c.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Returns a `B2cBuilder` for building a B2C transaction struct.
44
Safaricom the API docs [reference](https://developer.safaricom.co.ke/APIs/BusinessToCustomer).
55

66
# Example
7+
78
```rust
89
use mpesa::{Mpesa, Environment};
910

@@ -12,8 +13,8 @@ async fn main() {
1213
dotenv::dotenv().ok();
1314

1415
let client = Mpesa::new(
15-
env!("CLIENT_KEY"),
16-
env!("CLIENT_SECRET"),
16+
env!("CONSUMER_KEY"),
17+
env!("CONSUMER_SECRET"),
1718
Environment::Sandbox,
1819
);
1920

docs/client/bill_manager/bulk_invoice.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Creates a `BulkInvoiceBuilder` which allows you to send invoices to your custome
33
Safaricom API docs [reference](https://developer.safaricom.co.ke/APIs/BillManager)
44

55
# Example
6+
67
```rust,ignore
78
use mpesa::{Mpesa, Environment, Invoice, InvoiceItem};
89
use chrono::prelude::Utc;
@@ -12,8 +13,8 @@ async fn main() {
1213
dotenv::dotenv().ok();
1314
1415
let client = Mpesa::new(
15-
env!("CLIENT_KEY"),
16-
env!("CLIENT_SECRET"),
16+
env!("CONSUMER_KEY"),
17+
env!("CONSUMER_SECRET"),
1718
Environment::Sandbox,
1819
);
1920

docs/client/bill_manager/cancel_invoice.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Creates a `CancelInvoiceBuilder` which allows you to recall a sent invoice.
33
Safaricom API docs [reference](https://developer.safaricom.co.ke/APIs/BillManager)
44

55
# Example
6+
67
```rust,ignore
78
use mpesa::{Mpesa, Environment, SendRemindersTypes};
89
use chrono::prelude::Utc;
@@ -12,8 +13,8 @@ async fn main() {
1213
dotenv::dotenv().ok();
1314
1415
let client = Mpesa::new(
15-
env!("CLIENT_KEY"),
16-
env!("CLIENT_SECRET"),
16+
env!("CONSUMER_KEY"),
17+
env!("CONSUMER_SECRET"),
1718
Environment::Sandbox,
1819
);
1920

docs/client/bill_manager/onboard.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Creates a `OnboardBuilder` which allows you to opt in as a biller to the bill ma
33
Safaricom API docs [reference](https://developer.safaricom.co.ke/APIs/BillManager)
44

55
# Example
6+
67
```rust,ignore
78
use mpesa::{Mpesa, Environment, SendRemindersTypes};
89
@@ -11,8 +12,8 @@ async fn main() {
1112
dotenv::dotenv().ok();
1213
1314
let client = Mpesa::new(
14-
env!("CLIENT_KEY"),
15-
env!("CLIENT_SECRET"),
15+
env!("CONSUMER_KEY"),
16+
env!("CONSUMER_SECRET"),
1617
Environment::Sandbox,
1718
);
1819

docs/client/bill_manager/onboard_modify.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Creates a `OnboardModifyBuilder` which allows you to opt in as a biller to the b
33
Safaricom API docs [reference](https://developer.safaricom.co.ke/APIs/BillManager)
44

55
# Example
6+
67
```rust,ignore
78
use mpesa::{Mpesa, Environment, SendRemindersTypes};
89
@@ -11,8 +12,8 @@ async fn main() {
1112
dotenv::dotenv().ok();
1213
1314
let client = Mpesa::new(
14-
env!("CLIENT_KEY"),
15-
env!("CLIENT_SECRET"),
15+
env!("CONSUMER_KEY"),
16+
env!("CONSUMER_SECRET"),
1617
Environment::Sandbox,
1718
);
1819

0 commit comments

Comments
 (0)