-
Notifications
You must be signed in to change notification settings - Fork 32
Error parsing json, please check json request #13
Comments
Hi Stephane (@VerilySoft) , I have checked the logs related to this request and no data was sent with the curl. Could you please use the below code replacing with your ServiceKey and Token
|
I just sent a request and here are the details (with my service key and token hidden here for privacy):
Notice, I got this card token after sending the test card details which include the CVC. Here, I understand we're just charging the card and it asks for the CVC. |
@VerilySoft That httpResponse appears to be from the second time you've executed that order with the reusable token, is that correct? Could you please provide the first response? |
I don't have the first full response because I executed it in a console window I closed. I just run the request you ask me to. I don't have the full response but I added a part in the top:
|
The first request I made was done from the browser in JavaScript. Then it passed the token to the web server to charge the customer. The issue then appears here. |
Hello, any idea what would be the issue. I created a token from JavaScript then try charging card from server where it reported JSON format isn't valid while it is. |
@VerilySoft Can you please confirm that the token you created from Javascript has not been used yet, as this error is often present when you try to reuse a token. |
What about when I set reusable to true ? |
You shouldn't get 400's with this particular request with |
Hello, Happy new year 2017 to you! Can you please check this issue for me ? I'm coming back to you because our business strongly relies on this to be fixed. What I did is the following:
Worldpay API server returned this token:
As you can see this JSON code is valid and you can try re-sending this json with a command line utility like curl or wget and you'll see what I'm talking about. This token is a reusable token.
Please check it because the returned error isn't correct but at least if there's an error it's good to return a relevant error to help us fix the correct issue. Thanks in advance, Stephane |
I'm having the same issue, no real error message passed back, apart from "Error parsing json, please check json request". |
I've found what was causing the issue for me (I was sending a non integer amount). @VerilySoft looks like that was the same issue in your JSON you were sending, Best to double check the JSON string you send as WorldPay doesn't return useful errors. You can do that in the sendRequest function in the Connection class. Hope that helps someone in future! |
Thank you. I solved my problem is same |
I'm also having the same problem. But my case is different. Through payment form token generated and charges also happened. When I'm trying to do recurring payment with reusable token Id at the time I'm getting response JSON parse error like that . For the same request data I just removed Address value then It is charging. I have checked my merchant portal by disabling/enabling address verification option even though I'm getting same error. If world pay returning with proper api response particular error . I could be better to show end user to change their input during charges. Common error response creating lot of support issue. Please try to address actual problem for immediate solution. |
Hello,
I'm experiencing issues creating order with Worldpay API. I tried running your own call as found here https://developer.worldpay.com/jsonapi/docs/make-payment:
curl https://api.worldpay.com/v1/orders -H "Authorization:T_S_<HIDDEN>" -H "Content-type: application/json" -X POST -d '{ "token" : "TEST_SU_<HIDDEN>", "orderDescription" : "your-order-description", "amount" : 500, "currencyCode" : "GBP" }'
and here's what I get:
Can you check it please ?
Stephane
The text was updated successfully, but these errors were encountered: