Closed herquiloidehele closed 5 years ago
Hi,
Are you working with the v1x branch of the API? I just tried the code and it's producing the token, and the token works fine. Can you share your code perhaps (without the keys).
I also just wrote a simple snippet for someone using the lib and it seemed to work fine for me too.
Hi,
Are you working with the v1x branch of the API? I just tried the code and it's producing the token, and the token works fine. Can you share your code perhaps (without the keys).
First of all, sorry for the delay
No, i was using the master one. But right now i am working with v1x branch and it works smoothly on local environment, when it comes to implement it on an hosted application (on the server) it returns this error message. Failed to connect to api.sandbox.vm.co.mz port 18352: Connection refused
My code
The response
Thank you.
Can you ping api.sandbox.vm.co.mz from your server? What is your server IP address?
The ping result: Request Timed Out
My server IP address: 160.153.140.95
I notice ping responses are disabled. Can you run the following from the server:
curl -X POST https://api.sandbox.vm.co.mz:18352/ipg/v1x/c2bPayment/singleStage/
You should get an output saying bearer token missing, meaning connection is successful and headers/parameters are missing.
Output: curl: (7) could not connect to the host
from my server. But from others machines I got this output
bearer token missing
I think there is something wrong with my own server, maybe a port problem.
I am using an Godaddy VPS .
Thanks for your help.
Estou com problemas no método getBearerToken() da class Config. Não é possível gerar o Authorization Token através dessa função.
Mas consigo autenticar-me a API com o Authorization Token disponibilizado no exemplo da documentação oficial.
Thanks in advance!