promptparse
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -1,1 +0,1 @@ | ||
export { a as anyId, b as billPayment, c as botBarcode, s as slipVerify, t as truemoney } from '../index-BhEivwGT.js'; | ||
export { A as AnyIDConfig, c as BOTBarcodeConfig, B as BillPaymentConfig, P as ProxyType, S as SlipVerifyConfig, T as TrueMoneyConfig, a as anyId, b as billPayment, d as botBarcode, s as slipVerify, t as trueMoney } from '../index-OgI7axT5.js'; |
@@ -133,3 +133,3 @@ "use strict"; | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -157,3 +157,3 @@ return withCrcTag(encode(payload), "63"); | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -167,3 +167,3 @@ if (ref3) { | ||
}; | ||
var encodeTag81 = // src/generate/TrueMoney.ts | ||
var encodeTag81 = // src/utils/encoder.ts | ||
function encodeTag81(message) { | ||
@@ -174,3 +174,4 @@ return message.split("").map(function(c) { | ||
}; | ||
var truemoney = function truemoney(param) { | ||
var trueMoney = // src/generate/TrueMoney.ts | ||
function trueMoney(param) { | ||
var mobileNo = param.mobileNo, amount = param.amount, message = param.message; | ||
@@ -189,3 +190,3 @@ var tag29 = encode([ | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -276,2 +277,5 @@ if (message) { | ||
__export(generate_exports, { | ||
ProxyType: function() { | ||
return ProxyType; | ||
}, | ||
anyId: function() { | ||
@@ -289,4 +293,4 @@ return anyId; | ||
}, | ||
truemoney: function() { | ||
return truemoney; | ||
trueMoney: function() { | ||
return trueMoney; | ||
} | ||
@@ -293,0 +297,0 @@ }); |
@@ -132,2 +132,5 @@ "use strict"; | ||
__export(generate_exports, { | ||
ProxyType: function() { | ||
return ProxyType; | ||
}, | ||
anyId: function() { | ||
@@ -145,4 +148,4 @@ return anyId; | ||
}, | ||
truemoney: function() { | ||
return truemoney; | ||
trueMoney: function() { | ||
return trueMoney; | ||
} | ||
@@ -510,3 +513,3 @@ }); | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -534,3 +537,3 @@ return withCrcTag(encode(payload), "63"); | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -544,3 +547,3 @@ if (ref3) { | ||
} | ||
// src/generate/TrueMoney.ts | ||
// src/utils/encoder.ts | ||
function encodeTag81(message) { | ||
@@ -551,3 +554,4 @@ return message.split("").map(function(c) { | ||
} | ||
function truemoney(param) { | ||
// src/generate/TrueMoney.ts | ||
function trueMoney(param) { | ||
var mobileNo = param.mobileNo, amount = param.amount, message = param.message; | ||
@@ -566,3 +570,3 @@ var tag29 = encode([ | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -653,2 +657,3 @@ if (message) { | ||
0 && (module.exports = { | ||
ProxyType: ProxyType, | ||
anyId: anyId, | ||
@@ -658,4 +663,4 @@ billPayment: billPayment, | ||
slipVerify: slipVerify, | ||
truemoney: truemoney | ||
trueMoney: trueMoney | ||
}); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
export { i as generate } from './index-BhEivwGT.js'; | ||
export { i as generate } from './index-OgI7axT5.js'; | ||
export { i as validate } from './index-DAEdhWSA.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -177,3 +177,3 @@ "use strict"; | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -254,7 +254,7 @@ if (ref3) { | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
return withCrcTag(encode(payload), "63"); | ||
}; | ||
var encodeTag81 = // src/generate/TrueMoney.ts | ||
var encodeTag81 = // src/utils/encoder.ts | ||
function encodeTag81(message) { | ||
@@ -265,3 +265,4 @@ return message.split("").map(function(c) { | ||
}; | ||
var truemoney = function truemoney(param) { | ||
var trueMoney = // src/generate/TrueMoney.ts | ||
function trueMoney(param) { | ||
var mobileNo = param.mobileNo, amount = param.amount, message = param.message; | ||
@@ -280,3 +281,3 @@ var tag29 = encode([ | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -817,2 +818,5 @@ if (message) { | ||
__export(generate_exports, { | ||
ProxyType: function() { | ||
return ProxyType; | ||
}, | ||
anyId: function() { | ||
@@ -830,4 +834,4 @@ return anyId; | ||
}, | ||
truemoney: function() { | ||
return truemoney; | ||
trueMoney: function() { | ||
return trueMoney; | ||
} | ||
@@ -834,0 +838,0 @@ }); |
@@ -612,3 +612,3 @@ "use strict"; | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -734,2 +734,5 @@ if (ref3) { | ||
__export(generate_exports, { | ||
ProxyType: function() { | ||
return ProxyType; | ||
}, | ||
anyId: function() { | ||
@@ -747,4 +750,4 @@ return anyId; | ||
}, | ||
truemoney: function() { | ||
return truemoney; | ||
trueMoney: function() { | ||
return trueMoney; | ||
} | ||
@@ -777,7 +780,7 @@ }); | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
return withCrcTag(encode(payload), "63"); | ||
} | ||
// src/generate/TrueMoney.ts | ||
// src/utils/encoder.ts | ||
function encodeTag81(message) { | ||
@@ -788,3 +791,4 @@ return message.split("").map(function(c) { | ||
} | ||
function truemoney(param) { | ||
// src/generate/TrueMoney.ts | ||
function trueMoney(param) { | ||
var mobileNo = param.mobileNo, amount = param.amount, message = param.message; | ||
@@ -803,3 +807,3 @@ var tag29 = encode([ | ||
if (amount) { | ||
payload.push(tag("54", amount.toFixed(2))); | ||
payload.push(tag("54", Number(amount).toFixed(2))); | ||
} | ||
@@ -806,0 +810,0 @@ if (message) { |
{ | ||
"name": "promptparse", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "All-in-one JS library for PromptPay & EMVCo QR Codes", | ||
@@ -5,0 +5,0 @@ "author": "Maythiwat Chomchuen <maythiwat.chom@gmail.com>", |
@@ -100,3 +100,3 @@  | ||
// Generate QR code payload (use function from "promptparse" global) | ||
const payload = promptparse.generate.truemoney({ | ||
const payload = promptparse.generate.trueMoney({ | ||
mobileNo: '08xxxxxxxx', | ||
@@ -109,3 +109,3 @@ amount: 10.0, | ||
document.write( | ||
`<img src="https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=${payload}">`, | ||
`<img src="https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=${payload}">`, | ||
) | ||
@@ -124,2 +124,3 @@ })() | ||
## See also | ||
- [phoomin2012/promptparse-php](https://github.com/phoomin2012/promptparse-php) PromptParse port for PHP | ||
@@ -126,0 +127,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
295446
5223
128