Alipay+ DocsAlipay+ Docs

setTrackingProxy

Call the setTrackingProxy API to set up a proxy for event tracking. This proxy is optional.

Method signature

copy
public static func setTrackingProxy(_ proxy: IAPAPTrackingProxy)

Request parameters

Parameter

Type

Required

Description

proxy

IAPAPTrackingProxy

Yes

The implementation of event tracking proxy.

IAPAPTrackingProxy

copy
public protocol IAPAPTrackingProxy {
    func trackEvent(_ event: IAPAPTrackingEvent, parameters: [String: Any]?)
}

IAPAPTrackingEvent

Key

Value

createStaticToken

ap_create_static_token

getStaticTokenInfo

ap_get_static_token_info

getStaticTokenVerificationInfo

ap_get_static_token_verification_info

getServiceState

ap_get_service_state

suspendService

ap_suspend_service

unsuspendService

ap_unsuspend_service

addToAppleWallet

ap_add_to_apple_wallet

addToAppleWalletWithoutStaticToken

ap_add_to_apple_wallet_without_static_token

getDeviceTokenOnCurrentDevice

ap_get_device_token_on_current_device

getDeviceTokenOnPairedDevice

ap_get_device_token_on_paired_device

presentDeviceTokenOnCurrentDevice

ap_present_device_token_on_current_device

activateDeviceToken

ap_activate_device_token

statusForPassEntries

ap_status_for_pass_entries

availablePassEntries

ap_available_pass_entries

availableRemotePassEntries

ap_available_remote_pass_entries

generateAddPaymentPassRequestForPassEntryWithIdentifier

ap_generate_add_payment_pass_request_for_pass_entry_with_identifier

canAddToCurrentDevice

ap_can_add_to_current_device

canAddToPairedDevice

ap_can_add_to_paired_device

Response parameters

N/A

Sample

copy
IAPApplePay.setTrackingProxy(TrackingProxy())