Understanding the first code lines of a working SDK implementation.
Configuring the iDonate SDK client requires a few pieces of specific data in order to ensure proper function. This article will help direct users to the pertinent data.
Configuration Elements
To configure an iDonate SDK client to communicate with your organization, there are two blocks of code that must be included.
The configuration shown here is for a test environment, and must be replaced with your organization's data.
Client Configuration
const config = {
organizationId: '2aa2e362-51aa-483d-bedd-645ae18cc1f3',
paymentGatewayId: 'f21c29e4-1a8f-46a1-b1d8-01b5ccc2363d',
enableSandboxMode: true,
recaptchaType: 'organization',
spreedlyEnvironmentKey: 'KCE4DaaycL92NvslhfVUNbWgioC',
};
ReCaptcha Configuration
<div class="g-recaptcha"
data-sitekey="6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"
data-callback="recaptchaCallback"
data-size="invisible"></div>;
Client Configuration
const config = {
organizationId: '2aa2e362-51aa-483d-bedd-645ae18cc1f3',
paymentGatewayId: 'f21c29e4-1a8f-46a1-b1d8-01b5ccc2363d',
enableSandboxMode: true,
recaptchaType: 'organization',
spreedlyEnvironmentKey: 'KCE4DaaycL92NvslhfVUNbWgioC',
};
iDonate Client Parameters
- Organization ID – The Organization ID can be found by selecting the icon in the top-left of the Integrations Section.
- Payment Gateway ID – The Payment Gateway ID is listed as "Installed Gateways" under "Spreedly Configuration" in the Cash Options Section.
- Enable Sandbox Mode – If set to true, then the client will be set to sandbox (or "testing") mode. If set to false, then the client is being used in production.
- Recaptcha Type – This must be set to organization.
- Spreedly Environment Key – To find your Spreedly Environment Key, please refer to Spreedly's documentation regarding Spreedly configuration.
ReCaptcha Configuration
<div class="g-recaptcha"
data-sitekey="6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"
data-callback="recaptchaCallback"
data-size="invisible"></div>;
ReCaptcha Configuration
ReCaptcha Parameters
- Class – Must be set to g-recaptcha.
- Data Site-key – Please refer to Google's ReCaptcha documentation for information on how to configure ReCaptcha for your site's domain.
- Data Callback – The function that is called when grecaptcha.execute(); is run.
- Data Size – Must be set to invisible or checkbox.