diff --git a/GMERemittance/AppDelegate.swift b/GMERemittance/AppDelegate.swift index 0973d48f..f973bde2 100644 --- a/GMERemittance/AppDelegate.swift +++ b/GMERemittance/AppDelegate.swift @@ -19,7 +19,7 @@ import AlamofireNetworkActivityLogger import IQKeyboardManagerSwift import LGSideMenuController -let server: Server = .stagging +let server: Server = .uat @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, MessagingDelegate { diff --git a/GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift b/GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift index 4ead6ee3..e18bd744 100644 --- a/GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift +++ b/GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift @@ -29,16 +29,18 @@ class WkWebViewController: UIViewController, WKUIDelegate { -// if let myURL = URL(string: self.url ?? "") { -// var myRequest = URLRequest(url: myURL) -// -// headers.forEach({ -// myRequest.setValue($0.key ?? "", forHTTPHeaderField: $0.value ?? "") -// }) - let url = URL.init(string: "https://www.apple.com") - let myRequest = URLRequest.init(url: url!) + if let myURL = URL(string: self.url ?? "") { + var myRequest = URLRequest(url: myURL) + + headers.forEach({ + myRequest.setValue($0.key ?? "", forHTTPHeaderField: $0.value ?? "") + + }) + + print(myRequest.allHTTPHeaderFields) webView.load(myRequest) } + } private func addCloseButton() { let button = UIBarButtonItem.init(title: "Close", style: UIBarButtonItemStyle.plain, target: self, action: #selector(self._dismiss)) diff --git a/GMERemittance/Model/Account.swift b/GMERemittance/Model/Account.swift index 85921825..9347c994 100644 --- a/GMERemittance/Model/Account.swift +++ b/GMERemittance/Model/Account.swift @@ -90,7 +90,7 @@ class KFTCModel: Mappable { var model: [Account]? var url: String? var header: [KftcHeader]? - var language: [KftcLanguage]? + var languages: [KftcLanguage]? required init?(map: Map) { } @@ -98,6 +98,7 @@ class KFTCModel: Mappable { func mapping(map: Map) { model <- map["AccountList"] header <- map["Header"] + languages <- map ["Language"] } } diff --git a/GMERemittance/Module/AutoDebit/Application Logic/Service/AutoDebitService.swift b/GMERemittance/Module/AutoDebit/Application Logic/Service/AutoDebitService.swift index b3867d91..f305ea44 100644 --- a/GMERemittance/Module/AutoDebit/Application Logic/Service/AutoDebitService.swift +++ b/GMERemittance/Module/AutoDebit/Application Logic/Service/AutoDebitService.swift @@ -28,7 +28,7 @@ protocol FetchAccountList: ApiServiceType { extension FetchAccountList { func fetchAccountList(username: String, success: @escaping (KFTCModel?) -> (), failure: @escaping (Error) -> ()) { - let url = baseUrl + "kftc/GetKftcParameters/" + username + let url = "http://gmeuat.gmeremit.com:5012/api/v2/" + "kftc/GetKftcParameters/" + username auth.request(method: .get, url: url, params: nil, encoding: URLEncoding.default, success: { (response: KftcAccountContainer) in if (response.errorCode ?? "") == "1" { diff --git a/GMERemittance/Module/AutoDebit/User Interface/View/AutoDebitViewController.swift b/GMERemittance/Module/AutoDebit/User Interface/View/AutoDebitViewController.swift index 5cc52f11..04675a6e 100644 --- a/GMERemittance/Module/AutoDebit/User Interface/View/AutoDebitViewController.swift +++ b/GMERemittance/Module/AutoDebit/User Interface/View/AutoDebitViewController.swift @@ -20,7 +20,7 @@ class AutoDebitViewController: UIViewController { var kftcDetail: KFTCModel? { didSet { self.accounts = kftcDetail?.model ?? [] - self.languages = kftcDetail?.language + self.languages = kftcDetail?.languages self.header = kftcDetail?.header self.url = kftcDetail?.url self.tableView.reloadData() @@ -58,7 +58,7 @@ class AutoDebitViewController: UIViewController { super.viewWillAppear(animated) self.setupNormalNavigation() self.navigationItem.title = "My Accounts" -// fetchReceipients() + fetchReceipients() } override func viewDidLoad() { @@ -76,6 +76,7 @@ class AutoDebitViewController: UIViewController { private func openWkWebViewWith(url: String) { let viewcontroller = UIStoryboard.init(name: "WKWebView", bundle: nil).instantiateViewController(withIdentifier: "WkWebViewController") as! WkWebViewController + viewcontroller.url = url let nvc = UINavigationController.init(rootViewController: viewcontroller) self.present(nvc, animated: true, completion: nil) } @@ -89,7 +90,7 @@ class AutoDebitViewController: UIViewController { @IBAction func addNewAccount(_ sender: UITapGestureRecognizer) { print("add new account") - self.languages = createDummyLangugage() + if (self.languages ?? []).isEmpty { self.alert(message: "No Lanugages Available") } @@ -113,6 +114,8 @@ class AutoDebitViewController: UIViewController { picker.addAction(action) }) + let cancelAction = UIAlertAction.init(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil) + picker.addAction(cancelAction) self.present(picker, animated: true, completion: nil) } diff --git a/Pods/Pods.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist index e9edbbb7..30ca7e8b 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Pods/Pods.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist @@ -17,7 +17,7 @@ AlamofireNetworkActivityLogger.xcscheme orderHint - 9 + 8 BRYXBanner.xcscheme