4 posts / 0 new
Last post
solutiontest4509
401

I have added all things correctly...

I created new sandbox,

I am using js integration,

i added all fields which i got from sandbox like. api key, secret, merchant token , merchant identifier

when i submit i get below response....

Payeezy.callback(
{"status": 401,
"results": {
"type": "transarmor",
"status": "failed",
"Error": {"messages": [{"code": "401", "description": "Invalid Tokenize Request. Please check your input."}]}
}})


rohitrajagopal3402
Re: 401

Hi there,

Please send us your HTTP request.

Regards,

Payeezy Team


ironplanetengin...
Re: 401

Hi,

While generating security token via Direct API postTokenTransaction(). We are getting 401 error. We checked API id, secret key and token value.

We checked all the below points:
When testing in CERT environment
Ensure that you are accessing the sandbox URL - https://api-cert.payeezy.com/v1/
Ensure that the API is enabled for sandbox environment. Do this by going to My APIs and edit your API.
Ensure that you are using the merchant token listed in the "My Merchants" page under the "Sandbox" tab.
In tokenization requests, if applicable, ensure that you are using ta_token = 'NOIW'

11 Apr 2016 12:41:51 INFO FirstAPIClientV2Helper - XXX-XXX{"credit_card":{"type":"mastercard","cardholder_name":"John Smith","card_number":"5424180279791732","exp_date":"0416","cvv":"123"},"auth":"true","type":"FDToken","ta_token":"NOIW"}
11 Apr 2016 12:41:51 INFO FirstAPIClientV2Helper - MacHAsh:[97, 122, 100, 37, -104, 4, 39, 112, -38, -78, 0, 32, 94, -108, 3, -14, 85, 116, -106, 84, -22, 8, -48, -6, 82, 30, 124,
32, 76, -35, 102, 91]
11 Apr 2016 12:41:51 INFO FirstAPIClientV2Helper - Apache common value:617a642598042770dab200205e9403f255749654ea08d0fa521e7c204cdd665b
11 Apr 2016 12:41:51 INFO FirstAPIClientV2Helper - Authorize: NjE3YTY0MjU5ODA0Mjc3MGRhYjIwMDIwNWU5NDAzZjI1NTc0OTY1NGVhMDhkMGZhNTIxZTdjMjA0Y2RkNjY1Yg==
11 Apr 2016 12:41:51 DEBUG RestTemplate - Created GET request for "https://api-cert.payeezy.com/v1/securitytokens"
11 Apr 2016 12:41:51 DEBUG RestTemplate - Setting request Accept header to [text/plain, application/json, application/*+json, text/plain, application/xml, application/json, */*, */
*, */*]
11 Apr 2016 12:41:51 DEBUG RestTemplate - Writing [com.ironplanet.firstdata.util.TransactionRequest@fce18d0] as "application/json" using [org.springframework.http.converter.json.Ma
ppingJacksonHttpMessageConverter@fc928e1]
11 Apr 2016 12:41:51 DEBUG RestTemplate - GET request for "https://api-cert.payeezy.com/v1/securitytokens" resulted in 200 (Success)
11 Apr 2016 12:41:51 DEBUG RestTemplate - Reading [java.lang.String] as "application/json" using [org.springframework.http.converter.StringHttpMessageConverter@1efc9627]
11 Apr 2016 12:41:51 DEBUG FirstAPIClientV2Helper - result +++++++++<200 OK,
(
{"status": 401,
"results": {
"type": "",
"status": "failed",
"Error": {"messages": [{"code": "401", "description": "Missing or Invalid API Key"}]}
}})
,{Content-Type=[application/json], Date=[Mon, 11 Apr 2016 19:41:51 GMT], Server=[Apigee Router], Content-Length=[293], Connection=[keep-alive]}>
11 Apr 2016 12:41:51 DEBUG FirstAPIClientV2Helper - o2.toString() ++++++++++++
(
{"status": 401,
"results": {
"type": "",
"status": "failed",
"Error": {"messages": [{"code": "401", "description": "Missing or Invalid API Key"}]}
}})

Can you please help us to debug this issue?


rohitrajagopal3538
Re: 401

Hello,

You will need to do tokenization via a HTTP GET request. We used to have the HTTP POST method of generating tokens but it has since been deprecated. I think the Java code is referring to the old way of generating tokens via POST method.

For now, please generate tokens by the HTTP GET method as demonstrated here - https://developer.payeezy.com/payeezy-api/apis/get/securitytokens

Example request - 'https://api-cert.payeezy.com/v1/securitytokens?apikey=y6pWAJNyJyjGv66IsVuWnklkKUPFbb0a&js_security_key=js-6125e57ce5c46e10087a545b9e9d7354c23e1a1670d9e9c7&ta_token=NOIW&auth=true&callback=Payeezy.callback&type=FDToken&credit_card.type=visa&credit_card.cardholder_name=JohnSmith&credit_card.card_number=4788250000028291&credit_card.exp_date=1030&credit_card.cvv=123

Regards,

Payeezy team