Skip to content

Swe 12 enable payment suite #13

Merged
merged 14 commits into from Apr 8, 2019

SWE-12 handle web service call and prepare to push to payment result

  • Loading branch information
ahm11003 committed Mar 29, 2019
commit 511f4f578e7dcb7d4afc6571b31b0935652dedc1
@@ -12,6 +12,7 @@ import Foundation
class PaymentDetailInterfaceController: WKInterfaceController {
var selectedAccount: Account?
var dictForAcct: [String: Account] = [:]
var dictForPayment: [String: String] = [:]
var paymentButtonArmed: Bool = false
var paymentAmount: Double = 0.0

@@ -34,6 +35,14 @@ class PaymentDetailInterfaceController: WKInterfaceController {
@IBAction func paymentAction() {
if paymentButtonArmed {
popToRootController()
guard let alias = selectedAccount?.accountAlias else { return }
FetchData.submitPayment(for: alias, type: "CBL", amount: 20.00, bankID: "9999") { confirmationNum, paymentID, error in
guard error == nil else { return }
self.dictForPayment.updateValue(confirmationNum, forKey: "payment_confirmation_number")
self.dictForPayment.updateValue(paymentID, forKey: "payment_id")
}

// popToRootController()
} else {
// animate(withDuration: 0.75) {
// self.paymentButton.setBackgroundColor(UIColor.init(red: 141, green: 241, blue: 48, alpha: 1.0))
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.