update
This commit is contained in:
@@ -11,7 +11,6 @@ import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:mask_text_input_formatter/mask_text_input_formatter.dart';
|
||||
|
||||
import '../TransferMoney/TransferPromtptPayDialog.dart';
|
||||
import '../api/api.dart';
|
||||
import '../utils/color_custom.dart';
|
||||
import 'PayQrDialogV2.dart';
|
||||
@@ -487,15 +486,16 @@ class _TransferBankConfirmState extends State<TransferBankConfirm> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return PayQrDialogV2(
|
||||
price: widget.price,
|
||||
bill: value["requestTransactionID"]??"",
|
||||
phone: widget.phone,
|
||||
name: value["slipTitleTH"]??"",
|
||||
name_en: value["slipTitleEN"]??"",
|
||||
bankName: value["bankName"]??"",
|
||||
referenceNo:value["referenceNo"]??"",
|
||||
slipDateTime: value["slipDateTime"]??"",
|
||||
transactionId: "",
|
||||
price: value["slip"]["slipAmount"] ?? "",
|
||||
bill: value["requestTransactionID"] ?? "",
|
||||
phone: value["slip"]["promptpayID"] ?? "",
|
||||
name: value["slip"]["receiverNameTH"] ?? "",
|
||||
name_en: value["slip"]["receiverNameEN"] ?? "",
|
||||
bankName: value["slip"]["bankName"] ?? "",
|
||||
referenceNo: value["slip"]["referenceNo"] ?? "",
|
||||
slipDateTime: value["slip"]["slipDateTime"] ?? "",
|
||||
transactionId: value["slip"]["lookref"] ?? "",
|
||||
senderCom: value["slip"]["senderCompanyEN"] ?? "",
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:cathaypay_mobile/Home/HomePage.dart';
|
||||
import 'package:cathaypay_mobile/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
@@ -7,7 +6,19 @@ import '../api/api.dart';
|
||||
import '../model/profile_model.dart';
|
||||
|
||||
class PayQrDialogV2 extends StatefulWidget {
|
||||
const PayQrDialogV2({Key? key, required this.name, required this.phone, required this.transactionId, required this.price, required this.name_en, required this.bankName, required this.referenceNo, required this.slipDateTime, required this.bill}) : super(key: key);
|
||||
const PayQrDialogV2(
|
||||
{Key? key,
|
||||
required this.name,
|
||||
required this.phone,
|
||||
required this.transactionId,
|
||||
required this.price,
|
||||
required this.name_en,
|
||||
required this.bankName,
|
||||
required this.referenceNo,
|
||||
required this.slipDateTime,
|
||||
required this.bill,
|
||||
required this.senderCom})
|
||||
: super(key: key);
|
||||
|
||||
final String name;
|
||||
final String name_en;
|
||||
@@ -18,6 +29,8 @@ class PayQrDialogV2 extends StatefulWidget {
|
||||
final String referenceNo;
|
||||
final String slipDateTime;
|
||||
final String bill;
|
||||
final String senderCom;
|
||||
|
||||
// "slipTitleTH": "ตรวจสอบ การชำระเงิน",
|
||||
// "slipTitleEN": "payment verification",
|
||||
// "slipDateTime": "27 Dec 24 02:23",
|
||||
@@ -54,90 +67,86 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||
child: Column(mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [
|
||||
// Container(
|
||||
// margin: EdgeInsets.only(bottom: 10),
|
||||
// height: 80,
|
||||
// width: 80,
|
||||
// child: Image.asset(
|
||||
// 'assets/images/LOGO.gif',
|
||||
// height: 120,
|
||||
// width: 120,
|
||||
// )),
|
||||
Card(
|
||||
color: Color(0xfffbfbfb),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(height: 180,width: 180,
|
||||
child: Image(
|
||||
image: AssetImage('images/neopay_logo.png'),
|
||||
),
|
||||
margin: const EdgeInsets.symmetric(vertical: 20),
|
||||
child: Card(
|
||||
color: Color(0xfffbfbfb),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
height: 150,
|
||||
width: 180,
|
||||
child: Image(
|
||||
image: AssetImage('images/neopay_logo.png'),
|
||||
),
|
||||
Text(
|
||||
"Approved or completed successfully",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
) ,
|
||||
Text(
|
||||
"ดำเนินการโอน/จ่ายสำเร็จ",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
) ,
|
||||
|
||||
Text(
|
||||
"จำนวนเงิน/Amount ฿"+widget.price,
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
) ,
|
||||
Container(height: 80,width: 180,
|
||||
child: Image(
|
||||
image: AssetImage('images/prompt.png'),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Approved or completed successfully",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
SizedBox(height: 15,),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/neo_backgroup.png'),
|
||||
fit: BoxFit.fill,
|
||||
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"ดำเนินการโอน/จ่ายสำเร็จ",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"จำนวนเงิน/Amount ฿" + widget.price,
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 80,
|
||||
width: 180,
|
||||
child: Image(
|
||||
image: AssetImage('images/prompt.png'),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/neo_backgroup.png'),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
child:Column(children: [
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"ผู้รับเงิน",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w300,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"ผู้รับเงิน",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
widget.name,
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Text(
|
||||
widget.name,
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@@ -184,7 +193,7 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"retrievalReferenceNumber",
|
||||
"referenceNo",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
@@ -242,10 +251,7 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||
),
|
||||
)
|
||||
],
|
||||
),SizedBox(
|
||||
height: 35,
|
||||
),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@@ -258,7 +264,7 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
profile?.fullName??"",
|
||||
profile?.fullName ?? "",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
@@ -279,7 +285,7 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
profile?.phoneNumber??"",
|
||||
profile?.phoneNumber ?? "",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
@@ -288,11 +294,37 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"senderCom.",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.senderCom,
|
||||
textAlign: TextAlign.end,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"เลขที่ทำรายการ",
|
||||
"lookref",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
@@ -300,7 +332,7 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
widget.bill,
|
||||
widget.transactionId,
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 14,
|
||||
@@ -309,58 +341,53 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||
)
|
||||
],
|
||||
),
|
||||
],)
|
||||
],
|
||||
)),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Text(
|
||||
"Transfer / Payment from Bangkok Bank PromptPay",
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
|
||||
SizedBox(height: 15,),
|
||||
|
||||
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
Navigator.popUntil(context, ModalRoute.withName('/HomePage'));
|
||||
Navigator.pushReplacementNamed(context, "/HomePage");
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 20, bottom: 20),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
color: Color(0xff9d001b),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 12,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 106,
|
||||
height: 32,
|
||||
child: Text(
|
||||
"ปิด",
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.kanit(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
Navigator.popUntil(context, ModalRoute.withName('/HomePage'));
|
||||
Navigator.pushReplacementNamed(context, "/HomePage");
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 20, bottom: 10),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
color: Color(0xff9d001b),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 12,
|
||||
),
|
||||
child: Text(
|
||||
"ปิด",
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.kanit(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
]),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:cathaypay_mobile/GetPaid/GetPaid.dart';
|
||||
import 'package:cathaypay_mobile/Home/HomePage.dart';
|
||||
import 'package:cathaypay_mobile/Pay/PayQrDialog.dart';
|
||||
import 'package:cathaypay_mobile/PinCodeVadidate.dart';
|
||||
import 'package:cathaypay_mobile/main.dart';
|
||||
import 'package:cathaypay_mobile/utils/utils.dart';
|
||||
@@ -11,8 +9,6 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:qr_code_scanner/qr_code_scanner.dart';
|
||||
|
||||
import '../api/api.dart';
|
||||
import '../utils/color_custom.dart';
|
||||
@@ -39,9 +35,11 @@ class _PayQrPageState extends State<PayThaiQr> {
|
||||
initC2B() {
|
||||
Utils.loadingProgress(context);
|
||||
// var param = jsonEncode(<dynamic, dynamic>{"MobileDeviceNo": payPhone ?? "", "Note": "", "TransactionID": transactionID});
|
||||
var param = jsonEncode(
|
||||
<dynamic, dynamic>{"requestTransactionID": Utils.getDateInitPromptPay() + (profile?.phoneNumber?.lastChars(4)), "qrTextRequest": widget.code,
|
||||
"amount": "${removeTextPrice()}00"});
|
||||
var param = jsonEncode(<dynamic, dynamic>{
|
||||
"requestTransactionID": Utils.getDateInitPromptPay() + (profile?.phoneNumber?.lastChars(4)),
|
||||
"qrTextRequest": widget.code,
|
||||
"amount": "${removeTextPrice()}00"
|
||||
});
|
||||
|
||||
Api.post(context, Api.payThaiInitial, param).then((value) => {
|
||||
if (value != null) {confirmPayQrC2BAmount(value["requestTransactionID"], value["responseTransactionID"])} else {}
|
||||
@@ -59,18 +57,19 @@ class _PayQrPageState extends State<PayThaiQr> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return PayQrDialogV2(
|
||||
price: value["slipAmount"]??"",
|
||||
bill: value["requestTransactionID"]??"",
|
||||
phone: value["promptpayID"]??"",
|
||||
name: value["slipTitleTH"]??"",
|
||||
name_en: value["slipTitleEN"]??"",
|
||||
bankName: value["bankName"]??"",
|
||||
referenceNo:value["referenceNo"]??"",
|
||||
slipDateTime: value["slipDateTime"]??"",
|
||||
transactionId: "",
|
||||
return PayQrDialogV2(
|
||||
price: value["slip"]["slipAmount"] ?? "",
|
||||
bill: value["requestTransactionID"] ?? "",
|
||||
phone: value["slip"]["promptpayID"] ?? "",
|
||||
name: value["slip"]["receiverNameTH"] ?? "",
|
||||
name_en: value["slip"]["receiverNameEN"] ?? "",
|
||||
bankName: value["slip"]["bankName"] ?? "",
|
||||
referenceNo: value["slip"]["referenceNo"] ?? "",
|
||||
slipDateTime: value["slip"]["slipDateTime"] ?? "",
|
||||
transactionId: value["slip"]["lookref"] ?? "",
|
||||
senderCom: value["slip"]["senderCompanyEN"] ?? "",
|
||||
);
|
||||
/* return PayQrDialog(
|
||||
/* return PayQrDialog(
|
||||
phone: "",
|
||||
price: removeTextPrice(),
|
||||
name: "",
|
||||
|
||||
Reference in New Issue
Block a user