forked from Ryce/JudoKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Custom UI registerCard
Hamon Ben Riazy edited this page Apr 25, 2016
·
2 revisions
To register a card without the need of a UI provided by judo, use the following snippet. BE AWARE that you need to make sure that the card number, date and security code information and in a correct format are valid.
do {
let registerCard = try judo.registerCard(myJudoID, amount: oneGBPAmount, reference: validReference)
registerCard.card(validVisaTestCard)
try registerCard.completion({ (response, error) -> () in
if let error = error {
// handle transaction error
}
})
} catch {
// handle exception thrown (eg. judoId is luhn invalid)
}