Skip to content

Commit ebd82e3

Browse files
committed
import config from config.ts
1 parent f5f83d1 commit ebd82e3

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/paystack-client.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { PaystackResponse, PaystackError } from "./types";
2-
import dotenv from 'dotenv';
2+
import { paystackConfig } from "./config";
33

4-
// Load environment variables
5-
dotenv.config();
6-
7-
const PAYSTACK_BASE_URL = process.env.PAYSTACK_BASE_URL || 'https://api.paystack.co';
4+
const PAYSTACK_BASE_URL = paystackConfig.baseURL;
85
const USER_AGENT = process.env.USER_AGENT || 'Paystack-MCP-Client';
96

107
class PaystackClient {
@@ -87,5 +84,5 @@ class PaystackClient {
8784
}
8885
}
8986
export const paystackClient = new PaystackClient(
90-
process.env.PAYSTACK_TEST_SECRET_KEY!
91-
);
87+
paystackConfig.secretKey
88+
);

0 commit comments

Comments
 (0)