兌換活動票券
票證可透過以下兩種方式兌換:
您可以選擇在使用者兌換或存取票證時,要求額外的安全性。詳情請參閱「使用螢幕鎖定功能保護裝置」。
NFC 感應功能
使用者可使用 NFC 感應功能輕鬆兌換卡片。進一步瞭解智慧感應功能,並申請使用智慧感應功能。
條碼掃描
您可以附上條碼,協助客戶掃描自己的票證。
靜態條碼
您可以設定 object.barcode
顯示靜態條碼。API 提供多種條碼類型。詳情請參閱 Barcode
類型。
輪替條碼
為了提升安全性,您可以設定 object.rotatingBarcode
顯示旋轉的條碼。輪替條碼看起來與一般條碼類似,但會定時變更 (通常是每分鐘變更),並且終端機/讀取工具程式會設定為只接受最新的條碼。這種做法可降低條碼螢幕截圖帶來的風險,尤其是竊取票券或未經授權的票券轉售。詳情請參閱 RotatingBarcode
類型。
安全性動畫
另一個防止螢幕截圖濫用行為的方法是顯示條碼安全動畫,後者支援人為驗證票證。
安全性動畫的實體資訊清單是圍繞票證條碼周圍的外框輪廓。只有在裝置處於移動狀態時,才會觸發這個閃爍的動畫,因此使用者必須傾斜裝置,才能測試票證的有效性。另一隻手持裝置則仍然只會循環播放彩色安全性動畫。
如要為票證啟用安全性動畫,請在票證類別中,將 SecurityAnimation
欄位的 AnimationType
設為 FOIL_SHIMMER
。
請參閱下方的圖 1,瞭解啟用安全性動畫後會如何顯示:
圖 1.
使用螢幕鎖定功能保護裝置
為保護客戶的票證存取權,你可以要求他們每次新增或存取票證時,都必須使用螢幕鎖定功能。方法是設定 class.viewUnlockRequirement
。詳情請參閱 ViewUnlockRequirement
類型。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-29 (世界標準時間)。
[null,null,["上次更新時間:2024-08-29 (世界標準時間)。"],[[["Passes can be redeemed via NFC tap or barcode scan, offering users flexible options."],["Rotating barcodes and security animations enhance security by mitigating risks like ticket theft and unauthorized resale."],["Passes can include a screen lock requirement for added security, protecting customer access."],["Developers have access to various barcode types and customization options through the API, enabling them to tailor the pass experience."],["Google Pay's Smart Tap technology facilitates seamless redemption through NFC."]]],["Passes can be redeemed via NFC tap or barcode scan. For barcodes, options include static or rotating types, with rotating barcodes enhancing security by changing regularly. An optional security animation, a shimmering effect triggered by device motion, further validates pass authenticity. Extra security can be added by requiring a screen lock each time a user accesses or adds a pass, configured via `class.viewUnlockRequirement`. The barcode can be added by setting `object.barcode`.\n"]]