docusign / docusign-esign-php-client

The Official Docusign PHP Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
https://www.docusign.com/devcenter
MIT License
198 stars 123 forks source link

Stripe Integration #68

Closed kuntal-mybrokerbee closed 5 years ago

kuntal-mybrokerbee commented 5 years ago

We are using "createEnvelope" to send documents for different templates with stripe. In all of our template, there's different amount of stripe. Which we would like to pass from api while sending docs from api. Is there any possible way to pass stripe charge amount from api rather than define static into template. This would be very much helpful to use a single template with dynamic stripe amount to charge instead creating the different template. which is very much headache right now.

mmallis87 commented 5 years ago

@kuntal-mybrokerbee TL/DR this is a working example in PHP: https://github.com/docusign/eg-03-php-auth-code-grant/blob/master/src/EG014CollectPayment.php

Using a template will create a formulaTab that you can get using TemplatesApi::getTemplate call.

When you call EnvelopesApi::createEnvelope, you pass the templateId but also you can override the EnvelopeRecipientTabs field, which contains formulaTabs which is an array (a payment tab is a formula tab with isPaymentAmount=true). You need to set the field total in paymentDetails.

More about the payments feature: https://support.docusign.com/en/guides/requesting-payments-along-with-signatures

LarryKlugerDS commented 5 years ago

Hi @kuntal-mybrokerbee,

Please close the issue unless you wish to add to it.

Thanks, Larry