{"_id":"@agungjsp/qris-dinamis","_rev":"4-d4c231a170b43a671b0de8b1e347b0c3","name":"@agungjsp/qris-dinamis","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.3":{"name":"@agungjsp/qris-dinamis","version":"1.0.3","keywords":["qris","qris-parser","dinamis","qris-dinamis","payment"],"author":{"name":"Rachma Azis"},"license":"MIT","_id":"@agungjsp/qris-dinamis@1.0.3","maintainers":[{"name":"agungjsp","email":"jsp.agung@gmail.com"}],"homepage":"https://github.com/agungjsp/Dynamic-QRIS#readme","bugs":{"url":"https://github.com/agungjsp/Dynamic-QRIS/issues"},"dist":{"shasum":"59bd99eeaa6523f263ac26a19f7894d703695dab","tarball":"https://registry.npmjs.org/@agungjsp/qris-dinamis/-/qris-dinamis-1.0.3.tgz","fileCount":28,"integrity":"sha512-F3Zfi0epcp9+ZUWHCTFhJpKPutMELoB57v8ZJc4iV4klhcMLiLTrF4mOEeSydgGoyWoeUe15uWpzQR5dZgTENg==","signatures":[{"sig":"MEUCICfUgX768uyOt9XKC2VzKfBblUtbwkP5I0bRJtzW1UI0AiEAim3w1CxSILl6DzSOzqsLy+AxSdCBY14YKG28/SGIMYk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":620080},"main":"index.js","exports":{".":{"import":"./index.mjs","require":"./index.js"}},"gitHead":"a484e4dfa76166f088807ac5c78ce375767a7642","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"agungjsp","email":"jsp.agung@gmail.com"},"repository":{"url":"git+https://github.com/agungjsp/Dynamic-QRIS.git","type":"git"},"_npmVersion":"10.9.2","description":"Make static QRIS to dynamic QRIS","directories":{},"_nodeVersion":"23.11.0","dependencies":{"jimp":"^1.6.0","qrcode":"^1.4.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/qris-dinamis_1.0.3_1753364865644_0.7104304114848075","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@agungjsp/qris-dinamis","version":"1.0.4","keywords":["qris","qris-parser","dinamis","qris-dinamis","payment"],"author":{"name":"Rachma Azis"},"license":"MIT","_id":"@agungjsp/qris-dinamis@1.0.4","maintainers":[{"name":"agungjsp","email":"jsp.agung@gmail.com"}],"homepage":"https://github.com/agungjsp/Dynamic-QRIS#readme","bugs":{"url":"https://github.com/agungjsp/Dynamic-QRIS/issues"},"dist":{"shasum":"0fcde4130c759a6128002111b882be64317d64c0","tarball":"https://registry.npmjs.org/@agungjsp/qris-dinamis/-/qris-dinamis-1.0.4.tgz","fileCount":28,"integrity":"sha512-+urLdAwHGmC9AHo13jRCH3zQGfl3YN5PUEHNz3SKFyIh3unfQ/XnN2Zz7RkfRN8cj7jm/zQDQnfMx1gLhpHwMQ==","signatures":[{"sig":"MEUCIG162zZNtBTljKOGdmw6JoGlahm4qd5UZSPRXwsNg6poAiEA6zCeIZMcBVaMg0XDfdfPtTHg6g3pnsO1koGwGbWrKw8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":620776},"main":"index.js","exports":{".":{"import":"./index.mjs","require":"./index.js"}},"gitHead":"1d267b5146faef35fe52016c66d7bd6da2b4b338","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"agungjsp","email":"jsp.agung@gmail.com"},"repository":{"url":"git+https://github.com/agungjsp/Dynamic-QRIS.git","type":"git"},"_npmVersion":"10.9.2","description":"Make static QRIS to dynamic QRIS","directories":{},"_nodeVersion":"23.11.0","dependencies":{"jimp":"^1.6.0","qrcode":"^1.4.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/qris-dinamis_1.0.4_1753366485604_0.9652838043354013","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@agungjsp/qris-dinamis","version":"1.0.5","keywords":["qris","qris-parser","dinamis","qris-dinamis","payment"],"author":{"name":"Rachma Azis"},"license":"MIT","_id":"@agungjsp/qris-dinamis@1.0.5","maintainers":[{"name":"agungjsp","email":"jsp.agung@gmail.com"}],"homepage":"https://github.com/agungjsp/Dynamic-QRIS#readme","bugs":{"url":"https://github.com/agungjsp/Dynamic-QRIS/issues"},"dist":{"shasum":"db0a97a7e32efd83ea5e96fd19bf03b032738194","tarball":"https://registry.npmjs.org/@agungjsp/qris-dinamis/-/qris-dinamis-1.0.5.tgz","fileCount":28,"integrity":"sha512-r7kNzAaPzc3HAB0UfabXj1lI9zFI16xMw3gAYckVDLKRMYd+kOy+tS58SUfXDRh6+1CvL0eMrg7LaVh+IobE2g==","signatures":[{"sig":"MEQCIE8xhXeMJiISLAV+8LjSqdSu7Tl0x10CDZV9zVr/gstcAiAR+RqP2ppCyudesqAclJae/l5iMliq+Ph9AZr/LvX4vQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":623192},"main":"index.js","exports":{".":{"import":"./index.mjs","require":"./index.js"}},"gitHead":"d41f3fc7f88b5b85c8d7b5690a5a81aa6a1d5ce9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"agungjsp","email":"jsp.agung@gmail.com"},"repository":{"url":"git+https://github.com/agungjsp/Dynamic-QRIS.git","type":"git"},"_npmVersion":"10.9.2","description":"Make static QRIS to dynamic QRIS","directories":{},"_nodeVersion":"23.11.0","dependencies":{"jimp":"^1.6.0","qrcode":"^1.4.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/qris-dinamis_1.0.5_1753368012045_0.045523645522121514","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@agungjsp/qris-dinamis","version":"1.0.7","description":"Make static QRIS to dynamic QRIS","main":"index.js","dependencies":{"jimp":"^1.6.0","qrcode":"^1.5.4"},"exports":{".":{"import":"./index.mjs","require":"./index.js"}},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/agungjsp/Dynamic-QRIS.git"},"keywords":["qris","qris-parser","dinamis","qris-dinamis","payment"],"author":{"name":"Rachma Azis"},"license":"MIT","bugs":{"url":"https://github.com/agungjsp/Dynamic-QRIS/issues"},"homepage":"https://github.com/agungjsp/Dynamic-QRIS#readme","devDependencies":{"@rollup/plugin-commonjs":"^28.0.6","buffer":"^6.0.3","vite":"^7.0.6"},"_id":"@agungjsp/qris-dinamis@1.0.7","gitHead":"77c0be0473d8922628b468f07e2fdfcbf535e77e","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-6HyoxcheES2Ko9v1+Pb+0ipRwQ55NRdPOXKAZ8K0XQ49iMm2DT73wnWCqodlNxQ7P4O/Zy7QS3z3wTvtQFH1pw==","shasum":"dca916141f86b3c6d2429f41b3f5b27bcb42e013","tarball":"https://registry.npmjs.org/@agungjsp/qris-dinamis/-/qris-dinamis-1.0.7.tgz","fileCount":35,"unpackedSize":643930,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDbrvuaHt5Zpn0urN+XASdImGIAiytIqlpaZRHlFuFwcwIgBiBm5T28OnjexFIq7vfq2fo9grv3tdlPTMBN7hnFaHg="}]},"_npmUser":{"name":"agungjsp","email":"jsp.agung@gmail.com"},"directories":{},"maintainers":[{"name":"agungjsp","email":"jsp.agung@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/qris-dinamis_1.0.7_1754184048600_0.21271140553803503"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-24T13:47:45.505Z","modified":"2025-08-03T01:20:49.072Z","1.0.3":"2025-07-24T13:47:45.830Z","1.0.4":"2025-07-24T14:14:45.854Z","1.0.5":"2025-07-24T14:40:12.333Z","1.0.7":"2025-08-03T01:20:48.881Z"},"bugs":{"url":"https://github.com/agungjsp/Dynamic-QRIS/issues"},"author":{"name":"Rachma Azis"},"license":"MIT","homepage":"https://github.com/agungjsp/Dynamic-QRIS#readme","keywords":["qris","qris-parser","dinamis","qris-dinamis","payment"],"repository":{"type":"git","url":"git+https://github.com/agungjsp/Dynamic-QRIS.git"},"description":"Make static QRIS to dynamic QRIS","maintainers":[{"name":"agungjsp","email":"jsp.agung@gmail.com"}],"readme":"\n# QRIS Dinamis\n\nConvert static QRIS (Quick Response Code Indonesian Standard) to dynamic QRIS with payment amounts.\n\n[![npm version](https://img.shields.io/npm/v/@agungjsp/qris-dinamis.svg)](https://www.npmjs.com/package/@agungjsp/qris-dinamis)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Security](https://img.shields.io/badge/Security-0%20vulnerabilities-brightgreen.svg)](#security)\n\n## Features\n\n- ✅ Convert static QRIS to dynamic QRIS with embedded amounts\n- ✅ Generate QR code images with customizable templates\n- ✅ Support for both CommonJS and ES Modules\n- ✅ Base64 output option for web applications\n- ✅ Fee calculation (percentage or fixed amount)\n- ✅ Custom output paths\n- ✅ Zero security vulnerabilities\n- ✅ Built-in CRC16 validation\n\n## Installation\n\n```bash\nnpm i @agungjsp/qris-dinamis\n```\n\n> **Note:** This is an improved fork of the original `qris-dinamis` package with security fixes and ES Module support.\n\n## Import Module\n\n```javascript\n// CommonJS\nconst qrisDinamis = require('@agungjsp/qris-dinamis');\n\n// ES Modules (both syntaxes supported)\nimport qrisDinamis from '@agungjsp/qris-dinamis';\nimport { makeString, makeFile } from '@agungjsp/qris-dinamis';\n```\n\n## Usage\n\n### Generate Dynamic QRIS String\n\n```javascript\nconst qris = '00020101021126570011ID1234567890123456789012340303UMI51440014ID.CO.QRIS.WWW0215ID20232108123456780303UMI520454995802ID5914MERCHANT NAME6007Jakarta61051234662070703A016304ABCD';\nconst result = qrisDinamis.makeString(qris, { nominal: '5000' });\nconsole.log(result); // Returns modified QRIS string with embedded amount\n```\n\n### Generate QR Code Image\n\n```javascript\nconst qris = '00020101021126570011ID1234567890123456789012340303UMI51440014ID.CO.QRIS.WWW0215ID20232108123456780303UMI520454995802ID5914MERCHANT NAME6007Jakarta61051234662070703A016304ABCD';\n\n// Basic usage - saves to output/ directory\nconst result = await qrisDinamis.makeFile(qris, { nominal: '5000' });\n\n// Base64 output for web applications  \nconst base64 = await qrisDinamis.makeFile(qris, { \n  nominal: '5000', \n  base64: true \n});\n\n// Custom output path\nconst result = await qrisDinamis.makeFile(qris, { \n  nominal: '5000', \n  path: 'custom/path/qris.jpg' \n});\n\n// With fee calculation\nconst result = await qrisDinamis.makeFile(qris, { \n  nominal: '5000',\n  fee: '500',\n  taxtype: 'r' // 'r' for rupiah, 'p' for percent\n});\n\n// Browser usage (returns QR code data URL)\nconst qrDataURL = await qrisDinamis.makeFile(qris, { \n  nominal: '5000',\n  base64: true // Required in browser environments\n});\n// Note: Browser version returns a simple QR code without template overlay\n```\n\n## API Reference\n\n### `makeString(qris, options)`\n\nConverts static QRIS string to dynamic QRIS string.\n\n**Parameters:**\n\n| Param     | Type   | Required | Default | Description |\n|-----------|--------|----------|---------|-------------|\n| `qris`    | string | ✅       | -       | Static QRIS string |\n| `nominal` | string | ✅       | -       | Payment amount |\n| `taxtype` | string | ❌       | `'p'`   | Tax type: `'r'` (rupiah) or `'p'` (percent) |\n| `fee`     | string | ❌       | `'0'`   | Fee amount |\n\n**Returns:** `string` - Dynamic QRIS string\n\n### `makeFile(qris, options)`\n\nGenerates QR code image from dynamic QRIS.\n\n**Parameters:**\n\n| Param         | Type    | Required | Default | Description |\n|---------------|---------|----------|---------|-------------|\n| `qris`        | string  | ✅       | -       | Static QRIS string |\n| `nominal`     | string  | ✅       | -       | Payment amount |\n| `base64`      | boolean | ❌       | `false` | Return base64 string instead of file |\n| `path`        | string  | ❌       | auto    | Custom output path (Node.js only) |\n| `templatePath`| string  | ❌       | `'assets/template.png'` | Custom template image path |\n| `taxtype`     | string  | ❌       | `'p'`   | Tax type: `'r'` (rupiah) or `'p'` (percent) |\n| `fee`         | string  | ❌       | `'0'`   | Fee amount |\n\n**Returns:** `Promise<string>` - File path (Node.js), base64 string (Node.js), or data URL (Browser)\n\n## Error Handling\n\n```javascript\ntry {\n  const result = qrisDinamis.makeString(qris, { nominal: '5000' });\n} catch (error) {\n  if (error.message.includes('required')) {\n    console.log('Missing required parameter');\n  }\n}\n\ntry {\n  const result = await qrisDinamis.makeFile(qris, { nominal: '5000' });\n} catch (error) {\n  console.log('File generation failed:', error.message);\n}\n```\n\n## Requirements\n\n- Node.js >= 12.0.0 (for full template functionality)\n- Modern browser with ES6 support (for browser usage)\n- The `output/` directory will be created automatically if it doesn't exist\n\n## Browser vs Node.js Differences\n\n| Feature | Node.js | Browser |\n|---------|---------|---------|\n| Template overlay | ✅ Full template with fonts | ❌ Simple QR only |\n| File output | ✅ Supported | ❌ Not supported |\n| Base64/Data URL | ✅ Supported | ✅ Supported |\n| Custom fonts | ✅ Supported | ❌ Not supported |\n\n## What's New\n\n🚀 **Latest improvements** include browser compatibility fixes, security updates, and enhanced error handling. \n\n👉 **See full changelog**: [GitHub Releases](https://github.com/agungjsp/Dynamic-QRIS/releases)\n\n## Security\n\nThis package has **zero security vulnerabilities** and uses the latest secure versions of all dependencies.\n\n## License\n\nMIT © [Rachma Azis](https://razisek.com)\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Support\n\n- 🐛 **Bug reports**: [GitHub Issues](https://github.com/agungjsp/Dynamic-QRIS/issues)\n- 💬 **Questions**: [GitHub Discussions](https://github.com/agungjsp/Dynamic-QRIS/discussions)\n- 📧 **Original author**: [razisek.com](https://razisek.com)\n- 🔧 **Fork maintainer**: [@agungjsp](https://github.com/agungjsp)","readmeFilename":"README.md"}