Visa Card Validation does not work using CURL - need help

kktam
Regular Visitor

Visa Card Validation does not work using CURL - need help

I am new to VISA developer and try to first test the Card Validation before developing a program for it.

Initially I am trying to emulate the Card Validation live call used in this sample tutorial page:

 

https://developer.visa.com/capabilities/pav/reference#pav__pav

In my test project, I have added the following API.

 

Payment Account Validation API

Location Update API

Cardholder Enrollment API

Merchant Locator API

Merchant Search API

 

I have place the data into paymentVer.json and send it out using this curl command to call API using the test project's authorization generated by the test project's user ID and password.

 

curl -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Basic RVgwMFkwMTdJOEZTNDhJVENCNUwyMXU2dkE2ZDRZSHdrQlpKc2ptR09CQU1vTk5uYzo4SDg0NVR1QVVlTjczdg==" -X POST --data @paymentVer.json  https://sandbox.api.visa.com/pav/v1/cardvalidation

This command returns the following error.

 

{"responseStatus":{"code":"9124","severity":"ERROR","info":"","status":400,"message":"Expected input credential was not present"}}

I have later tried to add pem certification I downloaded for my project, and still didn't work. I also test this request in POSTMAN and it does not work there as well.

 

curl -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Basic RVgwMFkwMTdJOEZTNDhJVENCNUwyMXU2dkE2ZDRZSHdrQlpKc2ptR09CQU1vTk5uYzo4SDg0NVR1QVVlTjczdg==" -X POST --data @paymentVer.json --key @key_9936bab5-a1b4-485d-bb87-677074c0b2d6.pem  https://sandbox.api.visa.com/pav/v1/cardvalidation

I would like to ask for help to figure out what the full header looks like to make the HTTP request message work for this API. In the tutorial page, it hide the HEADER section so I cannot tell what's in it.  Or if my test project setup is wrong or missing an API I would appreciate if anyone can tell me what's missing.

 

 

4 REPLIES 4
marty
Community Moderator

Re: Visa Card Validation does not work using CURL - need help

Hello kktam- we need to identify if this is a credential issue. 

Please follow the steps in the developer.visa.com section "Getting started", to test whether your certificates are good. 

1. Use the instruction and install the certificates. Follow exact steps

2. Use SOAPUI and test hello world with your certs. That will tell you if there is a credential issue. 

3. If that works and the issue still persists, then send us the json http request and response (complete request and response with header values) to visa@developer.com for further assistance.

Thank you

mdent

Visa Developer Team

 

kktam
Regular Visitor

Re: Visa Card Validation does not work using CURL - need help

Hi 

I follow the Getting Start Guide https://developer.visa.com/vdpguide and got an error after this step.

 

4. Click Submit Request (green chevron icon below) to test your connection. If successful, you should see the current timestamp in the response panel, as shown below.

 

The error response (in json) is

{"responseStatus": {
   "code": "9124",
   "severity": "ERROR",
   "info": "",
   "status": 400,
   "message": "Expected input credential was not present"
}}

The header of the response is:

 

HTTP/1.1 400 Bad Request
X-SERVED-BY: l55c007
X-CORRELATION-ID: 1505278313_175_76_l55c007_VDP_ARM
X-APP-STATUS: 400
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=2592000;includeSubdomains
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Security-Policy-Report-Only: default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-Content-Security-Policy-Report-Only: default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
X-WebKit-CSP-Report-Only: default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;
Content-Type: application/json;charset=UTF-8
Content-Length: 130
X-Cnection: close
X-Cnection: close
Date: Wed, 13 Sep 2017 04:51:53 GMT
Connection: keep-alive

{"responseStatus":{"code":"9124","severity":"ERROR","info":"","status":400,"message":"Expected input credential was not present"}}

I tried both options for pre-emptive Auth and did not make a difference.

marty
Community Moderator

Re: Visa Card Validation does not work using CURL - need help

Hi kktam - we are looking into this and will get back to you soon. Thanks very much for providing the detailed info.

-mdent

reddy
Newbie

Re: Visa Card Validation does not work using CURL - need help

{"responseStatus":{"code":"9124","severity":"ERROR","message":"Expected input credential was not present","info":"","status":400}}

Recieving above error, this code was just working fine, all of the sudden it started coming, i after i locked my account.

 

current account status is unlocked but still its giving same issue.