PreAuth
public class PreAuth: Transaction, TransactionPath
When you want to process a Pre-authorization, you create a Pre-auth object and start adding the necessary information. This Transaction supports two types of Pre-auths. You can process Pre-auths using a full set of card details, or by referencing a previously processed transaction.
- Card Pre-auth
- For pre-auths where you have the full card details including the card number.
- Token Pre-auth
- For processing payments using a saved card (requires the Card token and Consumer token values).
Transaction
contains all the necessary implementation of Payments and Pre-auths since these are very closely related.
Card Pre-auth
myJudoSession.preauth(correctJudoID, amount: amount, reference: references)
.card(card)
.location(location)
.contact(mobileNumber, emailAddress)
.completion({ (data, error) -> () in
if let = error {
// failure
} else {
// success
}
})
<a href=’#tokenpre_auth’ class=‘anchor’ aria-hidden=true>Token Pre-auth
swift token preAuth
myJudoSession.preauth(correctJudoID, amount: amount, reference: references)
.paymentToken(payToken)
.location(location)
.contact(mobileNumber, emailAddress)
.completion({ (data, error) -> () in
if let _ = error {
// failure
} else {
// success
}
})
Learn more here
-
path variable for pre-auth class
Declaration
Swift
public static var path: String { get { return "transactions/preauths" } }