Search code examples
docusignapi

Getting started with a WordPress plugin integration


I'm trying to add Docusign to a custom WordPress plugin. We need to conditionally send out a remote signing request when a member signs up to the site. I've gone through the Quickstart project and the examples, but I'm not sure how to take those examples and then integrate them with our plugin. Would the entire Quickstart project get added to a subfolder and then referenced somehow? How can I tell which files are necessary to the functionality I want, and what can be removed? I tried loading the docusign composer package to the plugin along with the Quickstart's ds_config.php file and EG002SigningViaEmail.php, and got the error Class "Example\Controllers\eSignBaseController" not found, so clearly I'm missing some things. Sorry if the answer is really obvious, I don't work with APIs often.


Solution

  • Answer given in the comments so putting it here now:

    To get the PHP code out of the quickstart into another project you need:

    1. SigningViaEmailService.php - code for sending envelopes

    2. Either CodeGrantService.php if you use ACG or you need JWTService.php if you're using JWT

    And composer needs to find the DocuSign PHP SDK as well.