Function requestValidate3DS

  • Introduction

    Function to validate 3DS fields from a token.

    Parameters

    • kushkiInstance: IKushki

      The Kushki instance that was previously initialized.

    • cardTokenResponse: CardTokenResponse

      The response object from the card tokenization process using the API.

    Returns Promise<TokenResponse>

    • Returns a Promise that resolves to a TokenResponse.

    Throws

    • if cardinal action code is equal to FAILURE then throw ERRORS.E012
    • if the param cardTokenResponse.security is undefined then throw ERRORS.E012
    • if the param cardTokenResponse.security.authRequired is the only param in the security object then throw ERRORS.E012
    • if the param cardTokenResponse.security.specificationVersion is not valid then throw ERRORS.E012

    Example

    const kushkiInstance = await init({
    inTest: true,
    publicCredentialId: "merchantId"
    });

    const cardTokenResponse = {
    token:"generated-token",
    secureService: "secure-service-name",
    secureId: "secure-id",
    security: {
    acsURL: "https://google.com",
    authenticationTransactionId: "transactionId",
    authRequired: true,
    paReq: "jwt",
    specificationVersion: "x.x.x"
    }
    };
    try {
    const tokenResponse = await validate3DS(kushkiInstance, cardTokenResponse);
    console.log(tokenResponse);
    } catch (error) {
    console.log(error);
    }

Generated using TypeDoc