Translation disclaimer

Documentation is written in English and subsequently translated. This page, therefore, might not have the most up-to-date content. If any questions arise relating to the accuracy of the translated content, please refer to the English version of the page.

Menu

注記:このAPIはプレビューのみを目的としており、変更される可能性があります。

デバイスデータ収集

注文や取引の詳細と組み合わせると、デバイスデータ(IPアドレス、デバイスID、ジオロケーション情報など)は不正の強力な指標になるか、GeoIPルックアップを介してロケーションに基づいて手動ルールを作成する際に使用することができます。Access FraudSightでデバイスデータを利用するには2段階のプロセスを経なければなりません。手順1は、デバイスデータを収集することです。手順2は、デバイスデータを使用する評価を送信することです。以下は、iOSの手順1です。

ThreatMetrix iOS SDK

ThreatMetrix iOS SDKは、モバイルアプリケーション開発者にiOS固有のライブラリを提供します。ThreatMetrixプラットフォームを活用して、モバイルデバイスに起因する不正やセキュリティの脆弱性をリアルタイムで検出します。

この手順は、ThreatMetrix SDKバージョンV6-2に適用されます。

実装

  1. アプリケーションにプロファイリング用のThreatMetrixSDKモジュールを含めます。

  2. initProfile()方法を呼び出してSDKを初期化します。

  3. doProfile()方法を呼び出して、デバイスのプロファイリングを開始します。ThreatMetrix SDKは、収集された属性と一意のsessionIdをThreatMetrixプラットフォームに送信します。

  4. FraudSight評価リクエストにsessionIdを適用します。(リスク評価の一部となるために)

SDKの入手方法

注記:これはまもなくリリースされます。このドキュメントはプレビュー専用です。

含めるモジュール

  • TMXProfiling: このモジュールは、プロファイリングを排他的に実行します。ネットワークを介して何も転送しないため、モジュールはそれ自体でデータを送受信しません。プロファイリングを成功させるには、このモジュールをTMXProfilingConnectionsモジュールまたはカスタムプロファイリング接続モジュールとペアにして、バックエンドとの間でデータを送受信する必要があります。

  • TMXProfilingConnections: これは、ThreatMetrixが提供するデフォルトのネットワークモジュールです。このモジュールは、データを変更せずにネットワーク経由でのみデータを転送します。

TMXProfilingおよびTMXProfilingConnectionsモジュールの.dmgファイルをダウンロードし、それらを抽出して.xcframeworkファイルを取得します。

.xcframeworkファイルを依存関係としてアプリケーションディレクトリにコピーします。

ThreatMetrix SDKの使用

プロファイリング

プロファイリングは、ThreatMetrixがWebサイトまたはネイティブアプリケーションを介して顧客のオンラインサービスにアクセスしているデバイスに関する情報を収集するメカニズムです。

プロファイリングに最適な機会を提供するネイティブアプリケーションの画面を特定します。プロファイリングの大部分は短期間で完了します。プロファイリング属性の完全セットを収集するのに最大5秒かかる場合があります。

プロファイリングを開始できる一般的な画面は、アカウント作成画面、支払い画面、ログイン画面です。

必要な詳細

以下の詳細をconfigure()方法に送信します。

プレースホルダー説明
TMXOrgId
  • テスト用:afevfjm6
  • ライブ使用:dzppsd1h
TMXFingerprintServer/Profiling domain
  • テスト用:ddc-test.worldpay.com
  • ライブ使用:ddc.worldpay.com

インスタンスを取得して初期化

  1. initProfile()方法のTMXProfilinginsideのインスタンスを作成します。
  2. 最小TMXOrgIdTMXFingerprintServer/Profiling domainを送信してconfigure()方法を呼び出します。

TMXProfilingクラスのsharedInstance()方法は、ThreatMetrixオブジェクトのシングルトンインスタンスを返すために使用されます。インスタンスは一度だけ初期化する必要があります。

プロファイリングを開始します

プロファイリングを開始し、プロファイリング情報とともにいくつかの追加属性を送信する方法doProfile()を作成します。

initProfile()方法とdoProfile()方法を作成して、インスタンスを作成し、プロファイリングを初期化する方法例:

Copied!
import TMXProfiling
import TMXProfilingConnections
class TmxProfileController : ObservableObject{

    //Get a singleton instance of TMXProfiling
    let profile: TMXProfiling!       = TMXProfiling.sharedInstance()
    var sessionID     : String  = ""

    func initProfile(){

        // The profile.configure method is effective only once and subsequent calls to it will be ignored.
        // Please note that configure may throw NSException if NSDictionary key/value(s) are invalid.
        // This only happen due to programming error, therefore we don't catch the exception to make sure there is no error in our configuration dictionary

            profile.configure(configData:[
                                // (REQUIRED) Organisation ID
                                TMXOrgID              :"afevfjm6",
                                // (REQUIRED) Enhanced fingerprint server
                                TMXFingerprintServer  :"ddc-test.worldpay.com"
                                ])

    }

   func doProfile()
    {

        let customAttributes : [String : Array<String>] = [TMXCustomAttributes: ["attribute 1", "attribute 2"]]

        // Fire off the profiling request.
        // You will be notified of the profiling result in the closure passed in callbackBlock
        let profileHandle: TMXProfileHandle = profile.profileDevice(profileOptions:customAttributes, callbackBlock:{(result: [AnyHashable : Any]?) -> Void in
                let results:NSDictionary! = result! as NSDictionary
                let status:TMXStatusCode  = TMXStatusCode(rawValue:(results.value(forKey: TMXProfileStatus) as! NSNumber).intValue)!

                let statusString: String =
                status == .ok                  ? "OK"                   :
                status == .networkTimeoutError ? "Timed out"            :
                status == .connectionError     ? "Connection Error"     :
                status == .hostNotFoundError   ? "Host Not Found Error" :
                status == .internalError       ? "Internal Error"       :
                status == .interruptedError    ? "Interrupted Error"    :
                "Other"
                print("\nProfile completed with: \(statusString)\nSession ID: \(self.sessionID)")
        })
        // Session id is immediately available on the instance of TMXProfileHandle following to the call to profile.profileDevice()
        self.sessionID = profileHandle.sessionID;
        print("Session equals :- \(self.sessionID)");
    }

}

プロファイリング結果の取得

TMXStatusCodeを使用してプロファイリングの結果を取得し、profileHandle.sessionIdを使用してSessionIdを取得します。プロファイリングが成功した場合は、プロファイリング結果のステータスがOKとして返されます。

デバイスデータと評価のリンク

FraudSight評価リクエストを送信するときは、deviceData.collectionReferenceのsessionIdを次に含めてください:

次の手順


評価