Braintree/src/main/java/com/braintreepayments/api/models/ThreeDSecureLookup.java
public static ThreeDSecureLookup fromJson(String jsonString) throws JSONException {
        JSONObject json = new JSONObject(jsonString);

        ThreeDSecureLookup lookup = new ThreeDSecureLookup();

        CardNonce cardNonce = new CardNonce();
        cardNonce.fromJson(json.getJSONObject(CARD_NONCE_KEY));
        lookup.mCardNonce = cardNonce;

        JSONObject lookupJson = json.getJSONObject(LOOKUP_KEY);

        if (lookupJson.isNull(ACS_URL_KEY)) {
            lookup.mAcsUrl = null;
        } else {
            lookup.mAcsUrl = lookupJson.getString(ACS_URL_KEY);
        }

        lookup.mMd = lookupJson.getString(MD_KEY);
        lookup.mTermUrl = lookupJson.getString(TERM_URL_KEY);
        lookup.mPareq = lookupJson.getString(PA_REQ_KEY);

        return lookup;
    }
public static ThreeDSecureLookup fromJson(String jsonString) throws JSONException {
        JSONObject json = new JSONObject(jsonString);

        ThreeDSecureLookup lookup = new ThreeDSecureLookup();

        CardNonce cardNonce = new CardNonce();
        cardNonce.fromJson(json.getJSONObject(CARD_NONCE_KEY));
        lookup.mCardNonce = cardNonce;

        JSONObject lookupJson = json.getJSONObject(LOOKUP_KEY);

        if (lookupJson.isNull(ACS_URL_KEY)) {
            lookup.mAcsUrl = null;
        } else {
            lookup.mAcsUrl = lookupJson.getString(ACS_URL_KEY);
        }

        lookup.mMd = lookupJson.getString(MD_KEY);
        lookup.mTermUrl = lookupJson.getString(TERM_URL_KEY);
        lookup.mPareq = lookupJson.getString(PA_REQ_KEY);

        return lookup;
    }
public static ThreeDSecureLookup fromJson ( String jsonString ) throws JSONException { JSONObject json = new JSONObject ( jsonString ) ; ThreeDSecureLookup lookup = new ThreeDSecureLookup ( ) ; CardNonce cardNonce = new CardNonce ( ) ; cardNonce . fromJson ( json . getJSONObject ( CARD_NONCE_KEY ) ) ; lookup . mCardNonce = cardNonce ; JSONObject lookupJson = json . getJSONObject ( LOOKUP_KEY ) ; if ( lookupJson . isNull ( ACS_URL_KEY ) ) { lookup . mAcsUrl = null ; } else { lookup . mAcsUrl = lookupJson . getString ( ACS_URL_KEY ) ; } lookup . mMd = lookupJson . getString ( MD_KEY ) ; lookup . mTermUrl = lookupJson . getString ( TERM_URL_KEY ) ; lookup . mPareq = lookupJson . getString ( PA_REQ_KEY ) ; return lookup ; }
Used to parse a response from the Braintree Gateway to be used for 3D Secure.

@param jsonString The json response from the Braintree Gateway 3D Secure lookup route.
@return The {@link com.braintreepayments.api.models.ThreeDSecureLookup} to use when
performing 3D Secure authentication.
@throws JSONException when parsing fails.
Used to parse a response from the Braintree Gateway to be used for 3D Secure .