bug fixed
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{"files":{"/Users/error/workspacesFlutter/neowallet_mobile/ios/Runner.xcodeproj/project.pbxproj":"80957a42be59b69e24b50ed18c515069","/Users/error/workspacesFlutter/neowallet_mobile/ios/Podfile":"0d28f66519d4108b49f85bc0d4e54fc8","/Users/error/Flutter/flutter/packages/flutter_tools/bin/podhelper.rb":"7a2030c7e7ce38379104ef51da2db685"}}
|
{"files":{"/Users/nutchayut/Neo_wallet/neowallet_mobile/ios/Runner.xcodeproj/project.pbxproj":"0c88275add45bc18ade338f78d975ad2","/Users/nutchayut/Neo_wallet/neowallet_mobile/ios/Podfile":"0d28f66519d4108b49f85bc0d4e54fc8","/Users/nutchayut/Flutter/flutter/packages/flutter_tools/bin/podhelper.rb":"29abcfc3297c225fc1d1ae2380787cd6"}}
|
||||||
@@ -114,8 +114,9 @@ class _HomePageState extends State<HomePage> {
|
|||||||
|
|
||||||
List<BannerModel> listBanner = [];
|
List<BannerModel> listBanner = [];
|
||||||
|
|
||||||
getBanner() {
|
/* getBanner() {
|
||||||
Api.get(context, Api.banner).then((value) => {
|
Api.get(context, Api.banner).then((value) => {
|
||||||
|
|
||||||
if (value != null)
|
if (value != null)
|
||||||
{
|
{
|
||||||
value.forEach((v) {
|
value.forEach((v) {
|
||||||
@@ -128,26 +129,65 @@ class _HomePageState extends State<HomePage> {
|
|||||||
else
|
else
|
||||||
{}
|
{}
|
||||||
});
|
});
|
||||||
|
}*/
|
||||||
|
getBanner() {
|
||||||
|
Api.get(context, Api.banner).then((value) {
|
||||||
|
if (value != null) {
|
||||||
|
DateTime now = DateTime.now(); // วันปัจจุบัน
|
||||||
|
value.forEach((v) {
|
||||||
|
if (v["file_url"] != null &&
|
||||||
|
v["start_date"] != null &&
|
||||||
|
v["end_date"] != null) {
|
||||||
|
DateTime startDate = DateTime.parse(v["start_date"]);
|
||||||
|
DateTime endDate = DateTime.parse(v["end_date"]);
|
||||||
|
if (startDate.isBefore(now) && endDate.isAfter(now)) {
|
||||||
|
listBanner.add(BannerModel.fromJson(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PromotionModel> listPromotion = [];
|
List<PromotionModel> listPromotion = [];
|
||||||
|
|
||||||
|
// getPromotion() {
|
||||||
|
// Api.get(context, Api.promotion).then((value) => {
|
||||||
|
// if (value != null)
|
||||||
|
// {
|
||||||
|
// value.forEach((v) {
|
||||||
|
// if (v["file_url"] != null) {
|
||||||
|
// listPromotion.add(PromotionModel.fromJson(v));
|
||||||
|
// }
|
||||||
|
// }),
|
||||||
|
// refresh()
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {}
|
||||||
|
// });
|
||||||
|
// }
|
||||||
getPromotion() {
|
getPromotion() {
|
||||||
Api.get(context, Api.promotion).then((value) => {
|
Api.get(context, Api.promotion).then((value) {
|
||||||
if (value != null)
|
if (value != null) {
|
||||||
{
|
DateTime now = DateTime.now(); // วันปัจจุบัน
|
||||||
value.forEach((v) {
|
value.forEach((v) {
|
||||||
if (v["file_url"] != null) {
|
if (v["file_url"] != null &&
|
||||||
listPromotion.add(PromotionModel.fromJson(v));
|
v["start_date"] != null &&
|
||||||
}
|
v["end_date"] != null) {
|
||||||
}),
|
DateTime startDate = DateTime.parse(v["start_date"]);
|
||||||
refresh()
|
DateTime endDate = DateTime.parse(v["end_date"]);
|
||||||
|
if (startDate.isBefore(now) && endDate.isAfter(now)) {
|
||||||
|
listPromotion.add(PromotionModel.fromJson(v));
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{}
|
|
||||||
});
|
});
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getTokenAdmin() {
|
getTokenAdmin() {
|
||||||
// Api.get(context, Api.getTokenAdmin).then((value) => {tokenAdmin = value["token"]});
|
// Api.get(context, Api.getTokenAdmin).then((value) => {tokenAdmin = value["token"]});
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
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 '../Pay/PayPromptPay.dart';
|
||||||
import '../PinCodeVadidate.dart';
|
import '../PinCodeVadidate.dart';
|
||||||
|
import '../api/api.dart';
|
||||||
import '../utils/color_custom.dart';
|
import '../utils/color_custom.dart';
|
||||||
import 'TransferCathayPayDialog.dart';
|
import 'TransferCathayPayDialog.dart';
|
||||||
|
TextEditingController _phone = TextEditingController();
|
||||||
class TransferCathayPay extends StatefulWidget {
|
class TransferCathayPay extends StatefulWidget {
|
||||||
const TransferCathayPay({Key? key}) : super(key: key);
|
const TransferCathayPay({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@@ -16,7 +20,7 @@ class TransferCathayPay extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _TransferCathayPayState extends State<TransferCathayPay> {
|
class _TransferCathayPayState extends State<TransferCathayPay> {
|
||||||
TextEditingController _phone = TextEditingController();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -118,6 +122,31 @@ class TransferCathayPayDetail extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
|
class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
initPromptPay(context);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
TextEditingController _price = TextEditingController();
|
||||||
|
String name ="";
|
||||||
|
initPromptPay(BuildContext context) {
|
||||||
|
_phone.text = '${_phone.text .substring(0, 3)}-${_phone.text .substring(3, 6)}-${_phone.text .substring(6)}';
|
||||||
|
var param = jsonEncode(<dynamic, dynamic>{"idCardOrMobileDeviceNo": _phone.text, "amount": 0});
|
||||||
|
Api.post(context, Api.transferedPromptPayInitial, param).then((value) => {
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
name = value["prompPayname"].toString()
|
||||||
|
// refresh()
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
|
||||||
|
});
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
refresh() {
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@@ -178,7 +207,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
|
|||||||
children: [
|
children: [
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text(
|
Text(
|
||||||
"",
|
name,
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xff65676b),
|
color: Color(0xff65676b),
|
||||||
|
|||||||
@@ -24,25 +24,37 @@ class _TopUpHistoryState extends State<TransferHistory> {
|
|||||||
getTransaction() {
|
getTransaction() {
|
||||||
listTrans.clear();
|
listTrans.clear();
|
||||||
var date = DateTime.now();
|
var date = DateTime.now();
|
||||||
var start = DateFormat('yyyy-MM-dd').format(DateTime.now());
|
var start = DateFormat('yyyy-MM-dd').format(DateTime(date.year - 1, date.month, date.day));
|
||||||
var end = DateFormat('yyyy-MM-dd').format(DateTime(date.year - 1, date.month, date.day));
|
var end = DateFormat('yyyy-MM-dd').format(DateTime.now());
|
||||||
|
|
||||||
var param = jsonEncode(<dynamic, dynamic>{
|
var param = jsonEncode(<dynamic, dynamic>{
|
||||||
"id": "",
|
"id": "",
|
||||||
"payeeUserAccountId": "",
|
"requestUserID": profile!.id,
|
||||||
"payerUserAccountId": profile!.id,
|
|
||||||
"invoiceId": "",
|
"invoiceId": "",
|
||||||
"referencE1": "",
|
"referencE1": "",
|
||||||
"referencE2": "",
|
"referencE2": "",
|
||||||
"referencE3": "",
|
|
||||||
"paymentStatus": "",
|
"paymentStatus": "",
|
||||||
"paymentChannel": "",
|
"paymentChannel": "",
|
||||||
"qrId": "",
|
"createDatefrom": start,
|
||||||
"createDatefrom": null,
|
"createDateto": end,
|
||||||
"createDateto": null,
|
"requestName": "",
|
||||||
"sattleDate": null,
|
"fullName": ""
|
||||||
"voidDate": null,
|
// "id": "",
|
||||||
"refundDate": null,
|
// "payeeUserAccountId": "",
|
||||||
"cancelDate": null
|
// "payerUserAccountId": profile!.id,
|
||||||
|
// "invoiceId": "",
|
||||||
|
// "referencE1": "",
|
||||||
|
// "referencE2": "",
|
||||||
|
// "referencE3": "",
|
||||||
|
// "paymentStatus": "",
|
||||||
|
// "paymentChannel": "",
|
||||||
|
// "qrId": "",
|
||||||
|
// "createDatefrom": null,
|
||||||
|
// "createDateto": null,
|
||||||
|
// "sattleDate": null,
|
||||||
|
// "voidDate": null,
|
||||||
|
// "refundDate": null,
|
||||||
|
// "cancelDate": null
|
||||||
});
|
});
|
||||||
|
|
||||||
Api.post(context, Api.getTransaction, param).then((value) => {
|
Api.post(context, Api.getTransaction, param).then((value) => {
|
||||||
|
|||||||
@@ -53,14 +53,14 @@ class Api {
|
|||||||
static String otpEmail = BaseUrlCathay+"common/user_login/otp/";
|
static String otpEmail = BaseUrlCathay+"common/user_login/otp/";
|
||||||
static String menuIcons = BaseUrlCathay+"common/icon?is_use=true";
|
static String menuIcons = BaseUrlCathay+"common/icon?is_use=true";
|
||||||
|
|
||||||
static String banner = BaseUrlCathay + "common/banner/";
|
static String banner = BaseUrlCathay + "common/banner?is_use=true";
|
||||||
static String promotion = BaseUrlCathay + "common/promotion/";
|
static String promotion = BaseUrlCathay + "common/promotion?is_use=true";
|
||||||
static String getTokenAdmin = BaseUrlBuilding + "api/v3/User/Login";
|
static String getTokenAdmin = BaseUrlBuilding + "api/v3/User/Login";
|
||||||
static String c2bCreate = BaseUrlBuilding + "api/v2/QR/create/C2B";
|
static String c2bCreate = BaseUrlBuilding + "api/v2/QR/create/C2B";
|
||||||
static String c2bInitial = BaseUrlBuilding + "api/v2/Payment/transaction/initialC2B";
|
static String c2bInitial = BaseUrlBuilding + "api/v2/Payment/transaction/initialC2B";
|
||||||
static String c2bConfirm = BaseUrlBuilding + "api/v2/Payment/transaction/confirmC2B";
|
static String c2bConfirm = BaseUrlBuilding + "api/v2/Payment/transaction/confirmC2B";
|
||||||
static String getTransaction = BaseUrlBuilding + "api/v2/Payment/getTransaction";
|
//static String getTransaction = BaseUrlBuilding + "api/v2/Payment/getTransaction";
|
||||||
|
static String getTransaction = BaseUrlBuilding + "api/v2/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/v2/EPaymentBBL/TransferedPromptPayIDInitial";
|
||||||
static String payPromptPayConfirm = BaseUrlBuilding + "api/v2/EPaymentBBL/TransferedPromptPayIDConfirm";
|
static String payPromptPayConfirm = BaseUrlBuilding + "api/v2/EPaymentBBL/TransferedPromptPayIDConfirm";
|
||||||
|
|||||||
Reference in New Issue
Block a user