Mon, 10/19/2015 - 01:55
#1
HTTPClientErrorExcepton : 403 Forbidden
Hello,
After calling the post method after generating token, I am getting following error =>
org.springframework.web.client.HttpClientErrorException: 403 Forbidden
Please guide me to solve this error.
Thanks.
you need to pass all cc data except credit card number. replce credit card number with token.
{
"merchant_ref": "Astonishing-Sale",
"transaction_type": "purchase",
"method": "token",
"amount": "200",
"currency_code": "USD",
"token": {
"token_type": "FDToken",
"token_data": {
"type": "visa",
"value": "2537446225198291", <--------- this number should be your token number received from tokenized request.
"cardholder_name": "JohnSmith",
"exp_date": "1030"
}
}
}
Currently i have successfully generated a payment and tested it on some devices, but it is showing the same error on "InFocus m330" android version 4.4.2 i..e.
org.springframework.web.client.HttpClientErrorException: 403 Forbidden.
What might be the reasons behind that.
Thanks.
Please post complete request and response values for the transaction where you get 403 forbidden message.
Are you able to successfully generate tokens? If so, please do post the request and response.
We are having an issue in generating tokens using POST method in our API at CERT region.
Best Regards,
Payeezy Team
Check the time on the device that is throwing HMAC Validation error. The time needs to be identical to other devices which works fine.
HMAC validation error occurs when any of the following parameters are incorrect.
Best Regards,
Payeezy Team
Hello,
I am using the "GET method for tokenizing credit cards" and response is in proper format as referred in the docs and sandbox tab.
After that, I am calling the POST method for token based payments and it is passing on some devices I have tested except one("inFocus m330").
It is catching an exception during the post request.
I have check api key, api secret,merchant token, hmac computed and timestamp.
But, its still showing that error.
What might be the possible causes.
Thanks
Hi,
Please try the below steps in infocusm330 device, since it is a device specific issue:
1. Go to the settings , application manager and select the payeezy app and clear data.
or
2. uninstall the app and reinstall again.
Try if any of the above works and let us know.
Regards
Payeezy Team
I get the same error. I did set my apikey_value, apisecret_value and token_value correct. However, I am not sure about the merchantID_value. Wherefrom do I get that value?
Hello,
Which SDK are you using? The API intergration does not require the Merchant ID.
Regards,
Payeezy team
Hello,
We are using Direct API for integration.
In the test example class i.e. FirstDataAPIClientV2Test class, we noticed doGetToken() is setting client.setMerchantid("OGEzNGU3NjM0ODQyMTU3NzAxNDg0MjE4NDY4ZTAwMDA="); we thought reason for error could be missing merchant Id.
Here is the payload we are posting :
{
"transaction_type": "AUTHORIZE",
"method": "credit_card","amount":"1100","currency_code":"USD",
"credit_card":{"type":"visa","cardholder_name":"Testdata","card_number":"4788250000028291","exp_date":"1219","cvv":"123"},
"billing_address":{"street":"sss",state_province": "NY","country": "US","zip_postal_code": "11747"}
}
I have doubt regarding "merchant_ref". Do we need to set merchant related information?
Following are resolutions to the HMAC error -
1-4 above deals with computing the HMAC. But if you are using our Java library as is without changing any code, then it is most likely is a problem with inaccurate system time on your server.
Regards,
Payeezy team
Hi Team,
I am using Spring4 and try to run the Sample Java code. I am getting org.springframework.web.client.HttpClientErrorException: 403 Forbidden. The same program if I am using in Spring 3.2.8, its running fine.
Please suggest
What is the URL you are calling? Is a correlation ID returned?