Browse Source

For Powercall, Recharge Payment

pull/1/head
JB 5 years ago
parent
commit
04ff57d9db
  1. 12
      GME Remit/Modules/PowerCallModules/InternationalTopup/Application Logic/Service/InternationalTopupService.swift
  2. 9
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Interactor/PhoneCardRechargeInteractor.swift
  3. 2
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Interactor/PhoneCardRechargeInteractorIO.swift
  4. 3
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Model/RechargeModel.swift
  5. 12
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Service/PhoneCardRechargeService.swift
  6. 6
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Service/PhoneCardRechargeServiceType.swift
  7. 28
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/Presenter/PhoneCardRechargePresenter.swift
  8. 107
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/View/PhoneCardRecharge.storyboard
  9. 40
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/View/PhoneCardRechargeViewController.swift
  10. 1
      GME Remit/Modules/PowerCallModules/RechargePayment/User Interface/Presenter/RechargePaymentPresenter.swift
  11. 10
      GME Remit/Modules/PowerCallModules/RechargePayment/User Interface/View/RechargePayment.storyboard
  12. 10
      GME Remit/Modules/PowerCallModules/RechargePayment/User Interface/View/RechargePaymentViewController.swift
  13. 1
      GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Service/DomesticRemitService.swift
  14. 8
      GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/DomesticRemit.storyboard
  15. 2
      GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/DomesticRemitViewController.swift
  16. 8
      GME Remit/Modules/RewardModules/RewardGroup/User Interface/View/RewardGroup.storyboard
  17. 2
      GME Remit/Utilities/WebLinks/WkWebView/WKWebView.storyboard
  18. 1
      GME Remit/Utilities/WebLinks/WkWebView/WkWebViewController.swift

12
GME Remit/Modules/PowerCallModules/InternationalTopup/Application Logic/Service/InternationalTopupService.swift

