使用worldpays lib处理卡时,使用无效卡时出现NSError

时间:2017-02-28 16:38:31

标签: swift payment-gateway worldpay

我正在使用Worldpays lib处理卡片。我正在尝试在使用无效卡时分解NSError。它产生了一个回应:

print(response.0?["UserInfo"])
print(response.0?.description)



wp.createTokenWithName(onCard: ccName, cardNumber: ccNumber, expirationMonth: ccExpMonth, expirationYear: ccExpYear, cvc: ccCVC, success:{(code, response) in
            
            self.selectedToken = response!["token"] as! String?
            if self.isNewCard {
                self.transactionCall()
            } else {
                self.saveCardToAccount()
            }

        }, failure: {(response) in
            //TODO ERROR REPORTING
            print( (response.0).userInfo)
            print(response.0?.description)

        });

我无法弄清楚如何获得" userinfo"从返回的对象。我试过了:

FBAdViewDelegate

0 个答案:

没有答案