paysafegroup / paysafe_sdk_nodejs Goto Github PK
View Code? Open in Web Editor NEWPaysafe Node.js SDK
License: MIT License
Paysafe Node.js SDK
License: MIT License
paysafe_sdk_nodejs/lib/PaysafeApiClient.js
Lines 119 to 147 in 24c1704
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.
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?
There is an extra parenthesis, here's the PR to fix:
#9
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
This package should be able to be used via the standard means of npm install @paysafe/[email protected]
or similar.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.