Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

5. 取引コンテキストを表示する

処理する ContactlessPaymentSession.Event.transactionCompleted エンドユーザーに支払い状況を表示するため。

このイベントには TransactionContext トランザクションに関する主要な詳細が含まれます。

完了イベントを処理する

あなたの ContactlessPaymentSession.eventStream ループ内で、次を処理します:

  • .transactionCompleted(let transactionContext)

使用する transactionContext UIを更新し、フォローアップのアクションをトリガーするために使用します。

TransactionContext フィールド

TransactionContext 通常含まれる項目:

  • aid: EMVアプリケーション識別子(AID)。

  • amount: トランザクション金額(UI表示用にフォーマット済み)。

  • rawAmount: 端末から受け取った生の金額値。

  • currencyCode: ISO-4217 数値通貨コード。

  • transactionDate: トランザクション日付(YYMMDD、BCDエンコード)。

  • transactionType: トランザクション種別コード(例:購入または返金)。

  • digitalCardID: 支払いに使用されたデジタルカード識別子。

  • scheme: 支払いネットワーク(例:VisaやMastercard)。

  • isTransit: トランザクションが交通系取引かどうかを示します。

  • transactionID: トランザクション識別子。

実装手順については、次のコード例を参照してください:

最終更新

役に立ちましたか?