PHP Docusign Api get template

孤街浪徒 提交于 2019-12-13 05:26:15

问题


I used the following code to get the docusign templstes i already have, however i am always getting the error - failed: SSL certificate problem: unable to get local issuer certificate.

$templateApi = new DocuSign\eSign\Api\TemplatesApi();
$getTemplate = $templateApi->get($accountId, $contract_template_id);

Is my code correct or is it something else that could cause the problem?


回答1:


I suspect your server is either self certed or is doesn't have SSL/ HHTPS / port 443 setup.

See the StackOverflow issue and Answer here Docusign API call errors PHP

I really suggest using PostMan Client and / or SoapUI to validate you can make the call and see the actual error returned, as it will say more about the most common issues in the response. PostMan or SoapUI will issue the actual API calls successfully (Demo or Prod once you have passed prod API certification) showing you the actual response without having to worry about coding typo's, properties of objects or debugging logging to see what really came back.

This allows you to learn the DocuSign API while using the PHP SDK. You did the right thing asking for help here on Stack Overflow.

I have a couple links for you to get started:

DocuSign Developer Center where you probably found the PHP SDK https://developers.docusign.com/esign-rest-api/sdk-tools

Link for info on PostMan (older version, you can get the latest one - aka Orange Rocket Man logo vs blue world, for Chrome or Mac Standalone - https://blog.grigsbyconsultingllc.com/postman-rest-client-a-google-chrome-app/

X-DocuSign-Authentication Header Q&A on StackOverflow How should the header X-DocuSign-Authentication be used for REST and SOAP?

I like the concept of the DocuSign API explorer to start with, sad part is it doesn't work against prod, so you still have to use something else when you move from demo to prod.

Best of Luck and Enjoy your DocuSign API journey!



来源:https://stackoverflow.com/questions/49442267/php-docusign-api-get-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!