OPPCybersourceDeviceFingerprint

@objc
public class OPPCybersourceDeviceFingerprint : NSObject, OPPDeviceFingerprint

Class to collect a Cybersource device fingerprint for a transaction and attach it to the transaction’s payment parameters.

Device profiling relies on the optional profiling libraries being linked into the app. When those libraries are unavailable or the checkout is not configured for device profiling, the profiling methods finish with an error.

  • Collects the Cybersource device fingerprint for the given transaction and attaches it to the transaction’s payment parameters.

    Declaration

    Swift

    public func setDeviceFingerprint(_ transaction: OPPTransaction,
                                     provider: OPPPaymentProvider,
                                     completionHandler: @escaping (OPPTransaction, NSError?) -> Void)

    Parameters

    transaction

    The transaction whose payment parameters the device fingerprint is added to.

    provider

    The payment provider used to request the checkout information that configures device profiling.

    completionHandler

    A block executed when profiling finishes. On success it receives the updated OPPTransaction and a nil error; on failure it receives the original transaction and an NSError describing the reason.

  • Collects the Cybersource device fingerprint for the given transaction and attaches it to the transaction’s payment parameters.

    Declaration

    Swift

    public func setDeviceFingerprint(_ transaction: OPPTransaction,
                                     provider: OPPPaymentProvider) async throws -> OPPTransaction

    Parameters

    transaction

    The transaction whose payment parameters the device fingerprint is added to.

    provider

    The payment provider used to request the checkout information that configures device profiling.

    Throws

    An NSError with code OPPErrorCodeDeviceFingerprint when the profiling libraries are unavailable or the checkout is not configured for device profiling.

    Return Value

    The same OPPTransaction, with the device fingerprint added to its payment parameters when profiling succeeds.