pesapal-node-sdk
Version:
Node.js SDK for integrating with Pesapal payment gateway. Provides a simple interface for processing payments, checking status, and handling callbacks.
18 lines • 559 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthService = void 0;
class AuthService {
constructor(http, config) {
this.http = http;
this.config = config;
}
async authenticate() {
const response = await this.http.post('/api/Auth/RequestToken', {
consumer_key: this.config.consumerKey,
consumer_secret: this.config.consumerSecret
});
return response.data.token;
}
}
exports.AuthService = AuthService;
//# sourceMappingURL=AuthService.js.map