Closed teodorciuraru closed 6 years ago
Hey, this should do the trick:
func userDidProvide(_ cardInfo: CardIOCreditCardInfo!, in paymentViewController: CardIOPaymentViewController!) {
let numberFormatter = NumberFormatter()
numberFormatter.minimumIntegerDigits = 2
numberFormatter.maximumIntegerDigits = 2
cardNumberTextField.prefill(cardInfo.cardNumber)
monthInputTextField.prefill(numberFormatter.string(from: cardInfo.expiryMonth as NSNumber) ?? "")
yearInputTextField.prefill(numberFormatter.string(from: cardInfo.expiryYear as NSNumber) ?? "")
cvcInputTextField.prefill(cardInfo.cvv)
paymentViewController.dismiss(animated: true, completion: nil)
}
How can I combine the last example in this repo (multiple TextFields) with an accessory button that will open CardIO?