Classes

The following classes are available globally.

  • The CardInputField is an input field configured to detect, validate and present card numbers of various types of credit cards.

    See more

    Declaration

    Swift

    public class CardInputField: JudoPayInputField
  • The DateInputField is an input field configured to detect, validate and dates that are set to define a start or end date of various types of credit cards.

    See more

    Declaration

    Swift

    public class DateInputField: JudoPayInputField
  • The JudoPayInputField is a UIView subclass that is used to help to validate and visualize common information related to payments. This class delivers the common ground for the UI and UX. Text fields can either be used in a side-by-side motion (title on the left and input text field on the right) or with a floating title that floats to the top as soon as a user starts entering their details.

    It is not recommended to use this class directly but rather use the subclasses of JudoPayInputField that are also provided in judoKit as this class does not do any validation which are necessary for making any kind of transaction.

    See more

    Declaration

    Swift

    public class JudoPayInputField: UIView, UITextFieldDelegate, ErrorAnimatable
  • Label that sits below the payment entry form, showing alerts and hints

    See more

    Declaration

    Swift

    public class HintLabel: UILabel
  • The SecurityInputField is an input field configured to detect, validate and present security numbers of various types of credit cards.

    See more

    Declaration

    Swift

    public class SecurityInputField: JudoPayInputField
  • A Void transaction is next to a collection the second counterpart to a Pre-authorization transaction. While the Pre-auth transaction reserves funds on a Consumer’s card, the Collection initiates the transfer of those reserved funds into your judo account and the Void transaction cancels the previously executed pre-Authorization.

    void by ID and amount

       myJudoSession.void(receiptId, amount: amount).completion({ (dict, error) -> () in
           if let error = error {
               // error
           } else {
               // success
           }
       })
    

    See more

    Declaration

    Swift

    public class VoidTransaction: TransactionProcess, TransactionPath
  • The CardLogoView that shows a given card logo on a view

    See more

    Declaration

    Swift

    public class CardLogoView: UIView
  • A Collection transaction is the counterpart to a Pre-authorization transaction. While the Pre-auth transaction reserves funds on a Consumer’s card, the Collection initiates the transfer of those reserved funds into your judo account.

    collection by ID and amount

        muJudoSession.collection(receiptId, amount: amount).completion({ (dict, error) -> () in
            if let error = error {
                // error
            } else {
                // success
            }
        })
    

    See more

    Declaration

    Swift

    public class Collection: TransactionProcess, TransactionPath
  • The PostCodeInputField is an input field configured to detect, validate and present post codes of various countries.

    See more

    Declaration

    Swift

    public class PostCodeInputField: JudoPayInputField
  • JudoPayView - the main view in the transaction journey

    See more

    Declaration

    Swift

    public class JudoPayView: UIView
  • Superclass Helper for Payment, Pre-auth and RegisterCard

    See more

    Declaration

    Swift

    public class Transaction: SessionProtocol
  • the JudoPayViewController is the one solution build to guide a user through the journey of entering their card details.

    See more

    Declaration

    Swift

    public class JudoPayViewController: UIViewController
  • The 3DSWebView is a UIWebView subclass that is configured to detect the execution of a 3DS validation page.

    See more

    Declaration

    Swift

    public class _DSWebView: UIWebView
  • You can get a copy of the receipt for an individual transaction by creating a Receipt Object and calling .completion(() -> ()) including the receipt ID for the transaction in the path. Alternatively, you can receive a list of all the transactions. By default it will return 10 transactions. These results are returned in time-descending order by default, so it will return the latest 10 transactions.

    Receipt by ID

        myJudoSession.receipt(receiptId).completion({ (dict, error) -> () in
            if let  = error {
                // error
            } else {
                // success
            }
        })
    

    All receipts

        myJudoSession.receipt(nil).completion({ (dict, error) -> () in
            if let  = error {
                // error
            } else {
                // success
            }
        })
    

    See more

    Declaration

    Swift

    public class Receipt
  • 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

    See more

    Declaration

    Swift

    public class PreAuth: Transaction, TransactionPath
  • CardDetails

    The CardDetails object stores information that is returned from a successful payment or pre-auth

    This class also implements the NSCoding protocol to enable serialization for persistency

    See more

    Declaration

    Swift

    public class CardDetails: NSObject, NSCoding
  • The LoadingView is a convenience class that is configured to show a block with a activityIndicator and a description text

    See more

    Declaration

    Swift

    public class LoadingView: UIView
  • The PayButton is a button that is configured to layout a judo pay button for the transaction journey

    See more

    Declaration

    Swift

    public class PayButton: UIButton
  • The IssueNumberInputField is an input field configured to detect, validate and present issue numbers for Maestro cards.

    See more

    Declaration

    Swift

    public class IssueNumberInputField: JudoPayInputField
  • The BillingCountryInputField is an input field configured to select a billing country out of a selected set of countries that we currently support.

    See more

    Declaration

    Swift

    public class BillingCountryInputField: JudoPayInputField
  • When you want to register a card, you create a RegisterCard object and start adding the necessary information. This transaction only supports one kind of registration. You have to do this using a full set of card details.

    • Card registration
    • For registrations where you have the full card details including the card number.

    Transaction contains all the necessary implementation of Payments, PreAuths and RegisterCards since these are very closely related

    Card registration

        myJudoSession.registerCard(correctJudoID, amount: amount, reference: references)
                     .card(card)
                     .location(location)
                     .contact(mobileNumber, emailAddress)
                     .completion({ (data, error) -> () in
                         if let _ = error {
                             // failure
                         } else {
                             // success
                         }
        })
    

    Learn more here

    See more

    Declaration

    Swift

    public class RegisterCard: Transaction, TransactionPath
  • Refunding a successful payment is easy, simply identify the original receipt ID for the payment and the amount you wish to refund. When we’ve received this request, we check to ensure there is a sufficient balance to process the refund and then process the request accordingly. Here is an example to how you can make a Refund with the SDK.

    Refund by ID and amount

        myJudoSession.refund(receiptId, amount: amount).completion({ (dict, error) -> () in
            if let error = error {
                // error
            } else {
                // success
            }
        })
    

    See more

    Declaration

    Swift

    public class Refund: TransactionProcess, TransactionPath
  • When you want to process a payment transaction, you create a Payment object and start adding the necessary information. This transaction supports two types of Payments. You can process payments using a full set of card details, or by referencing a previously processed transaction.

    • Card Payment
      • For payments where you have the full card details including the card number.
    • Token Payment
      • 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 payment

        muJudoSession.payment(correctJudoID, amount: amount, reference: references)
                     .card(card)
                     .location(location)
                     .contact(mobileNumber, emailAddress)
                     .completion({ (data, error) -> () in
                         if let  = error {
                             // failure
                         } else {
                             // success
                         }
        })
    
    <a href=’#tokenpayment’ class=‘anchor’ aria-hidden=true>

    Token payment

    swift token payment muJudoSession.payment(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

    See more

    Declaration

    Swift

    public class Payment: Transaction, TransactionPath