Skip to content

Instantly share code, notes, and snippets.

<assemblies>
...
<!-- Sales Force SDK -->
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
...
</assemblies>
// Read these settings from a configuration file in production
private const string SalesForceApiUrl = "[INSERT_URL_TO_SALESFORCE_API_OAUTH]";
private const string SecurityToken = "[INSERT_SECURITY_TOKEN]";
private const string ClientKey = "[INSERT_CLIENT_KEY]";
private const string ClientSecret = "[INSERT_CLIENT_SECRET]";
private const string Username = "[INSERT_USER_NAME]";
private const string Password = "[INSERT_PASSWORD]" + SecurityToken;
<configuration>
<paypal>
<settings>
<add name="mode" value="sandbox" />
<add name="connectionTimeout" value="360000" />
<add name="requestRetries" value="1" />
<add name="clientId" value="[INSERT_CLIENT_ID]" />
<add name="clientSecret" value="[INSERT_CLIENT_SECRET]" />
</settings>
<configSections>
<section name="paypal" type="PayPal.SDKConfigHandler, PayPal" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
...
</configSections>
<assemblies>
<add assembly="PayPal, Version=1.3.1, Culture=neutral, PublicKeyToken=5b4afc1ccaef40fb" />
<add assembly="log4net, Version=1.2, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a" />
...
</assemblies>
// This is a Page on your website that has the Paypal-Execute-Payment Razor View in it
private const string ReturnUrl = "[INSERT_URL_TO_RETURN_FROM_PAYPAL]";
/// Obtain these values from https://developer.paypal.com, creating an App and locating its ClientId and Secret
private const string ClientId = "[INSERT_CLIENT_ID]";
private const string ClientSecret = "[INSERT_CLIENT_SECRET]";
<assemblies>
<!-- MS Dynamics CRM start -->
<add assembly="Microsoft.Crm.Sdk.Proxy, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="Microsoft.Xrm.Client, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="Microsoft.Xrm.Sdk, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="Microsoft.Xrm.Sdk.Deployment, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="Zengenti.Microsoft.Crm.Sdk.CustomTypes, Culture=neutral" />
...
</assemblies>
// Change this to match your CRM entity you wish to create
private const String CustomEntityName = "[INSERT_ENTITY_NAME]";
private const string ConnectionString = "Url=[INSERT_URL_TO_DYNAMICS_INSTANCE]; Username=[INSERT_USER_NAME]; Password=[INSERT_PASSWORD]";