So i'm new on the platform and i'm trying to enroll a card..
my log show this error: Unrecognized token 'Visa': was expecting ('true', 'false' or 'null')
request
{
"primaryAccountNumber":"410726962011XXXX"
}
response
"responseStatus" : {
"code" : "9501",
"severity" : "ERROR",
"message" : "Invalid input found, please correct the input data",
"info" : "",
"status" : "400"
}
Thanks,
Jhonatan
Hi @dhone02,
Thank you for your inquiry. Can you please make sure you are using the right credentials, such as username and password?
In addition to that, the issue could also be caused by the Certificates not being sent with the request. Check File > Settings >SSL Settings and make sure the KeyStore and KeyStore Password are populated in Soap UI (please refer to screenshot below).
The Certificate Signing Request is a prerequisite to get your application certificate (cert.pem), which is required to establish a two-way SSL connection. Additionally, you will need a root certificate (VICA-SBX.pem) and your private key. Please refer to the Two-Way SSL guide and watch the Two-Way SSL Tutorial Video: https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl#configuring_a_twoway_ssl_keystor...
You have two options to generate a Certificate Signing Request (CSR):
Have Visa generate a CSR for you (recommended)
Select "generate a CSR from me" when you create a new Visa Developer application. When you select this option, Visa will generate a CSR for you, and you will be prompted to save your private key file when it is downloaded through your browser. Once you save your private key, go to your Visa app page and download your client certificate (cert.pem), as well as your root certificate (VICA-SBX.pem). You will then have everything you need to create a key store.
Generate your own CSR
You can choose to create your own CSR. The Visa Developer Getting Started Guide provides detailed steps on how to generate CSRs: https://developer.visa.com/vdpguide#twowayssl. Please note that you have to fill out all required fields in your Certificate Request. Also, note that the organization name and unit fields do not accept punctuation characters – your CSR will be deemed invalid if you use these characters. Once you have a CSR file, go ahead and create a Visa app, choose "Submit my own CSR", and upload your CSR file. During the CSR creation process, take note of the file containing your private key. Once you upload your CSR, go to your Visa app page, and download your client certificate (cert.pem), as well as your root certificate (VICA-SBX.pem). You will then have everything you need to create a key store.
Continuing to the Key Store
Once you have a private key and two certificate files in your local directory, you will need to combine them into a key store. You can decide whether to use Java Key Store (JKS) or PKCS (P12) key store, depending on what your development environment requires. There are sections in “Getting Started with Visa Developer” > “Two-Way SSL (Mutual Authentication)” (https://developer.visa.com/vdpguide?next=twowayssl#twoway_ssl_mutual_authentication), that describe how to create each type of key store, please follow those steps. Note, that the root certificate is not needed for a P12 file, you can create a P12 file out of two files: private key and cert.pem
If you continue to get this issue, please provide us the following information and correlation ID and we can further investigate the issue.
1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body
Please perform these steps and let me know your findings.
Well, I followed the steps and didn't solve my problem 😕
I created a new project on vdp for test, I generated new .jks and the problem continues.
But the stranger is that others APIs(VMORC, ATM Locator, Foreign Exchange Rates) implemented in my back-end works very well.
The problem only with Visa Transaction Controls.
Thanks,
Jhonatan
Hi @dhone02,
Please know that when you create a test App in our sandbox you will receive test data in your App. The test data for your Visa Developer application is available in the Dashboard under test data in the left navigation, this will ensure that you are using valid data that has been provisioned for specific scenarios. You will basically have a table per API that is split into the Request and Response sections and the values on the Request section are meant to be populated in the payload with the intention of obtaining results specified in the Response section.
Can you please confirm you are using the Test Data for your App?
Hi, I tested with value of Test Data and happens de same error. Really i dont't know how the others APIs works and VCTC not. I need to do something before I try enroll a card? Because I don't know what to do anymore.
Thanks,
Jhonatan
Hi @dhone02,
I have submitted an engineering ticket and will get back to you soon.
Ok, Thanks
Hi, I solved my problem.
The problem wasn't in the cert or json request body, but was in my back-end. In specific point I changed the order of parameters and when i called the method doMutualAuthRequest() the json body request was being sent at the place of "testInfo".
I'm sorry for the mistake.
Thanks for help,
Jhonatan
Hi @dhone02,
You're welcome and thanks for sharing your solution with the community!