Judopay Documentation

Deprecated Integration Methods

iOS Swift

Caution

iOS Swift SDK has been deprecated and will not longer be updated.

We now have one SDK for both Swift and Obj-C iOS Apps. Click here for Judopay SDK.

Getting started

If you haven’t chosen your integration method yet, begin by selecting your method and following the What to do next steps first.

Integrate simple and secure in-app card payments into your iOS Swift app with our Judopay SDK.

Judopay’s Out-of-the-box UI comes with built-in checks and security features, including real-time error detection, 3D Secure, data and address validation for frictionless card data capture.

This minimises PCI compliance and allows you focus on developing other areas of your app.

See our UI customization guide to learn more.

deprecated

Integration Requirements

Versions of the SDK greater or equal to 6.2.5 require Xcode 8 and Swift 3.

Version 6.2.4 is the last version to be support Xcode 7.3.1 and Swift 2.2.

Add the Swift SDK to the top of the file where you want to use it:

 

Install Cocoapods with the following command:

$ gem install cocoapods 

If you are not integrating using Cocoapods, please visit our guides for Carthage integration.

Add Judopay to your Podfile to integrate it into your Xcode project.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'JudoKit', '~> 6.2'

Install the new pod in your project

$ pod install 

Please ensure that you always use the newly generated .xcworkspace file instead of the .xcodeproj file.

In Xcode, go to the Project Navigator called ‘Pods’, select the JudoKit target and open the tab called Build Phases.

Add a new Run Script Phase and drag it above the Compile Sources build phase.

Include the following line in the shell script:

sh "${PODS_ROOT}/DeviceDNA/Framework/strip-frameworks-cocoapods.sh"

Setup

To start setting up your app, please complete all the relevant integration steps in the getting started section.

By following these steps, you are ensuring that your app will be secure and frictionless for you and your customers.

If you have completed the setup section, start using Judopay’s iOS Swift SDK by adding your app’s token and secret when initializing the SDK:

var judoKitSession = JudoKit(token: token, secret: secret)

Command the SDK to communicate with sandbox environment by including the following line where the payment is initiated in the ViewController:

self.judoKitSession.sandboxed(true)

Point to the live environment

In your app’s ViewController, find and delete the following line that specifies the targeted environment:

self.judoKitSession.sandboxed(true)

Replace your sandbox API token and secret for the live API token and secret in the correspondent line.

Both credentials are located in the dashboard, under the Your apps section.

Follow our Access token and secret guide if you need help to find them.

var judoKitSession = JudoKit(token: token, secret: secret)

Ruby Server SDK

Caution

Ruby Server SDK has been deprecated and will not longer be updated.

 

Easily handle simple and secure payments on your back-end with the Judopay Ruby server side SDK. 

If you haven’t chosen your integration method yet, begin by selecting your method and following the What to do next steps first.

 

Integration Requirements

Ruby 1.9.3 and above (including 2.0.x and 2.1.x).

Add the following line to your application’s Gemfile:

gem 'judopay'

Once the Gemfile is set, then there are two options to finish the installation:

Execute the following line:

$ bundle-

Or install it yourself as:

$ gem install judopay

Setup

To start setting up your app, please complete all the relevant integration steps in the setup section.

By following these steps, you are ensuring that your app will be secure and frictionless for you and your customers.

When you have completed the setup, start using Judopay’s PHP SDK by adding your app’s token and secret when initializing the SDK:

Judopay.configure do |config| config.judo_id = 12345 config.api_token = 'your-token' config.api_secret = 'your-secret' # Set to true on production, defaults to false which is the sandbox config.use_production = false
end

Remember, if you perform payments only from your backend, you should only enable the Register Card Transactions permission for your app and create a separate app for your backend with only the Make Payments permission enabled. 

Processing transactions with AmEx cards requires that your account supports it as well.

Please contact us first if you are planning to accept AmEx.

The SDK allows further configuration:

  • Logging – You will be able to attach a logger library to help you debug your Judopay integration.

Point to the live environment

In the Judopay gem, find and change the production environment setting from ‘false’ to ‘true’.

Replace your sandbox API token and secret for the live API token and secret in the corresponding lines.

Both credentials are located in the dashboard, under the Your apps section.

Follow our Access token and secret guide if you need help to find them.

Judopay.configure do |config| config.judo_id = 12345 config.api_token = 'your-token' config.api_secret = 'your-secret' # Set to true on production, defaults to false which is the sandbox config.use_production = true end