
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
node-qiwi-api
Advanced tools
node-qiwi-api ================ Официальная [документация](https://developer.qiwi.com/qiwiwallet/qiwicom_ru.html) к Qiwi api.
Официальная документация к Qiwi api.
Ссылка на GitHub.
Для начала вам необходимо получить токен на сайте Qiwi.
npm install node-qiwi-api
Инициализируйте новый кошелек с выданным токеном:
var Qiwi = require('node-qiwi-api').Qiwi;
var Wallet = new Qiwi(token);
Теперь вы можете получать информацию о кошельке и совершать переводы на другие кошельки, мобильный телефон и карты.
Wallet.getAccountInfo((err, info) => {
if(err) {
/*hanle error*/
}
console.log(info);
}
Wallet.getBalance((err, balance) => {
if(err) {
/*hanle error*/
}
console.log(balance);
}
Wallet.getOperationHistory(requestOptions, (err, operations) => {
if(err) {
/*hanle error*/
}
console.log(operations);
}
requestOptions включают в себя:
Например информация о 25 исходящих платежах может быть получена следующим образом:
Wallet.getOperationHistory({rows: 25, operation: "OUT"}, (err, operations) => {
/* some code */
}
Для получения статистики по суммам платежей за заданный период используется подзапрос запроса истории.
Wallet.getOperationStats(requestOptions, (err, stats) => {
if(err) {
/*hanle error*/
}
console.log(stats);
}
requestOptions: operation, sources, startDate, endDate - Параметры аналогичны параметрам в getOperationHistory.
Wallet.toWallet({ amount: '0.01', comment: 'test', account: '+79261234567' }, (err, data) => {
if(err) {
/* handle err*/
}
console.log(data);
}
Ничем не отличается от перевода на кошелек, за исключением того, что номер указывается без международного префикса:
Wallet.toMobilePhone({ amount: '0.01', comment: 'test', account: '9261234567' }, (err, data) => {
if(err) {
/* handle err*/
}
console.log(data);
}
Ничем не отличается от других переводов, за исключением того, что в account указывается номер кредитной карты:
Wallet.toCard({ amount: '0.01', comment: 'test', account: '5213********0000' }, (err, data) => {
if(err) {
/* handle err*/
}
console.log(data);
}
Wallet.toBank({ amount: '0.01', account: '5213********0000', account_type: '1', exp_date: 'MMYY' }, recipient, (err, data) => {
if(err) {
/* handle err*/
}
console.log(data);
}
Wallet.checkComission(recipient, (err, data) => {
if(err) {
/* handle err*/
}
console.log(data);
}
data.content.terms.commission.ranges[i]:
FAQs
node-qiwi-api ================ [](https://www.npmjs.com/package/node-qiwi-api) [](https://www.npmjs.com/package/node-qiwi-api) [![npm](https://img
The npm package node-qiwi-api receives a total of 7 weekly downloads. As such, node-qiwi-api popularity was classified as not popular.
We found that node-qiwi-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.