カスタマーサービスでバインディングを有効化
最終更新
役に立ちましたか?
役に立ちましたか?
@Override
public void onIssuerAuthenticationRequired(IDVSession idvSession) {
// CUSTOMER_SERVICE の ID&V メソッドを送信する
for (IDVMethod idvMethod : idvSession.getIdvMethods()) {
if (idvMethod.getType().equals(IDVType.CUSTOMER_SERVICE)) {
idvSession.selectIdvMethod(idvMethod);
}
}
}
@Override
public void onIssuerAuthenticationReady(IDVSession idvSession,
@Nullable OtpActivationStatus status) {
}
@Override
public void onError(TMGClientException exception) {
// エラーがあるか確認する
int errorCode = exception.getErrorCode();
int errorMessage = exception.getMessage();
}guard let idvSession = VisaService.shared.idvSession else {
// idv セッションがありません
return
}
// 1. IDV 手段の一覧を表示する
do {
let idvMethods = try idvSession.idvMethods
let selectedIdvMethod = idvMethods[0] // ユーザーが CUSTOMER_SERVICE の idv メソッドを選択する
// 2. IDV メソッドを送信する。
idvSession.selectIDVMethod(selectedIdvMethod) { (result) in
if let otpActivationStatus = result {
} else {
if selectedIdvMethod.type == .customerService {
let value = selectedIdvMethod.value
// 3. カスタマーサービスを通じて確認する。
}
}
}
} catch let error {
// エラーを処理する。
}
// 4. ステップ2(selectIDVMethod)の失敗は completionHandler で処理されます。
VisaService.shared.completionHandler = { (session, error) in
// 5. それが selectIDVMethod のエラーか確認する。
if let session = session,
let error = error,
error.description == TMGError.invalidIdvMethod.description {
VisaService.shared.idvSession = session
// 6. IDV フローを再試行する。
}
}// カスタマーサービスのデータを取得する
String value = idvMethod.getValue();let value = selectedIdvMethod.value@Override
public void onIssuerAuthenticationReady(IDVSession idvSession,
@Nullable OtpActivationStatus status) {
// ローカルでバインディングを有効化する
idvSession.activateBinding(null);
}
@Override
public void onError(TMGClientException exception) {
// エラーがあるか確認する
int errorCode = exception.getErrorCode();
int errorMessage = exception.getMessage();
}guard let idvSession = VisaService.shared.idvSession else {
// idv セッションがありません
return
}
// 1. activate を呼び出す
idvSession.activateBinding(withValue: nil)
VisaService.shared.completionHandler = { (session, error) in
// 2. バインディング成功
if error == nil {
}
}