use of com.fitpay.android.webview.events.a2a.A2AVerificationFailed in project fitpay-android-sdk by fitpay.
the class RtmParserV5 method parseMessage.
@Override
public void parseMessage(RtmMessage msg) {
switch(msg.getType()) {
case RtmType.ID_VERIFICATION_REQUEST:
RxBus.getInstance().post(new IdVerificationRequest(msg.getCallbackId()));
break;
case RtmType.SUPPORTS_ISSUER_APP_VERIFICATION:
RxBus.getInstance().post(new RtmMessageResponse(msg.getCallbackId(), true, new A2AIssuerAppVerification(impl.supportsAppVerification()), RtmType.SUPPORTS_ISSUER_APP_VERIFICATION));
break;
case RtmType.APP_TO_APP_VERIFICATION:
if (impl.supportsAppVerification()) {
A2AVerificationRequest appToAppVerification = Constants.getGson().fromJson(msg.getData(), A2AVerificationRequest.class);
appToAppVerification.setCallbackId(msg.getCallbackId());
RxBus.getInstance().post(appToAppVerification);
} else {
RxBus.getInstance().post(new RtmMessageResponse(msg.getCallbackId(), false, new A2AVerificationFailed(A2AVerificationError.NOT_SUPPORTED), RtmType.APP_TO_APP_VERIFICATION));
}
break;
default:
super.parseMessage(msg);
}
}
Aggregations