From 824183f2553a4d4157481564a8f1eee148e8c0b3 Mon Sep 17 00:00:00 2001 From: gme_2 Date: Fri, 15 Mar 2019 13:29:35 +0900 Subject: [PATCH] timer added --- .DS_Store | Bin 10244 -> 10244 bytes .../Service/SendMoneyCodeService.swift | 6 +++--- .../View/SendMoneyCodeViewController.swift | 7 +++---- Podfile | 1 + 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.DS_Store b/.DS_Store index 9e7f28100eb6e8cd20704104604f7edbf273fcbf..61b8df9304c8ec67c4f7b141584ba87e22ea6aa0 100644 GIT binary patch delta 32 ocmZn(XbG6$C7U^hRb%4Qyc8jj7kBy`y)HUw>ESNO{g0Jgph3IG5A delta 101 zcmZn(XbG6$aFU^hRb>Si8+8V+|!hFpexh9rheh8%`eh7g7#hD3%uhGHNuk)Z@A xnh)gZ0Yys~(tvaoP^7>!CqFqUCqIdSfkA+QfpH511Cz|=S_upG&Fl()*#YMz7s3Dl diff --git a/GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeService.swift b/GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeService.swift index 0e41dcab..69310b96 100644 --- a/GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeService.swift +++ b/GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeService.swift @@ -26,12 +26,12 @@ protocol OtpCodeRequestApiService: ApiServiceType { extension OtpCodeRequestApiService { func requestOtp(customerId: String, success: @escaping (String) -> (), failure: @escaping (Error) -> ()) { - let url = baseUrl + "v2/request/otp" - let params = ["customerId": customerId] - auth.request(method: .get, url: url, params: params, success: { (response: SuccessMessageContainer) in + let url = baseUrl + "v2/kftc/GetOTP/\(customerId)" + auth.request(method: .post, url: url, params: nil, encoding: JSONEncoding.default, success: { (response: SuccessMessageContainer) in success("success") }) { (error) in failure(error) } } } +//api/v2/kftc/GetOTP/saroj.chalise@gmail.com diff --git a/GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift b/GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift index b81c12e0..4b65f795 100644 --- a/GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift +++ b/GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift @@ -49,6 +49,7 @@ class SendMoneyCodeViewController: UIViewController { super.viewDidLoad() self.keyboardSetup() self.setup() + self.requestOtpCode() } override func viewDidDisappear(_ animated: Bool) { @@ -115,7 +116,6 @@ class SendMoneyCodeViewController: UIViewController { self.viewSampleButton.setTitle("view_sample_text".localized(), for: UIControlState.normal) self.submitButton.setTitle("submit_text".localized(), for: .normal) self.notNowButton.setTitle("not_now_text".localized(), for: .normal) - self.requestOtpCode() verificationCodeTextField.delegate = self self.backGourndBorderView.layer.borderWidth = 0.5 self.backGourndBorderView.layer.borderColor = UIColor.init(hex: "#EBECED").cgColor @@ -164,9 +164,8 @@ class SendMoneyCodeViewController: UIViewController { private func requestOtpCode() { - // request otp here - return - let customerId = "" + // request otp + let customerId = Utility.getMyUserName() self.requestOtp(customerId: customerId, success: { (message) in print(message) }) { (error) in diff --git a/Podfile b/Podfile index 8ffbfa34..9dce27fa 100644 --- a/Podfile +++ b/Podfile @@ -15,6 +15,7 @@ pod 'ObjectMapper', '~> 3.3' pod 'VisualEffectView' pod 'MBProgressHUD', '~> 1.1.0' pod 'Hex' +pod 'SwiftyTimer' pod 'XLPagerTabStrip', '~> 8.0' pod 'PMAlertController' pod 'RSKImageCropper'