NPPS012 error

Solved! Go to solution
evgeny_t
Occasional Visitor

NPPS012 error

Hello!

I successfully configured Postman to send visa direct request.

After that I set to "Enforced" method getAlias and trying to re-config the Postman:

added keyId param with value from my project and crypt the payload

public static String getEncryptedPayload(String keyId, String mleServPubPath, String requestPayload) throws CertificateException, JOSEException, IOException {

JWEHeader.Builder headerBuilder = new JWEHeader.Builder(JWEAlgorithm.RSA_OAEP_256, EncryptionMethod.A128GCM);
headerBuilder.keyID(keyId);
headerBuilder.customParam("iat", System.currentTimeMillis());
JWEObject jweObject = new JWEObject(headerBuilder.build(), new Payload(requestPayload));
jweObject.encrypt(new RSAEncrypter(getRSAPublicKey(mleServPubPath)));
return "{\"encData\":\"" + jweObject.serialize() + "\"}";
}

 

But test is failed:

--header 'keyId: 83d7c272-...-2eb06c67d70c' \
--header 'Authorization: Basic WTNDOTFITUFGUElW...wdzppMDVadldB' \
--header 'Content-Type: application/json' \
--data-raw '{"encData":"eyJlbmMiOiJBMTI4R0NNIiwiaWF0IjoxNjIwMTExMDY2NTQ2LCJhbGciOiJSU0EtT0FFUC0yNTYiLCJraWQiOiI4M2Q3YzI3Mi0wZjM1LTRiZmUtYjViMy0yZWIwNmM2N2Q3MGMifQ.Vqh_0ka9owTUK_N34x7jJY_SZKAqxHNP3vGau_quMunETbkCD1JWJVhBRD-Up0qLc5_NJO19fziw6ms1RD0df99dKVdOwp8dvQlyPoVMqTCSSbReKXgpfv3ng8P14mo75MIiK3Wz7lF6Sew8_SQZzYMH3aOiN1fFfdS-4b-GqUa8HmdN6QQO4cuqRPa13kSLFhiAO2CmIXxuI4VMt1zAsBEjC9me18kWCksBalfx1uoFbdWIlTs9U9lnkMAOhtKryRarU86hlB8Yof97g3DZJzIdSxrwjwXKx_5hyrWK-ahCPzVzV1Y0KTErj5iW8K7RAVAkIL7L8rDSYS1y19xu8Q.y7Tzh7ShHh2I-DhS.xnbwJn5MTDJ163okUVAHFtYyURZ8nDPxBzPAsOitikrB9hNO1psVlU-Lkw-WD94HBnd6Myf9PSMm2hp1QUz0z218jnRfVCef4qs.00RTEIgT9_Ek2VkgVE2Z2Q"
}'
 
Response is 
{
"status": "BAD_REQUEST",
"code": "NPPS012",
"message": "Bad request"
}
 
(in response header:
X-CORRELATION-ID: 1620111092_271_2048242942_l55c013_VDP_WS)
 
Where am I wrong?:(
4 REPLIES 4
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: NPPS012 error

Hi @evgeny_t,

 

Please share the following information and we'll take a look. Thank you.

 

1.Request Header

2.Request Body (unencrypted)
3. Response Header (include the x-correlation-id)
4. Response Body (unencrypted)


Best,
Stacey

Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.
awais1212
Regular Visitor

Re: NPPS012 error

Hey there, I am facing this same issue while trying to invoke API in android app, can you tell me how did you solved this??

API_Managers
Visa Developer Support Specialist

Re: NPPS012 error

HI @awais1212,

 

Sorry for delayed reply. Are you still experiencing an error? If so, please provide the following information:

1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

API_Managers
Visa Developer Support Specialist

Re: NPPS012 error

Hi @awais1212,

 

Do you still need help? If not, please let me know so that I can take you off my contact list. 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.