@kuvarpay/sdk 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/index.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Official Node.js SDK for integrating **KuvarPay**, the ultimate fiat gateway for the crypto economy. This SDK allows you to handle checkout sessions, direct crypto-to-fiat transactions, recurring subscriptions, and split payments with ease.
|
|
4
4
|
|
|
5
|
+
Detailed documentation is available at [developers.kuvarpay.com](https://developers.kuvarpay.com).
|
|
6
|
+
|
|
5
7
|
[](https://badge.fury.io/js/@kuvarpay%2Fsdk)
|
|
6
8
|
[](https://opensource.org/licenses/MIT)
|
|
7
9
|
|
package/index.js
CHANGED
|
@@ -441,6 +441,11 @@ class KuvarPayServer {
|
|
|
441
441
|
* @param {Object} params - { currency, type, country }
|
|
442
442
|
*/
|
|
443
443
|
async getBanks(params = {}) {
|
|
444
|
+
// If params is a string, treat it as currency and use path-based endpoint for better reliability
|
|
445
|
+
if (typeof params === 'string') {
|
|
446
|
+
return this._get(`/api/v1/banks/${encodeURIComponent(params)}`);
|
|
447
|
+
}
|
|
448
|
+
|
|
444
449
|
const query = new URLSearchParams(params).toString();
|
|
445
450
|
const path = query ? `/api/v1/banks?${query}` : '/api/v1/banks';
|
|
446
451
|
return this._get(path);
|