我正在使用STPPaymentCardTextField
从用户那里收集卡信息。
我可以使用STPPaymentCardTextFieldDelegate
的委托方法来获取'cardNumber
,expirationMonth
等信息:
func paymentCardTextFieldDidChange(_ textField: STPPaymentCardTextField) {
print("NUMBER", textField.cardNumber)
print("EXP MONTH", textField.expirationMonth)
print("EXP YEAR", textField.expirationYear)
print("CVC", textField.cvc)
}
但是,根据用户在中输入的信息,此textField似乎也显示卡的类型。
我如何以编程方式访问此卡类型?我在另一个UIView
中使用它来生成卡的预览,根据卡的类型等设置其背景颜色和徽标。
我正在使用STPPaymentCardTextField来收集用户的卡信息。我可以使用STPPaymentCardTextFieldDelegate的委托方法来获取信息,例如'cardNumber,...