cert/key from file
This commit is contained in:
10
bbpay.ts
10
bbpay.ts
@@ -11,6 +11,7 @@ import https from 'https';
|
||||
import http from 'http';
|
||||
import debug from 'debug';
|
||||
import axiosDebugLog from 'axios-debug-log';
|
||||
import fs from 'fs';
|
||||
|
||||
// Load environment variables from .env file
|
||||
dotenv.config();
|
||||
@@ -43,6 +44,7 @@ app.use(express.json());
|
||||
class BBPay {
|
||||
protected oauth: AxiosInstance;
|
||||
protected cert: string;
|
||||
protected key: string;
|
||||
protected verifySsl: string;
|
||||
protected baseUrl: string;
|
||||
protected params: any;
|
||||
@@ -60,10 +62,10 @@ class BBPay {
|
||||
},
|
||||
});
|
||||
|
||||
this.cert = 'cert.pem';
|
||||
this.key = 'key.pem'
|
||||
this.verifySsl = 'bb.pem';
|
||||
this.baseUrl = process.env.ITP_API_URL;
|
||||
this.cert = fs.readFileSync('cert.pem').toString();
|
||||
this.key = fs.readFileSync('key.pem').toString();
|
||||
this.verifySsl = fs.readFileSync('bb.pem').toString();
|
||||
this.baseUrl = process.env.ITP_API_URL as string;
|
||||
|
||||
this.params = {
|
||||
numeroConvenio: 701,
|
||||
|
||||
Reference in New Issue
Block a user