JudoPayViewController

public class JudoPayViewController: UIViewController

the JudoPayViewController is the one solution build to guide a user through the journey of entering their card details.

  • the current JudoKit Session

    Declaration

    Swift

    public var judoKitSession: JudoKit
  • The amount and currency to process, amount to two decimal places and currency in string

    Declaration

    Swift

    public private (set) var amount: Amount?
  • The number (e.g. 123-456 or 654321) identifying the Merchant you wish to pay

    Declaration

    Swift

    public private (set) var judoId: String?
  • Your reference for this consumer, this payment and an object containing any additional data you wish to tag this payment with. The property name and value are both limited to 50 characters, and the whole object cannot be more than 1024 characters

    Declaration

    Swift

    public private (set) var reference: Reference?
  • Card token and Consumer token

    Declaration

    Swift

    public private (set) var paymentToken: PaymentToken?
  • The current transaction

    Declaration

    Swift

    public let transaction: Transaction
  • The overridden view object forwarding to a JudoPayView

    Declaration

    Swift

    override public var view: UIView!
  • Initializer to start a payment journey

    Declaration

    Swift

    public init(judoId: String, amount: Amount, reference: Reference, transactionType: TransactionType = .Payment, completion: JudoCompletionBlock, currentSession: JudoKit, cardDetails: CardDetails? = nil, paymentToken: PaymentToken? = nil)  throws

    Parameters

    judoId

    The judoId of the recipient

    amount

    An amount and currency for the transaction

    reference

    A Reference for the transaction

    transactionType

    The type of the transaction

    completion

    Completion block called when transaction has been finished

    currentSession

    The current judo apiSession

    cardDetails

    An object containing all card information - default: nil

    paymentToken

    A payment token if a payment by token is to be made - default: nil

    Return Value

    a JPayViewController object for presentation on a view stack

  • Designated initializer that will fail if called

    Declaration

    Swift

    convenience required public init?(coder aDecoder: NSCoder)

    Parameters

    aDecoder

    A decoder

    Return Value

    will crash if executed

  • viewDidLoad

    Declaration

    Swift

    override public func viewDidLoad()
  • viewWillAppear

    Declaration

    Swift

    public override func viewWillAppear(animated: Bool)

    Parameters

    animated

    Animated

  • viewDidAppear

    Declaration

    Swift

    public override func viewDidAppear(animated: Bool)

    Parameters

    animated

    Animated

  • webView delegate method

    Declaration

    Swift

    public func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, navigationType: UIWebViewNavigationType) -> Bool

    Parameters

    webView

    The web view

    request

    The request that was called

    navigationType

    The navigation Type

    Return Value

    return whether webView should start loading the request

  • webView delegate method that indicates the webView has finished loading

    Declaration

    Swift

    public func webViewDidFinishLoad(webView: UIWebView)

    Parameters

    webView

    The web view

  • webView delegate method that indicates the webView has failed with an error

    Declaration

    Swift

    public func webView(webView: UIWebView, didFailLoadWithError error: NSError?)

    Parameters

    webView

    The web view

    error

    The error