> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card/yellow-flow-digitization.md).

# イエローフローのデジタル化

## 概要

イエローフローは **トークン化** フローで、 **イシュアのバックエンドが** ステップアップ認証でトークン化を承認する（**ID\&V**).

このフローは、NFCウォレットSDKが **デジタルウォレットアプリケーション** の中に統合され、複数のイシュアのカードをサポートする場合に一般的です。

このフローでは、 **エンドユーザーが** トークン化が完了する前にID\&Vを完了します。

## ユーザー体験

参照： [イエローフローのユーザー体験](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card.md#yellow-flow).

## シーケンス図

<figure><img src="/files/ac2ead61c175dc9804fdeaa6204c60ae490eb42a" alt=""><figcaption><p>イエローフローのデジタル化シーケンス。</p></figcaption></figure>

## SDKを統合する

次に、 [カードの有効性を確認](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/check-card-eligibility.md)し、 `MGDigitizationListener` を実装してデジタル化の進行状況を追跡します。次に：

1. 呼び出します `MGCardEnrollmentService.digitizeCard(...)`.

   あなたの `MGDigitizationListener`.
2. イシュアのバックエンドがステップアップ認証でトークン化を承認した場合（イエローフロー）、SDKは次のコールバックをトリガーします：
   1. `onCPSActivationCodeAcquired`

      あなたは `activationCode` を受け取り、セキュアプロビジョニングを開始します。

      参照： [プロビジョニングをトリガーする](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/trigger-provisioning.md).
   2. `onSelectIDVMethod`：エンドユーザーに表示するID\&V方式を受け取ります。参照： [ID\&V方式の一覧と選択](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card/yellow-flow-digitization.md#list-and-select-an-id-and-v-method).
   3. `onActivationRequired`：選択されたID\&V方式がアクティベーションを必要とする場合（例えばOTP）にのみトリガーされます。
   4. `onComplete`：デジタル化の手順が正常に完了しました。

      ID\&V方式が次の場合：

      1. **携帯電話（cell\_phone）**, **電子メール（email）** または **暗号文付きのapp\_to\_app**：トークン化が完了します
      2. **ウェブサイト（website）**, **カスタマーサービス（customer\_service）**、または **暗号文なしのapp\_to\_app**：あなたが [CPS通知を処理する](/nfc-wallet-sdk-android/ja/get-started/configuration/5.-push-notifications/handle-push-notifications.md#process-cps-notifications-digital-card-operations).

{% hint style="info" %}
ために、 **ウェブサイト（website）**, **カスタマーサービス（customer\_service）**、または **暗号文なしのapp\_to\_app** ID\&V方式では、イシュアはTSPイシュアAPIを使用してトークンを有効化します。

この場合、プロビジョニングはあなたが完了した後にのみ完了します。 [CPS通知を処理する](/nfc-wallet-sdk-android/ja/get-started/configuration/5.-push-notifications/handle-push-notifications.md#process-cps-notifications-digital-card-operations).
{% endhint %}

### ID\&V方式の一覧と選択

MGDigitizationListener.onSelectIDVMethod `で、`を使用して `IDVMethodSelector` 利用可能なID\&V方式を一覧表示します。

`IDVMethodSelector.getIdvMethodList()` は配列を返します： `IDVMethod` で、次のフィールドを含みます：

* `id`：方式を選択する際にこの値を使用します。
* `type`：ID\&Vのタイプ（例えば、SMSによるOTP、メールによるOTP、または **イシュアアプリケーション**).
* `value`：表示用の値。内容は次によって異なります： `type`.
* `isOTPRequired`：SDKがトリガーするかどうかを示します。 `onActivationRequired`.

NFCウォレットはこれらのID\&V `type` の値をサポートします：

* **携帯電話（cell\_phone）**

  SMSで送信されるOTPを使用したID\&V。

  を使用して `value` OTPが送信されるマスクされた電話番号を表示します。
* **電子メール（email）**

  メールで送信されるOTPを使用したID\&V。

  を使用して `value` を使用して
* **カスタマーサービス（customer\_service）**

  イシュアのカスタマーケアへの通話を使用したID\&V。

  を使用して `value` を使用してエンドユーザーが電話する必要がある電話番号を表示します。
* **ウェブサイト（website）**

  エンドユーザーはイシュアのウェブサイトでID\&Vを完了します。

  を使用して `value` を使用してウェブサイトのURLを取得します。
* **app\_to\_app**

  その **デジタルウォレットアプリケーション** はエンドユーザーを **イシュアアプリケーション**.

  を使用して `value` にリダイレクトしてイシュアアプリケーション名を表示します。

エンドユーザーが方式を選択したら、その `id` を取得して呼び出します `IDVMethodSelector.select(...)` でNFCウォレットバックエンドに通知します。

<pre class="language-java" data-expandable="true"><code class="lang-java">// idvMethodSelectorの参照
IDVMethodSelector idvMethodSelector = null;

<strong>// インターフェースMGDigitizationListenerのメソッド 
</strong><strong>@Override
</strong>public void onSelectIDVMethod(final IDVMethodSelector idvMethodSelector) {
    if (idvMethodSelector.getIdvMethodList().length == 0) {
        // エラーをログに記録
    }
    
    this.idvMethodSelector = idvMethodSelector;
    
    displayIdvMethods();
}

// 可能なID&#x26;Vを表示するダイアログUIを構築するメソッド...
<strong>public void displayIdvMethods() {
</strong>    // ... したがってidvMethodSelectorを使用して可能なID&#x26;Vの一覧を取得
    for (int i = 0; i &#x3C; idvMethodSelector.getIdvMethodList().length; i++) {
        IDVMethod idvMethod = idvMethodSelector.getIdvMethodList()[i];
        String id = idvMethod.getId();
        String type = idvMethod.getType();
        String value = idvMethod.getValue();
        boolean isOtpRequired = idvMethod.isOtpRequired();
        ...
    }
    ...
}

// エンドユーザーがID&#x26;V方式を選択したときにUIから呼び出されるメソッド
// 選択されたidvMethodのidを渡す
public void selectIdvMethod( int idvSelectedMethodId) {
    idvMethodSelector.select( idvSelectedMethodId );
}
</code></pre>

### OTPを使ったID\&V

エンドユーザーが **携帯電話（cell\_phone）** または **電子メール（email）**&#x3092;選択すると、TSPはOTPを生成します。次にTSPはイシュアにSMSまたはメールでOTPを送信するよう要求します。

NFCウォレットSDKは `MGDigitizationListener.onActivationRequired` をトリガーします `PendingCardActivation.getState()` が `OTP_NEEDED`.

に設定されます。 **デジタルウォレットアプリケーション** あなたの

はOTP入力用のUIを表示する必要があります。 `エンドユーザーがOTPを入力したら、` PendingCardActivation.activate(...)

を呼び出してOTPを提供します。 `OTPが有効であれば、SDKは` MGDigitizationListener.onComplete

{% hint style="info" %}
**コールバックをトリガーします。**

OTP入力UIを実装する **デジタルウォレットアプリケーション**.
{% endhint %}

<pre class="language-java" data-expandable="true"><code class="lang-java">NFCウォレットSDKはOTP入力UIを提供しません。あなたのアプリ内でUIを実装およびカスタマイズしてください。
// Card Digitizationリスナーへの参照

MyDigitizationListener digitizationListener = new MyDigitizationListener();
// 保留中カードアクティベーションの参照

<strong>// インターフェースMGDigitizationListenerのメソッド 
</strong><strong>@Override
</strong>PendingCardActivation pendingCardActivation = null;
    public void onActivationRequired (PendingCardActivation pendingCardActivation) {
    
    this.pendingCardActivation = pendingCardActivation;
    PendingCardActivation activationState = pendingCardActivation.getState();
        switch( activationState ) {
            case OTP_NEEDED:
            ...
    }
    ...
}

// OTPを入力するUIを表示する
// エンドユーザーがOTPを提供したときにUIから呼び出されるメソッド
    public void idvActivationWithOtp( String otp) {
}
</code></pre>

### pendingCardActivation.activate( otp.getBytes(), digitizationListener );

エンドユーザーが **カスタマーサービス（customer\_service）** または **ウェブサイト（website）**&#x30AB;スタマーサービスまたはウェブサービスでのID\&V

を使用して `value` ：イシュアは（例えばイシュアのウェブポータルやイシュアのカスタマーケアを通じて）ID\&Vを直接管理します。

ウェブポータルのURLやイシュアのカスタマーケアの電話番号を取得するために使用します。

イシュアがエンドユーザーを正常に認証した後、イシュアはTSPイシュアAPIを使用してトークンを有効化します。 `その後、NFCウォレットバックエンドは` CPS

プッシュ通知をデジタルウォレットアプリケーションに送信します。 [プッシュを処理する方法は次を参照してください：](/nfc-wallet-sdk-android/ja/get-started/configuration/5.-push-notifications/handle-push-notifications.md#process-cps-notifications-digital-card-operations).

### CPS通知の処理

App-to-appによるID\&V

NFCウォレットSDKは `MGDigitizationListener.onActivationRequired` をトリガーします `PendingCardActivation.getState()` が `このID&V方式では、デジタルウォレットアプリケーションがエンドユーザーをイシュアアプリケーションにリダイレクトします。`.

を使用して `APP2APP_NEEDED` PendingCardActivation.getAppToAppData() `を使用して取得します` AppToAppData

を使用して `オブジェクト。`, `AppToAppData.getPayLoad()`AppToAppData.getScheme() `、および` AppToAppData.getSource()

```java
を使用してエンドユーザーをイシュアアプリケーションにリダイレクトします。
MGCardEnrollmentService enrollmentService = MobileGatewayManager.INSTANCE.getCardEnrollmentService();
PendingCardActivation pendingCardActivation = enrollmentService.getPendingCardActivation(digitalCardId);
PendingCardActivationState state = pendingCardActivation.getState();
  if (PendingCardActivationState.APP2APP_NEEDED == state) {
  AppToAppData appToAppData = pendingCardActivation.getAppToAppData();
    if(appToAppData != null) {
    String scheme = appToAppData.getScheme();
    String source = appToAppData.getSource();
  String payload = appToAppData.getPayload();
  }
}
```

// sourceを使用してパッケージIDとインテントアクションを取得し、イシュアアプリを起動する

イシュアアプリケーションが認証を完了した後、エンドユーザーをデジタルウォレットアプリケーションにリダイレクトします。

* `2つのバリエーションがあります：`暗号文付きのAppToApp
* `：イシュアアプリケーションがイシュア暗号文を生成します。`暗号文なしのAppToApp

：イシュアはTSPイシュアAPIを使用してトークンを有効化します。 `2つのバリエーションがあります：`,&#x20;

* の場合、 `を呼び出します` PendingCardActivation.resumeAppToAppActivation(...)
* とイシュア暗号文を提供します。&#x20;
  * 暗号文が有効であれば、
  * NFCウォレットSDKはバックグラウンドでデジタルカードプロファイルをプロビジョニングします。 `OTPが有効であれば、SDKは` MGDigitizationListener.onComplete

：イシュアはTSPイシュアAPIを使用してトークンを有効化します。 `：イシュアアプリケーションがイシュア暗号文を生成します。`,&#x20;

* の場合、 `そしてSDKは次をトリガーします：PendingCardActivation.resumeAppToAppActivation()`.&#x20;
* プッシュ通知をデジタルウォレットアプリケーションに送信します。 [プッシュを処理する方法は次を参照してください：](/nfc-wallet-sdk-android/ja/get-started/configuration/5.-push-notifications/handle-push-notifications.md#process-cps-notifications-digital-card-operations).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card/yellow-flow-digitization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
