From 0cb4ae41247ac619edd6e897090b3232c342f20a Mon Sep 17 00:00:00 2001 From: nutchayut Date: Thu, 27 Feb 2025 21:32:02 +0700 Subject: [PATCH] bug fixed --- neowallet_mobile/lib/Pay/PayPromptPay.dart | 2 +- neowallet_mobile/lib/TopUp/topup_amout.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/neowallet_mobile/lib/Pay/PayPromptPay.dart b/neowallet_mobile/lib/Pay/PayPromptPay.dart index 924ff218..204f3d10 100644 --- a/neowallet_mobile/lib/Pay/PayPromptPay.dart +++ b/neowallet_mobile/lib/Pay/PayPromptPay.dart @@ -173,7 +173,7 @@ class _TransferPromptPayDetailState extends State { // var param = jsonEncode({"IDCardOrMobileDeviceNo": widget.phone, "Amount": priceTemp}); var param = jsonEncode( - {"requestTransactionID": Utils.getDateInitPromptPay() + widget.phone.lastChars(4), "iDCardorMobileNo": widget.phone, "amount": "${priceTemp}00"}); + {"requestTransactionID": Utils.getDateInitPromptPay() + widget.phone.lastChars(4), "iDCardorMobileNo": widget.phone, "amount": "${(double.parse(priceTemp).toStringAsFixed(2)).replaceAll(".", "")}"}); Api.post(context, Api.payPromptPayInitial, param).then((value) => { if (value != null) { diff --git a/neowallet_mobile/lib/TopUp/topup_amout.dart b/neowallet_mobile/lib/TopUp/topup_amout.dart index 3b448096..5d85380d 100644 --- a/neowallet_mobile/lib/TopUp/topup_amout.dart +++ b/neowallet_mobile/lib/TopUp/topup_amout.dart @@ -51,7 +51,7 @@ class _TransferPromptPayDetailState extends State { }); var param = jsonEncode({ "merchantLocalID": Api.merchantId, - "amount": "${number}00", + "amount": "${(double.parse(number).toStringAsFixed(2)).replaceAll(".", "")}}", "invoice": "INV${Utils.getTimestamp()}", "ref1": "REF${Utils.getTimestamp()}01", "ref2": "REF${Utils.getTimestamp()}02",