@ -9,6 +9,18 @@
import Foundation
class InternationalTopupService: InternationalTopupServiceType {
func fetchBalance(
type: String,
fintechUseNumber: String,
success: @escaping (BalanceModel) -> Void,
failure: @escaping (Error) -> Void
) {
APIRouter.fetchBalace(
type: type,
fintechUseNumber: fintechUseNumber
).json(success: success, failure: failure)
}
func fetchAutoDebitInformation(
success: @escaping ([Account]) -> Void,
failure: @escaping (Error) -> Void) {

9
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Interactor/PhoneCardRechargeInteractor.swift

@ -62,6 +62,15 @@ class PhoneCardRechargeInteractor {
// MARK: PhoneCardRecharge interactor input interface
extension PhoneCardRechargeInteractor: PhoneCardRechargeInteractorInput {
func fetchBalanceForPowerCall(type: String, fintechUseNumber: String) {
service.fetchBalance(
type: type,
fintechUseNumber: fintechUseNumber,
success: {self.output?.setBalance(with: $0)},
failure: {self.output?.setError(with: $0)}
)
}
func fetchAutoDebitInformation() {
service.fetchAutoDebitInformation(
success: {self.output?.setModel(with: $0)},

2
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Interactor/PhoneCardRechargeInteractorIO.swift

@ -9,6 +9,7 @@
protocol PhoneCardRechargeInteractorInput: class {
func fetchCardList(type: RechargeType, mobile: String)
func fetchAutoDebitInformation()
func fetchBalanceForPowerCall(type: String, fintechUseNumber: String)
}
protocol PhoneCardRechargeInteractorOutput: class {
@ -16,6 +17,7 @@ protocol PhoneCardRechargeInteractorOutput: class {
func setFixedModel(with model: [MainCardInformation])
func setDataOnlyModel(with model: [MainCardInformation])
func setModel(with model: [Account])
func setBalance(with model: BalanceModel)
func setError(with error: Error)
}

3
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Model/RechargeModel.swift

@ -7,6 +7,7 @@
//
struct RechargeModel {
let paymentType: String
let type: String
let chargeType: String
let cardName: String
@ -18,12 +19,14 @@ struct RechargeModel {
var password: String?
init(
paymentType: String,
type: String,
chargeType: String,
cardName: String,
mobile: String,
price: String
) {
self.paymentType = paymentType
self.type = type
self.chargeType = chargeType
self.cardName = cardName

12
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Service/PhoneCardRechargeService.swift

@ -9,6 +9,18 @@
import Foundation
class PhoneCardRechargeService: PhoneCardRechargeServiceType {
func fetchBalance(
type: String,
fintechUseNumber: String,
success: @escaping (BalanceModel) -> Void,
failure: @escaping (Error) -> Void
) {
APIRouter.fetchBalace(
type: type,
fintechUseNumber: fintechUseNumber
).json(success: success, failure: failure)
}
func fetchAutoDebitInformation(
success: @escaping ([Account]) -> Void,
failure: @escaping (Error) -> Void

6
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/Application Logic/Service/PhoneCardRechargeServiceType.swift

@ -17,4 +17,10 @@ protocol PhoneCardRechargeServiceType: class {
success: @escaping ([Account]) -> Void,
failure: @escaping (Error) -> Void
)
func fetchBalance(
type: String,
fintechUseNumber: String,
success: @escaping (BalanceModel) -> Void,
failure: @escaping (Error) -> Void
)
}

28
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/Presenter/PhoneCardRechargePresenter.swift

@ -51,6 +51,7 @@ class PhoneCardRechargePresenter: ViewModelType {
struct Input {
let viewWillAppear: Driver<Void>
let selectAutodebit: Driver<Void>
let showBalanceTrigger: Driver<Void>
let availableBalance: Driver<String>
let selectedMobile: Driver<String>
let contactOpenTap: Driver<Void>
@ -67,6 +68,7 @@ class PhoneCardRechargePresenter: ViewModelType {
let isProgress: Driver<Bool>
let isEnableNext: Driver<Status>
let isSuccessPayment: Driver<Void>
let getBalance: Driver<BalanceModel?>
let bankModel: Driver<[Account]>
let regularModel: Driver<[PriceModel]>
let fixedModel: Driver<[MainCardInformation]>
@ -82,12 +84,12 @@ class PhoneCardRechargePresenter: ViewModelType {
private let errorLinker = PublishSubject<Error>()
private let isSuccessPayment = PublishSubject<Void>()
private let selectedPaymentMode = PublishSubject<Account?>()
private let getBalanceLinker = BehaviorSubject<BalanceModel?>(value: nil)
private let regularModel = BehaviorSubject<[PriceModel]>(value: [])
private let bankModel = BehaviorSubject<[Account]>(value: [])
private let fixedModel = BehaviorSubject<[MainCardInformation]>(value: [])
private let dataOnlyModel = BehaviorSubject<[MainCardInformation]>(value: [])
private var accounts: [Account]?
private var accountType: String?
func transform(input: Input) -> Output {
Driver.combineLatest(input.viewWillAppear, input.selectedMobile, input.selectedRechargeType)
@ -104,6 +106,14 @@ class PhoneCardRechargePresenter: ViewModelType {
})
.disposed(by: disposeBag)
input.showBalanceTrigger.withLatestFrom(selectedPaymentMode.asDriverOnErrorJustComplete()) { $1 }
.drive(onNext: {
let fintechUseNumber = $0?.fintechUseNumber ?? ""
let type = $0?.type ?? "autodebit"
self.progressLinker.onNext(true)
self.interactor?.fetchBalanceForPowerCall(type: type, fintechUseNumber: fintechUseNumber)
}).disposed(by: disposeBag)
input.selectAutodebit.drive(onNext: {[weak self] in
let model = try? self?.bankModel.value()
self?.wireframe?.showPaymentMode(with: model)
@ -123,7 +133,7 @@ class PhoneCardRechargePresenter: ViewModelType {
input.selectedCarrierPlan.asObservable(),
input.selectedDataOnlyType.asObservable()
)
let carrierPlanModel = input.selectedCarrierType.map { $0?.subCardInfo ?? [] }
let detailCarrierPlanModel = input.selectedCarrierPlan.map { $0?.planInfo }
@ -159,7 +169,9 @@ class PhoneCardRechargePresenter: ViewModelType {
.map { ( _, mobile, type, priceModel, _, carrierPlan, dataOnlyType) -> RechargeModel? in
switch type {
case .regular:
return RechargeModel(
paymentType: self.accountType ?? "",
type: type.value,
chargeType: "",
cardName: "",
@ -168,6 +180,7 @@ class PhoneCardRechargePresenter: ViewModelType {
)
case .fixed:
return RechargeModel(
paymentType: self.accountType ?? "",
type: type.value,
chargeType: carrierPlan?.cardType ?? "",
cardName: carrierPlan?.cardName ?? "",
@ -176,6 +189,7 @@ class PhoneCardRechargePresenter: ViewModelType {
)
case .dataOnly:
return RechargeModel(
paymentType: self.accountType ?? "",
type: type.value,
chargeType: dataOnlyType?.cardCode ?? "",
cardName: dataOnlyType?.cardName ?? "",
@ -193,6 +207,7 @@ class PhoneCardRechargePresenter: ViewModelType {
isProgress: progressLinker.asDriverOnErrorJustComplete(),
isEnableNext: isEnableNext.asDriverOnErrorJustComplete(),
isSuccessPayment: isSuccessPayment.asDriverOnErrorJustComplete(),
getBalance: getBalanceLinker.asDriverOnErrorJustComplete(),
bankModel: bankModel.asDriverOnErrorJustComplete(),
regularModel: regularModel.asDriverOnErrorJustComplete(),
fixedModel: fixedModel.asDriverOnErrorJustComplete(),
@ -206,6 +221,13 @@ class PhoneCardRechargePresenter: ViewModelType {
// MARK: PhoneCardRecharge interactor output interface
extension PhoneCardRechargePresenter: PhoneCardRechargeInteractorOutput {
func setBalance(with model: BalanceModel) {
progressLinker.onNext(false)
getBalanceLinker.onNext(model)
}
func setModel(with model: [Account]) {
progressLinker.onNext(false)
bankModel.onNext(model)

107
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/View/PhoneCardRecharge.storyboard

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Im1-C5-3ON">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
@ -83,57 +83,80 @@
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DZ1-Nc-ndh">
<rect key="frame" x="0.0" y="57" width="335" height="58.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="PaymentType" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nFD-fi-y2F">
<rect key="frame" x="0.0" y="0.0" width="103.5" height="58.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PSf-hq-y74">
<rect key="frame" x="103.5" y="0.0" width="30" height="58.5"/>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WeZ-AA-bBZ">
<rect key="frame" x="0.0" y="0.0" width="133.5" height="58.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="vG3-iU-w8w">
<rect key="frame" x="5" y="14.5" width="20" height="30"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="PaymentType" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nFD-fi-y2F">
<rect key="frame" x="0.0" y="0.0" width="103.5" height="58.5"/>
<gestureRecognizers/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PSf-hq-y74">
<rect key="frame" x="103.5" y="0.0" width="30" height="58.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="vG3-iU-w8w">
<rect key="frame" x="5" y="14.5" width="20" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="7e4-nh-8po"/>
<constraint firstAttribute="width" constant="20" id="SfD-g3-hVJ"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="height" constant="30" id="7e4-nh-8po"/>
<constraint firstAttribute="width" constant="20" id="SfD-g3-hVJ"/>
<constraint firstItem="vG3-iU-w8w" firstAttribute="centerX" secondItem="PSf-hq-y74" secondAttribute="centerX" id="CCG-H3-bz8"/>
<constraint firstAttribute="trailing" secondItem="vG3-iU-w8w" secondAttribute="trailing" constant="5" id="Rd0-KT-fvs"/>
<constraint firstItem="vG3-iU-w8w" firstAttribute="centerY" secondItem="PSf-hq-y74" secondAttribute="centerY" id="jXA-2P-hjN"/>
<constraint firstItem="vG3-iU-w8w" firstAttribute="leading" secondItem="PSf-hq-y74" secondAttribute="leading" constant="5" id="seN-RK-xV1"/>
</constraints>
</imageView>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="vG3-iU-w8w" firstAttribute="centerX" secondItem="PSf-hq-y74" secondAttribute="centerX" id="CCG-H3-bz8"/>
<constraint firstAttribute="trailing" secondItem="vG3-iU-w8w" secondAttribute="trailing" constant="5" id="Rd0-KT-fvs"/>
<constraint firstItem="vG3-iU-w8w" firstAttribute="centerY" secondItem="PSf-hq-y74" secondAttribute="centerY" id="jXA-2P-hjN"/>
<constraint firstItem="vG3-iU-w8w" firstAttribute="leading" secondItem="PSf-hq-y74" secondAttribute="leading" constant="5" id="seN-RK-xV1"/>
</constraints>
</view>
<gestureRecognizers/>
<connections>
<outletCollection property="gestureRecognizers" destination="0Eu-f1-GtD" appends="YES" id="Beq-aU-67D"/>
</connections>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3hA-pE-tAA">
<rect key="frame" x="133.5" y="0.0" width="120.5" height="58.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="₩" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4of-c7-86a">
<rect key="frame" x="254" y="0.0" width="20" height="58.5"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="BhO-Ma-WpS"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Balance" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4MR-lK-FAv">
<rect key="frame" x="274" y="0.0" width="61" height="58.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dua-8R-eEg">
<rect key="frame" x="254" y="0.0" width="81" height="58.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="₩" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4of-c7-86a">
<rect key="frame" x="0.0" y="0.0" width="20" height="58.5"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="BhO-Ma-WpS"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Balance" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4MR-lK-FAv">
<rect key="frame" x="20" y="0.0" width="61" height="58.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HzE-op-beR">
<rect key="frame" x="335" y="0.0" width="0.0" height="58.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="13"/>
<state key="normal" title="Button">
<color key="titleColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="checkBalanceButton:" destination="HSb-ou-7T5" eventType="touchUpInside" id="jYg-v6-VJy"/>
</connections>
</button>
</subviews>
<gestureRecognizers/>
<connections>
<outletCollection property="gestureRecognizers" destination="0Eu-f1-GtD" appends="YES" id="79b-Nt-Imx"/>
</connections>
</stackView>
</subviews>
</stackView>
@ -846,6 +869,8 @@
<outlet property="amountButton4" destination="eMU-67-9FG" id="JHu-tK-gO3"/>
<outlet property="amountButton5" destination="YN1-ij-fqB" id="qoy-GK-c20"/>
<outlet property="amountButton6" destination="0NT-dR-BSe" id="I0s-Vf-Qkw"/>
<outlet property="balanceCheckButton" destination="HzE-op-beR" id="ORw-Wi-O65"/>
<outlet property="balanceStackView" destination="Dua-8R-eEg" id="imh-wd-A5K"/>
<outlet property="carrierPlanDetailView" destination="LIi-3m-pgI" id="Pg8-ih-UkC"/>
<outlet property="carrierPlanTextField" destination="12I-NP-LBC" id="ik6-hV-eZ0"/>
<outlet property="carrierTypeTextField" destination="O2g-I1-ksu" id="ayr-JH-N5h"/>
@ -900,7 +925,7 @@
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="Im1-C5-3ON" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Bf4-io-GTo">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>

40
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/View/PhoneCardRechargeViewController.swift

@ -23,6 +23,7 @@ class PhoneCardRechargeViewController: UIViewController {
private let selectedMobile = PublishSubject<String>()
private let selectPaymentType = PublishSubject<Void>()
private var amountButtons = [UIButton]()
// MARK: Computed Properties
// MARK: IBOutlets
@ -37,6 +38,7 @@ class PhoneCardRechargeViewController: UIViewController {
@IBOutlet private weak var typeSegment: UISegmentedControl!
@IBOutlet private weak var mainContainerView: UIView!
@IBOutlet private weak var menuContainerView: UIStackView!
@IBOutlet weak var balanceStackView: UIStackView!
@IBOutlet weak var paymentTypeDropDownImageView: UIImageView!
@IBOutlet var paymentTypeDropDownTap: UITapGestureRecognizer!
@ -49,6 +51,8 @@ class PhoneCardRechargeViewController: UIViewController {
@IBOutlet private weak var amountButton4: UIButton!
@IBOutlet private weak var amountButton5: UIButton!
@IBOutlet private weak var amountButton6: UIButton!
@IBOutlet weak var balanceCheckButton: UIButton!
@IBOutlet private weak var regularTypeInfoContainerView: UIView!
@IBOutlet private weak var regularInformationLabel1: UILabel!
@IBOutlet private weak var regularInformationLabel2: UILabel!
@ -107,6 +111,10 @@ class PhoneCardRechargeViewController: UIViewController {
@IBAction func touchAmountButton(_ sender: UIButton) {
selectedAmountButton.onNext(sender.tag)
}
@IBAction func checkBalanceButton(_ sender: UIButton) {
}
}
// MARK: Other Functions
@ -119,6 +127,7 @@ extension PhoneCardRechargeViewController {
}
private func setUI() {
balanceCheckButton.isHidden = true
regularTypeContainerView.isHidden = true
regularTypeInfoContainerView.isHidden = true
fixedChargeTypeContainerView.isHidden = true
@ -133,6 +142,7 @@ extension PhoneCardRechargeViewController {
)
nextButton.layer.cornerRadius = 5
balanceCheckButton.layer.cornerRadius = 5
regularTypeButtonsStackView.travelSubView { (view, _) in
if let button = view as? UIButton {
@ -194,6 +204,7 @@ extension PhoneCardRechargeViewController {
let input = PhoneCardRechargePresenter.Input(
viewWillAppear: viewWillAppear,
selectAutodebit: selectPaymentType.asDriverOnErrorJustComplete(),
showBalanceTrigger: balanceCheckButton.rx.tap.asDriver(),
availableBalance: availableBalance.asDriverOnErrorJustComplete(),
selectedMobile: selectedMobile.asDriverOnErrorJustComplete(),
contactOpenTap: contactButton.rx.tap.asDriverOnErrorJustComplete(),
@ -225,6 +236,14 @@ extension PhoneCardRechargeViewController {
}
).disposed(by: disposeBag)
output.getBalance.map { $0?.balance?.decimalToCurrency() }
.drive(onNext: { [weak self] in
guard let balance = $0 else { return }
self?.balanceStackView.isHidden = false
self?.balanceCheckButton.isHidden = true
self?.mycashAmountLabel.text = balance
}).disposed(by: disposeBag)
output.isProgress
.drive(
onNext: { $0 ? self.showProgressHud() : self.hideProgressHud() }
@ -257,6 +276,27 @@ extension PhoneCardRechargeViewController {
.drive(nextButton.rx.isEnabled)
.disposed(by: disposeBag)
output.selectedPaymentMode.drive(onNext: {[weak self] in
guard
let model = $0 else {
return
}
if model.type == "wallet" {
self?.balanceCheckButton.isHidden = true
self?.balanceStackView.isHidden = false
self?.mycashAmountLabel.text = GMEDB.shared.user.string(.availableBalance)
} else {
self?.balanceCheckButton.isHidden = false
self?.balanceCheckButton.setTitle("account_balance_button_text".localized(), for: .normal)
self?.balanceCheckButton.backgroundColor = .themeBlue
self?.balanceCheckButton.setTitleColor(.white, for: .normal)
self?.balanceCheckButton.titleLabel?.minimumScaleFactor = 0.1
self?.balanceCheckButton.titleLabel?.adjustsFontSizeToFitWidth = true
self?.balanceStackView.isHidden = true
}
}).disposed(by: disposeBag)
output.regularModel.drive(onNext: { [weak self] model in
guard let `self` = self, model.count == self.amountButtons.count else { return }
self.amountButtons.enumerated().forEach { index, button in

1
GME Remit/Modules/PowerCallModules/RechargePayment/User Interface/Presenter/RechargePaymentPresenter.swift

@ -80,6 +80,7 @@ class RechargePaymentPresenter: ViewModelType {
// MARK: RechargePayment interactor output interface
extension RechargePaymentPresenter: RechargePaymentInteractorOutput {
func setSubmitSuccess() {
progressLinker.onNext(false)
submitSuccess.onNext(())

10
GME Remit/Modules/PowerCallModules/RechargePayment/User Interface/View/RechargePayment.storyboard

@ -46,7 +46,7 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Recharge Payment" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N1B-BY-KYh">
<rect key="frame" x="96.5" y="13.5" width="127.5" height="17.5"/>
<rect key="frame" x="99.5" y="13" width="121.5" height="18"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -74,13 +74,13 @@
<rect key="frame" x="0.0" y="0.0" width="280" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="GME Wallet" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BbA-cc-yhb">
<rect key="frame" x="0.0" y="0.0" width="79" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="71.5" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="15"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="₩" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TcE-Ri-cia">
<rect key="frame" x="84" y="0.0" width="180" height="50"/>
<rect key="frame" x="76.5" y="0.0" width="187.5" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="19"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
@ -100,13 +100,13 @@
<rect key="frame" x="0.0" y="50" width="280" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Payment Amount" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nHm-bO-7dx">
<rect key="frame" x="0.0" y="0.0" width="116" height="40"/>
<rect key="frame" x="0.0" y="0.0" width="111" height="40"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="15"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="- ₩" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bAn-wR-MDl">
<rect key="frame" x="121" y="0.0" width="143" height="40"/>
<rect key="frame" x="116" y="0.0" width="148" height="40"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="19"/>
<color key="textColor" name="ThemeRed"/>
<nil key="highlightedColor"/>

10
GME Remit/Modules/PowerCallModules/RechargePayment/User Interface/View/RechargePaymentViewController.swift

@ -157,6 +157,16 @@ extension RechargePaymentViewController {
.drive(balanceLabel.rx.text)
.disposed(by: disposeBag)
output.rechargeModel.drive(onNext: { [weak self] in
guard let model = $0 else {
return
}
if model.paymentType == "" {
self?.gmeWalletTitleLabel.text = "Bank Name"
self?.balanceTitleLabel.text = "Expected \(self?.gmeWalletTitleLabel) Balance"
}
}).disposed(by: disposeBag)
let tapGestureRecognizer = UITapGestureRecognizer()
tapGestureRecognizer.delegate = self
tapGestureRecognizer.rx.event.asDriver()

1
GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Service/DomesticRemitService.swift

@ -37,7 +37,6 @@ class DomesticRemitService: DomesticRemitServiceType {
type: type,
fintechUseNumber: fintechUseNumber
).json(success: success, failure: failure)
}
func send(

8
GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/DomesticRemit.storyboard

@ -116,13 +116,13 @@
<rect key="frame" x="0.0" y="0.0" width="52.5" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="N/A" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="crF-eg-HNv">
<rect key="frame" x="0.0" y="0.0" width="16.5" height="30"/>
<rect key="frame" x="0.0" y="0.0" width="22" height="30"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" KRW" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JOx-My-xUB">
<rect key="frame" x="16.5" y="0.0" width="36" height="30"/>
<rect key="frame" x="22" y="0.0" width="30.5" height="30"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
@ -381,13 +381,13 @@
<rect key="frame" x="0.0" y="20" width="315" height="16"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="253" verticalHuggingPriority="251" text="●" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PQ8-Xe-tzc">
<rect key="frame" x="0.0" y="0.0" width="8.5" height="16"/>
<rect key="frame" x="0.0" y="0.0" width="8" height="16"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="It will deduct oooKRW (Amount + ServiceFee)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="0rB-T2-pd1">
<rect key="frame" x="13.5" y="0.0" width="301.5" height="16"/>
<rect key="frame" x="13" y="0.0" width="302" height="16"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>

2
GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/DomesticRemitViewController.swift

@ -212,7 +212,7 @@ extension DomesticRemitViewController {
self.autoDebitTextField.text = ""
return
}
if model.type == "wallet" {
self.balanceButton.isHidden = true
self.balanceLabel.text = GMEDB.shared.user.string(.availableBalance)

8
GME Remit/Modules/RewardModules/RewardGroup/User Interface/View/RewardGroup.storyboard

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="GtC-iQ-Pz8">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="GtC-iQ-Pz8">
<device id="retina4_7" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -87,10 +87,10 @@
<resources>
<image name="ic_cancel" width="12" height="12"/>
<namedColor name="ThemeBlack">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</namedColor>
<namedColor name="ThemeMainBackground">
<color red="0.14901960784313725" green="0.14901960784313725" blue="0.14901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

2
GME Remit/Utilities/WebLinks/WkWebView/WKWebView.storyboard

@ -26,7 +26,7 @@
<action selector="touchCloseButton:" destination="5lk-h3-UEb" id="qBz-nF-Q8Y"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" enabled="NO" id="xJS-bw-OH2">
<barButtonItem key="rightBarButtonItem" title="hhhhh" id="xJS-bw-OH2">
<connections>
<action selector="touchCertTest:" destination="5lk-h3-UEb" id="AKG-5B-Oi3"/>
</connections>

1
GME Remit/Utilities/WebLinks/WkWebView/WkWebViewController.swift

@ -96,7 +96,6 @@ class WkWebViewController: UIViewController {
webView.load(myRequest)
}
}
}
extension WkWebViewController: WKUIDelegate, WKNavigationDelegate {

Loading…
Cancel
Save