{
"responseStatus": {
"code": "9501",
"severity": "ERROR",
"message": "Requested Content Type is Not Allowed for API",
"info": "",
"status": "415"
}
}
getting this error for test my code
<?php
$request = new HttpRequest();
$request->setUrl('https://sandbox.api.visa.com/visadirect/fundstransfer/v1/pullfundstransactions');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData(array(
'acquirerCountryCode' => '840',
'acquiringBin' => '408999',
'amount' => '124.02',
'businessApplicationId' => 'AA',
'cardAcceptor' => ''
));
$request->setHeaders(array(
'Postman-Token' => 'db6d196f-4b38-4afc-8f70-7f9ce2adea58',
'cache-control' => 'no-cache',
'Accept' => 'application/json,application/octet-stream',
'Authorization' => 'hidden'
));
$request->setBody('{
"acquirerCountryCode": "840",
"acquiringBin": "408999",
"amount": "124.02",
"businessApplicationId": "AA",
" ": {
"address": {
"country": "USA",
"county": "081",
"state": "CA",
"zipCode": "94404"
},
"idCode": "ABCD1234ABCD123",
"name": "Visa Inc. USA-Foster City",
"terminalId": "ABCD1234"
},
"cavv": "0700100038238906000013405823891061668252",
"foreignExchangeFeeTransaction": "11.99",
"localTransactionDateTime": "2019-04-16T11:34:58",
"retrievalReferenceNumber": "330000550000",
"senderCardExpiryDate": "2015-10",
"senderCurrencyCode": "USD",
"senderPrimaryAccountNumber": "4895142232120006",
"surcharge": "11.99",
"systemsTraceAuditNumber": "451001",
"nationalReimbursementFee": "11.22",
"cpsAuthorizationCharacteristicsIndicator": "Y",
"addressVerificationData": {
"street": "XYZ St",
"postalCode": "12345"
}
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Hi,
Looking at the issue, I do see couple of things.
Please use the payload that is given in the Api Reference Page below. You can replace values with the test data provided to you on your test data tab or use it as is in Sandbox.
Secondly, please download the PHP sample code from your project dashboard --> Sample Code section and try using the same.
Thanks,
Jai