13 posts / 0 new
Last post
manojbajpai5406
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.


atulparmar983
Re: HTTPClientErrorExcepton : 403 Forbidden

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"
    }
  }
}

 

 

 


manojbajpai5406
Re: HTTPClientErrorExcepton : 403 Forbidden

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.


pramodrao2872
Re: HTTPClientErrorExcepton : 403 Forbidden

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


pramodrao2872
Re: HTTPClientErrorExcepton : 403 Forbidden

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.

  • api key
  • api secret
  • merchant token
  • hmac computed
  • timestamp off by more than 5 minutes to our servers.

Best Regards,

Payeezy Team


manojbajpai5406
Re: HTTPClientErrorExcepton : 403 Forbidden

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


padminisampathk...
Re: HTTPClientErrorExcepton : 403 Forbidden

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

 


ironplanetengin...
Re: HTTPClientErrorExcepton : 403 Forbidden

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?


rohitrajagopal3538
Re: HTTPClientErrorExcepton : 403 Forbidden

Hello,

Which SDK are you using? The API intergration does not require the Merchant ID.

Regards,

Payeezy team


ironplanetengin...
Re: HTTPClientErrorExcepton : 403 Forbidden

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?


rohitrajagopal3538
Re: HTTPClientErrorExcepton : 403 Forbidden

Following are resolutions to the HMAC error -

  1. Ensure that the values of API key, API secret, token, timestamp, nonce and data used in calculating HMAC match the corresponding values used in the HTTP headers.
  2. Ensure that the correct hashing algorithm is used.
  3. Ensure that the API key, API secret and merchant token are correctly entered without leading or trailing spaces.
  4. Ensure that the timestamp in the HTTP headers is in milliseconds and represents epoch time calculated from UTC time.
  5. Ensure that the timestamp in the HTTP header is within 5 minutes of our server time. This depends on your server time.

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


dheerajchaudhar...
Re: HTTPClientErrorExcepton : 403 Forbidden

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


christopherlord730
Re: HTTPClientErrorExcepton : 403 Forbidden

What is the URL you are calling? Is a correlation ID returned?