Skip to content

Commit

Permalink
Updated Nodejs SDK
Browse files Browse the repository at this point in the history
Updated PaysafeApiClient.js for resolving recent issues.
  • Loading branch information
asawarivaidya authored Dec 21, 2017
1 parent 45ee796 commit 3dd7733
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions lib/PaysafeApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,35 @@ var prepareRequestParameter = function(requestObject) {
};

PaysafeApiClient.prototype.cardServiceHandler = function(paysafeApiClient) {
return new cardServiceHandler(paysafeApiClient);
if (!this.cardService)
{
this.cardService = new cardServiceHandler(paysafeApiClient);
}
return this.cardService;
};

PaysafeApiClient.prototype.CustomerServiceHandler = function(paysafeApiClient) {
return new CustomerServiceHandler(paysafeApiClient);
if (!this.customerService)
{
this.customerService = new CustomerServiceHandler(paysafeApiClient);
}
return this.customerService;
};

PaysafeApiClient.prototype.DirectDebitServiceHandler = function(paysafeApiClient) {
return new DirectDebitServiceHandler(paysafeApiClient);
if (!this.directDebitService)
{
this.directDebitService = new DirectDebitServiceHandler(paysafeApiClient);
}
return this.directDebitService;
};

PaysafeApiClient.prototype.ThreeDsecureServiceHandler = function(paysafeApiClient) {
return new ThreeDsecureServiceHandler(paysafeApiClient);
if (!this.threeDsecureService)
{
this.threeDsecureService = new ThreeDsecureServiceHandler(paysafeApiClient);
}
return this.threeDsecureService;
};

PaysafeApiClient.prototype.processRequest = function(PaysafeRequest,
Expand Down

0 comments on commit 3dd7733

Please sign in to comment.