Compare commits
2 Commits
4f344e5e00
...
40f04ad33b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40f04ad33b | ||
|
|
ec588a5c99 |
@@ -11,7 +11,6 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:mask_text_input_formatter/mask_text_input_formatter.dart';
|
import 'package:mask_text_input_formatter/mask_text_input_formatter.dart';
|
||||||
|
|
||||||
import '../TransferMoney/TransferPromtptPayDialog.dart';
|
|
||||||
import '../api/api.dart';
|
import '../api/api.dart';
|
||||||
import '../utils/color_custom.dart';
|
import '../utils/color_custom.dart';
|
||||||
import 'PayQrDialogV2.dart';
|
import 'PayQrDialogV2.dart';
|
||||||
@@ -487,15 +486,16 @@ class _TransferBankConfirmState extends State<TransferBankConfirm> {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return PayQrDialogV2(
|
return PayQrDialogV2(
|
||||||
price: widget.price,
|
price: value["slip"]["slipAmount"] ?? "",
|
||||||
bill: value["requestTransactionID"]??"",
|
bill: value["requestTransactionID"] ?? "",
|
||||||
phone: widget.phone,
|
phone: value["slip"]["promptpayID"] ?? "",
|
||||||
name: value["slipTitleTH"]??"",
|
name: value["slip"]["receiverNameTH"] ?? "",
|
||||||
name_en: value["slipTitleEN"]??"",
|
name_en: value["slip"]["receiverNameEN"] ?? "",
|
||||||
bankName: value["bankName"]??"",
|
bankName: value["slip"]["bankName"] ?? "",
|
||||||
referenceNo:value["referenceNo"]??"",
|
referenceNo: value["slip"]["referenceNo"] ?? "",
|
||||||
slipDateTime: value["slipDateTime"]??"",
|
slipDateTime: value["slip"]["slipDateTime"] ?? "",
|
||||||
transactionId: "",
|
transactionId: value["slip"]["lookref"] ?? "",
|
||||||
|
senderCom: value["slip"]["senderCompanyEN"] ?? "",
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import 'dart:math';
|
|
||||||
|
|
||||||
import 'package:cathaypay_mobile/Home/HomePage.dart';
|
import 'package:cathaypay_mobile/Home/HomePage.dart';
|
||||||
import 'package:cathaypay_mobile/utils/utils.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:saver_gallery/saver_gallery.dart';
|
import 'package:saver_gallery/saver_gallery.dart';
|
||||||
@@ -9,9 +6,22 @@ import 'package:screenshot/screenshot.dart';
|
|||||||
|
|
||||||
import '../api/api.dart';
|
import '../api/api.dart';
|
||||||
import '../model/profile_model.dart';
|
import '../model/profile_model.dart';
|
||||||
|
import '../utils/utils.dart';
|
||||||
|
|
||||||
class PayQrDialogV2 extends StatefulWidget {
|
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;
|
||||||
final String name_en;
|
final String name_en;
|
||||||
@@ -22,6 +32,8 @@ class PayQrDialogV2 extends StatefulWidget {
|
|||||||
final String referenceNo;
|
final String referenceNo;
|
||||||
final String slipDateTime;
|
final String slipDateTime;
|
||||||
final String bill;
|
final String bill;
|
||||||
|
final String senderCom;
|
||||||
|
|
||||||
// "slipTitleTH": "ตรวจสอบ การชำระเงิน",
|
// "slipTitleTH": "ตรวจสอบ การชำระเงิน",
|
||||||
// "slipTitleEN": "payment verification",
|
// "slipTitleEN": "payment verification",
|
||||||
// "slipDateTime": "27 Dec 24 02:23",
|
// "slipDateTime": "27 Dec 24 02:23",
|
||||||
@@ -46,6 +58,7 @@ class PayQrDialogV2 extends StatefulWidget {
|
|||||||
class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
||||||
@override
|
@override
|
||||||
ScreenshotController screenshotController = ScreenshotController();
|
ScreenshotController screenshotController = ScreenshotController();
|
||||||
|
|
||||||
void initState() {
|
void initState() {
|
||||||
getProfile(context);
|
getProfile(context);
|
||||||
super.initState();
|
super.initState();
|
||||||
@@ -60,26 +73,18 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Screenshot(
|
return Screenshot(
|
||||||
controller: screenshotController,
|
controller: screenshotController,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||||
child: Column(mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [
|
child: Card(
|
||||||
// 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),
|
color: Color(0xfffbfbfb),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(height: 180,width: 180,
|
Container(
|
||||||
|
height: 150,
|
||||||
|
width: 180,
|
||||||
child: Image(
|
child: Image(
|
||||||
image: AssetImage('images/neopay_logo.png'),
|
image: AssetImage('images/neopay_logo.png'),
|
||||||
),
|
),
|
||||||
@@ -91,7 +96,7 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
|||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w300,
|
fontWeight: FontWeight.w300,
|
||||||
),
|
),
|
||||||
) ,
|
),
|
||||||
Text(
|
Text(
|
||||||
"ดำเนินการโอน/จ่ายสำเร็จ",
|
"ดำเนินการโอน/จ่ายสำเร็จ",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -99,286 +104,304 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
|||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w300,
|
fontWeight: FontWeight.w300,
|
||||||
),
|
),
|
||||||
) ,
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
"จำนวนเงิน/Amount ฿"+widget.price,
|
"จำนวนเงิน/Amount ฿" + widget.price,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xff65676b),
|
color: Color(0xff65676b),
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w300,
|
fontWeight: FontWeight.w300,
|
||||||
),
|
),
|
||||||
) ,
|
),
|
||||||
Container(height: 80,width: 180,
|
Container(
|
||||||
|
height: 80,
|
||||||
|
width: 180,
|
||||||
child: Image(
|
child: Image(
|
||||||
image: AssetImage('images/prompt.png'),
|
image: AssetImage('images/prompt.png'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 15,),
|
SizedBox(
|
||||||
|
height: 15,
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('images/neo_backgroup.png'),
|
image: AssetImage('images/neo_backgroup.png'),
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child:Column(children: [
|
child: Column(
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
"ผู้รับเงิน",
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
style: TextStyle(
|
children: [
|
||||||
color: Color(0xff65676b),
|
Text(
|
||||||
fontSize: 14,
|
"ผู้รับเงิน",
|
||||||
fontWeight: FontWeight.w300,
|
style: TextStyle(
|
||||||
),
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
widget.name,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Receiver",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
widget.name_en,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"ธนาคารปลายทาง",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
widget.bankName,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"referenceNo",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
widget.referenceNo,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"วันที่ เวลา ทำรายการ",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
widget.slipDateTime,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"feeAmount",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"0.00",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Sender",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
profile?.fullName ?? "",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Wallet ID",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
profile?.phoneNumber ?? "",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
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,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
widget.transactionId,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
|
||||||
widget.name,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
)),
|
||||||
Row(
|
SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
height: 10,
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"Receiver",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.name_en,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"ธนาคารปลายทาง",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.bankName,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"retrievalReferenceNumber",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.referenceNo,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"วันที่ เวลา ทำรายการ",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.slipDateTime,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"feeAmount",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"0.00",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),SizedBox(
|
|
||||||
height: 35,
|
|
||||||
),
|
|
||||||
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"Sender",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
profile?.fullName??"",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"Wallet ID",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
profile?.phoneNumber??"",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"เลขที่ทำรายการ",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.bill,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff65676b),
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],)
|
|
||||||
),
|
),
|
||||||
|
Text(
|
||||||
SizedBox(height: 15,),
|
"Transfer / Payment from Bangkok Bank PromptPay",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff65676b),
|
||||||
InkWell(
|
fontSize: 12,
|
||||||
onTap: () async {
|
fontWeight: FontWeight.w300,
|
||||||
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,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
screenshotController
|
screenshotController.capture(delay: Duration(milliseconds: 10)).then((capturedImage) async {
|
||||||
.capture(delay: Duration(milliseconds: 10))
|
|
||||||
.then((capturedImage) async {
|
|
||||||
String fileName = "neopay_${DateTime.now().millisecondsSinceEpoch}.jpg";
|
String fileName = "neopay_${DateTime.now().millisecondsSinceEpoch}.jpg";
|
||||||
SaverGallery.saveImage(capturedImage!, fileName: fileName, skipIfExists: false);
|
SaverGallery.saveImage(capturedImage!, fileName: fileName, skipIfExists: false);
|
||||||
Utils.showAlertDialog(context, "บันทึกสำเร็จ");
|
Utils.showAlertDialog(context, "บันทึกสำเร็จ");
|
||||||
}).catchError((onError) {
|
}).catchError((onError) {
|
||||||
print(onError);
|
print(onError);
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: 20, bottom: 20),
|
margin: EdgeInsets.only(top: 20, bottom: 20),
|
||||||
width: MediaQuery
|
width: MediaQuery.of(context).size.width,
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.width,
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(40),
|
borderRadius: BorderRadius.circular(40),
|
||||||
color: Color(0xff9d001b),
|
color: Color(0xff9d001b),
|
||||||
@@ -409,17 +432,14 @@ class _PayQrDialogV2State extends State<PayQrDialogV2> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SizedBox(
|
);
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:cathaypay_mobile/GetPaid/GetPaid.dart';
|
|
||||||
import 'package:cathaypay_mobile/Home/HomePage.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/PinCodeVadidate.dart';
|
||||||
import 'package:cathaypay_mobile/main.dart';
|
import 'package:cathaypay_mobile/main.dart';
|
||||||
import 'package:cathaypay_mobile/utils/utils.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/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:google_fonts/google_fonts.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 '../api/api.dart';
|
||||||
import '../utils/color_custom.dart';
|
import '../utils/color_custom.dart';
|
||||||
@@ -39,9 +35,11 @@ class _PayQrPageState extends State<PayThaiQr> {
|
|||||||
initC2B() {
|
initC2B() {
|
||||||
Utils.loadingProgress(context);
|
Utils.loadingProgress(context);
|
||||||
// var param = jsonEncode(<dynamic, dynamic>{"MobileDeviceNo": payPhone ?? "", "Note": "", "TransactionID": transactionID});
|
// var param = jsonEncode(<dynamic, dynamic>{"MobileDeviceNo": payPhone ?? "", "Note": "", "TransactionID": transactionID});
|
||||||
var param = jsonEncode(
|
var param = jsonEncode(<dynamic, dynamic>{
|
||||||
<dynamic, dynamic>{"requestTransactionID": Utils.getDateInitPromptPay() + (profile?.phoneNumber?.lastChars(4)), "qrTextRequest": widget.code,
|
"requestTransactionID": Utils.getDateInitPromptPay() + (profile?.phoneNumber?.lastChars(4)),
|
||||||
"amount": "${removeTextPrice()}00"});
|
"qrTextRequest": widget.code,
|
||||||
|
"amount": "${removeTextPrice()}00"
|
||||||
|
});
|
||||||
|
|
||||||
Api.post(context, Api.payThaiInitial, param).then((value) => {
|
Api.post(context, Api.payThaiInitial, param).then((value) => {
|
||||||
if (value != null) {confirmPayQrC2BAmount(value["requestTransactionID"], value["responseTransactionID"])} else {}
|
if (value != null) {confirmPayQrC2BAmount(value["requestTransactionID"], value["responseTransactionID"])} else {}
|
||||||
@@ -59,18 +57,19 @@ class _PayQrPageState extends State<PayThaiQr> {
|
|||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return PayQrDialogV2(
|
return PayQrDialogV2(
|
||||||
price: value["slipAmount"]??"",
|
price: value["slip"]["slipAmount"] ?? "",
|
||||||
bill: value["requestTransactionID"]??"",
|
bill: value["requestTransactionID"] ?? "",
|
||||||
phone: value["promptpayID"]??"",
|
phone: value["slip"]["promptpayID"] ?? "",
|
||||||
name: value["slipTitleTH"]??"",
|
name: value["slip"]["receiverNameTH"] ?? "",
|
||||||
name_en: value["slipTitleEN"]??"",
|
name_en: value["slip"]["receiverNameEN"] ?? "",
|
||||||
bankName: value["bankName"]??"",
|
bankName: value["slip"]["bankName"] ?? "",
|
||||||
referenceNo:value["referenceNo"]??"",
|
referenceNo: value["slip"]["referenceNo"] ?? "",
|
||||||
slipDateTime: value["slipDateTime"]??"",
|
slipDateTime: value["slip"]["slipDateTime"] ?? "",
|
||||||
transactionId: "",
|
transactionId: value["slip"]["lookref"] ?? "",
|
||||||
|
senderCom: value["slip"]["senderCompanyEN"] ?? "",
|
||||||
);
|
);
|
||||||
/* return PayQrDialog(
|
/* return PayQrDialog(
|
||||||
phone: "",
|
phone: "",
|
||||||
price: removeTextPrice(),
|
price: removeTextPrice(),
|
||||||
name: "",
|
name: "",
|
||||||
|
|||||||
@@ -64,10 +64,10 @@ class Api {
|
|||||||
static String getTransaction = BaseUrlBuilding + "api/v2/EPaymentReport/GetModelLogCriteria";
|
static String getTransaction = BaseUrlBuilding + "api/v2/EPaymentReport/GetModelLogCriteria";
|
||||||
static String getTransactionV4 = BaseUrlBuilding + "api/v4/EPaymentReport/GetModelLogCriteria";
|
static String getTransactionV4 = BaseUrlBuilding + "api/v4/EPaymentReport/GetModelLogCriteria";
|
||||||
// static String BaseUrlBuildingCathay = "https://sathorn.cathay-pay.com/";
|
// static String BaseUrlBuildingCathay = "https://sathorn.cathay-pay.com/";
|
||||||
static String payPromptPayInitial = BaseUrlBuilding + "api/v2/EPaymentBBL/TransferedPromptPayIDInitial";
|
static String payPromptPayInitial = BaseUrlBuilding + "api/v4/EPaymentBBL/TransferedPromptPayIDInitial";
|
||||||
static String payPromptPayConfirm = BaseUrlBuilding + "api/v2/EPaymentBBL/TransferedPromptPayIDConfirm";
|
static String payPromptPayConfirm = BaseUrlBuilding + "api/v4/EPaymentBBL/TransferedPromptPayIDConfirm";
|
||||||
static String payThaiInitial = BaseUrlBuilding + "api/v2/EPaymentBBL/TransferedPromptPayQRInitial";
|
static String payThaiInitial = BaseUrlBuilding + "api/v4/EPaymentBBL/TransferedPromptPayQRInitial";
|
||||||
static String payThaiConfirm = BaseUrlBuilding + "api/v2/EPaymentBBL/TransferedPromptPayQRConfirm";
|
static String payThaiConfirm = BaseUrlBuilding + "api/v4/EPaymentBBL/TransferedPromptPayQRConfirm";
|
||||||
|
|
||||||
static String user = BaseUrlBuilding + "api/v1/User";
|
static String user = BaseUrlBuilding + "api/v1/User";
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.2+9
|
version: 1.0.3+10
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.19.3 <3.0.0'
|
sdk: '>=2.19.3 <3.0.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user