0

我正在尝试在Swift的CitrusPay中设置卡类型

我需要帮助将以下Objective-C行转换为Swift

CTSElectronicCardUpdate *debitCard = [[CTSElectronicCardUpdate alloc] initDebitCard];

这是编译器建议我的:

let debitCard: CTSElectronicCardUpdate = CTSElectronicCardUpdate.init(debitCard: ())

所以借记卡需要函数类型

4

1 回答 1

1

这对我有用

 let debitCard = CTSElectronicCardUpdate(debitCard: ())
 debitCard.number = cardNumber.
 debitCard.expiryDate = formatted; //only mm/yyyy format
 debitCard.scheme = CTSUtility.fetchCardSchemeForCardNumber(number Here)
 debitCard.ownerName = userName.value; // no special characters here
 debitCard.cvv = cvv.value;
于 2016-05-13T07:06:58.707 回答