├── .github └── workflows │ └── publish.yml ├── .gitignore ├── .prettierrc ├── README.md ├── jestconfig.json ├── package.json ├── src ├── __tests__ │ ├── decode-khqr.test.ts │ ├── feature │ │ ├── mcc │ │ │ ├── generate-individual.test.ts │ │ │ ├── generate-merchant.test.ts │ │ │ └── valid.test.ts │ │ └── timestamp │ │ │ ├── decode.test.ts │ │ │ ├── generate-individual.test.ts │ │ │ ├── generate-merchant.test.ts │ │ │ └── valid.test.ts │ ├── generate-individual-amount-positive.test.ts │ ├── generate-individual-negative.test.ts │ ├── generate-individual-positive.test.ts │ ├── merchant-amount-positive.test.ts │ ├── merchant-negative.test.ts │ ├── merchant-positive.test.ts │ └── verify-khqr.test.ts ├── constants │ └── index.ts ├── generate.ts ├── index.ts ├── models │ ├── index.ts │ └── tags │ │ ├── additional-data.ts │ │ ├── base │ │ └── tag-length-string.ts │ │ ├── country-code.ts │ │ ├── crc.ts │ │ ├── global-unique-identifier.ts │ │ ├── merchant-category-code.ts │ │ ├── merchant-city.ts │ │ ├── merchant-information-language-template.ts │ │ ├── merchant-name.ts │ │ ├── payload-format-indicator.ts │ │ ├── point-of-initiation-method.ts │ │ ├── time-stamp.ts │ │ ├── transaction-amount.ts │ │ ├── transaction-currency.ts │ │ └── unionpay-merchant-account.ts ├── parser.ts ├── utils │ ├── crc16.ts │ ├── index.ts │ ├── response.ts │ └── strings.ts └── verify.ts ├── tsconfig.json └── tslint.json /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/.prettierrc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/README.md -------------------------------------------------------------------------------- /jestconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/jestconfig.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/package.json -------------------------------------------------------------------------------- /src/__tests__/decode-khqr.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/decode-khqr.test.ts -------------------------------------------------------------------------------- /src/__tests__/feature/mcc/generate-individual.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/feature/mcc/generate-individual.test.ts -------------------------------------------------------------------------------- /src/__tests__/feature/mcc/generate-merchant.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/feature/mcc/generate-merchant.test.ts -------------------------------------------------------------------------------- /src/__tests__/feature/mcc/valid.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/feature/mcc/valid.test.ts -------------------------------------------------------------------------------- /src/__tests__/feature/timestamp/decode.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/feature/timestamp/decode.test.ts -------------------------------------------------------------------------------- /src/__tests__/feature/timestamp/generate-individual.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/feature/timestamp/generate-individual.test.ts -------------------------------------------------------------------------------- /src/__tests__/feature/timestamp/generate-merchant.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/feature/timestamp/generate-merchant.test.ts -------------------------------------------------------------------------------- /src/__tests__/feature/timestamp/valid.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/feature/timestamp/valid.test.ts -------------------------------------------------------------------------------- /src/__tests__/generate-individual-amount-positive.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/generate-individual-amount-positive.test.ts -------------------------------------------------------------------------------- /src/__tests__/generate-individual-negative.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/generate-individual-negative.test.ts -------------------------------------------------------------------------------- /src/__tests__/generate-individual-positive.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/generate-individual-positive.test.ts -------------------------------------------------------------------------------- /src/__tests__/merchant-amount-positive.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/merchant-amount-positive.test.ts -------------------------------------------------------------------------------- /src/__tests__/merchant-negative.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/merchant-negative.test.ts -------------------------------------------------------------------------------- /src/__tests__/merchant-positive.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/merchant-positive.test.ts -------------------------------------------------------------------------------- /src/__tests__/verify-khqr.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/__tests__/verify-khqr.test.ts -------------------------------------------------------------------------------- /src/constants/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/constants/index.ts -------------------------------------------------------------------------------- /src/generate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/generate.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/models/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/index.ts -------------------------------------------------------------------------------- /src/models/tags/additional-data.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/additional-data.ts -------------------------------------------------------------------------------- /src/models/tags/base/tag-length-string.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/base/tag-length-string.ts -------------------------------------------------------------------------------- /src/models/tags/country-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/country-code.ts -------------------------------------------------------------------------------- /src/models/tags/crc.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/crc.ts -------------------------------------------------------------------------------- /src/models/tags/global-unique-identifier.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/global-unique-identifier.ts -------------------------------------------------------------------------------- /src/models/tags/merchant-category-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/merchant-category-code.ts -------------------------------------------------------------------------------- /src/models/tags/merchant-city.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/merchant-city.ts -------------------------------------------------------------------------------- /src/models/tags/merchant-information-language-template.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/merchant-information-language-template.ts -------------------------------------------------------------------------------- /src/models/tags/merchant-name.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/merchant-name.ts -------------------------------------------------------------------------------- /src/models/tags/payload-format-indicator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/payload-format-indicator.ts -------------------------------------------------------------------------------- /src/models/tags/point-of-initiation-method.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/point-of-initiation-method.ts -------------------------------------------------------------------------------- /src/models/tags/time-stamp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/time-stamp.ts -------------------------------------------------------------------------------- /src/models/tags/transaction-amount.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/transaction-amount.ts -------------------------------------------------------------------------------- /src/models/tags/transaction-currency.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/transaction-currency.ts -------------------------------------------------------------------------------- /src/models/tags/unionpay-merchant-account.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/models/tags/unionpay-merchant-account.ts -------------------------------------------------------------------------------- /src/parser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/parser.ts -------------------------------------------------------------------------------- /src/utils/crc16.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/utils/crc16.ts -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/utils/index.ts -------------------------------------------------------------------------------- /src/utils/response.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/utils/response.ts -------------------------------------------------------------------------------- /src/utils/strings.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/utils/strings.ts -------------------------------------------------------------------------------- /src/verify.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/src/verify.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/tsconfig.json -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishinvin/ts-khqr/HEAD/tslint.json --------------------------------------------------------------------------------