Skip to content

Commit

Permalink
Merge pull request #87 from buckaroo-it/develop
Browse files Browse the repository at this point in the history
v1.5.0
  • Loading branch information
ShuCh3n authored Dec 18, 2024
2 parents c987156 + 95bd7b5 commit d3ea45a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@buckaroo/buckaroo_sdk",
"version": "1.4.2",
"version": "1.5.0",
"description": "Buckaroo payment SDK",
"main": "dist/buckaroo.cjs.js",
"module": "dist/buckaroo.esm.js",
Expand Down
4 changes: 2 additions & 2 deletions src/Request/HttpsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default class HttpsClient {
protected _options: AxiosRequestConfig = {};
private _axiosInstance: AxiosInstance;

constructor(agent?: Agent) {
this._options.timeout = 10000;
constructor(agent?: Agent, timeout?: number) {
this._options.timeout = timeout ?? 10000;
this._options.maxRedirects = 10;
this._options.withCredentials = true;

Expand Down
1 change: 1 addition & 0 deletions src/Utils/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export declare interface IConfig {
returnURLReject?: string;
activePaymentMethods?: ServiceCode[];
disabledPaymentMethods?: ServiceCode[];
timeout?: number;
}

export declare interface ICredentials {
Expand Down
2 changes: 1 addition & 1 deletion src/buckaroo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class Buckaroo {
constructor(credentials: ICredentials, config?: IConfig, agent?: Agent) {
this._credentials = new Credentials(credentials.secretKey, credentials.websiteKey);
this._config = { ...(config ?? { mode: 'TEST', currency: 'EUR' }) };
this._httpClient = new HttpsClient(agent);
this._httpClient = new HttpsClient(agent, this._config.timeout);
}

static get Client(): Buckaroo {
Expand Down

0 comments on commit d3ea45a

Please sign in to comment.