Giter Site home page Giter Site logo

paysafe_sdk_nodejs's People

Contributors

asawarivaidya avatar csltech avatar francoisneron avatar freakenk avatar kumarvipin avatar moejay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paysafe_sdk_nodejs's Issues

Prevents for multi currency support

var cardService;
PaysafeApiClient.prototype.cardServiceHandler = function(paysafeApiClient) {
if (!cardService) {
cardService = new cardServiceHandler(paysafeApiClient);
}
return cardService;
};
var customerService;
PaysafeApiClient.prototype.CustomerServiceHandler = function(paysafeApiClient) {
if (!customerService) {
customerService = new CustomerServiceHandler(paysafeApiClient);
}
return customerService;
};
var directDebitService;
PaysafeApiClient.prototype.DirectDebitServiceHandler = function(paysafeApiClient) {
if (!directDebitService) {
directDebitService = new DirectDebitServiceHandler(paysafeApiClient);
}
return directDebitService;
};
var threeDsecureService;
PaysafeApiClient.prototype.ThreeDsecureServiceHandler = function(paysafeApiClient) {
if (!threeDsecureService) {
threeDsecureService = new ThreeDsecureServiceHandler(paysafeApiClient);
}
return threeDsecureService;
};

The marked area mean that your SDK ignores the account id and other details (like apiKey, apiPassword and environment),
If it was passed before, even if I am using a completely different instance of PaysafeApiClient.

var cardService; var customerService; var directDebitService; var threeDsecureService;

Are static variables which are kept for a runtime of app (until next restart).

This means if I ran a server and someone made a payment in GBP, ALL FURTHER TRANSACTION WILL BE IN GBP, NO MATTER WHAT I PASS IN.
Same would happen if first transaction would be in USD, EUR.

File not found

I followed the steps to test this SDK.
when I ran the example, this messages is shown in console
{ [Error: Cannot find module '../customervault/ACHbankAccounts'] code: 'MODULE_NOT_FOUND' }

However the class exists.
Can you help me?

Exception when paysafe returns un parseable response

Running the sdk on the test api, and every now and then, the test API starts timing out, and it returns 504.

The sdk doesn't handle that very well,
in PaysafeApiClient.js

request(options, function(error, response, body) {
		//console.log(error);
		//console.log("body request"+body);
		if (!error && response.statusCode !== 503) {
			// in case of delete method the response is empty string
			if (body) {
				body = typeof (body) === "string" ? deSerializeObject(body) : body;
				responseCallBack(null, body);
			} else {
				var delResp = {
					"status" : response.statusCode
				};
				responseCallBack(null, delResp);
			}
		} else {
			if (error) {
				responseCallBack(self.error(error.code,
						"Connection error : No internet Connection available : "
								+ error.syscall), null);
			} else {
				responseCallBack(self.error(response.statusCode, body), null);
			}
		}
	});

This is causing my node process to exit because of the uncaught exception in the callback.
Will submit a PR to fix that

Provide a Promise-based API using async & await

This library uses antiquated errbacks (callbacks that take an error as its first argument by convention). Refactor the library to support Promises, preferably using the async & await keywords available natively in JavaScript for a long time now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.