Browse Source

timer added

pull/1/head
gme_2 6 years ago
parent
commit
824183f255
  1. BIN
      .DS_Store
  2. 6
      GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeService.swift
  3. 7
      GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift
  4. 1
      Podfile

BIN
.DS_Store

6
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

7
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

1
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'

Loading…
Cancel
Save