2017 © Pedro Peláez
 

library php-crm-toolkit

PHP Toolkit for Microsoft Dynamics CRM

image

alexacrm/php-crm-toolkit

PHP Toolkit for Microsoft Dynamics CRM

  • Thursday, July 26, 2018
  • by wizardist
  • Repository
  • 7 Watchers
  • 49 Stars
  • 19,842 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 25 Forks
  • 9 Open issues
  • 12 Versions
  • 13 % Grown

The README.md

php-crm-toolkit

CRM Toolkit for PHP provides integration with Microsoft Dynamics CRM in PHP applications., (*1)

This toolkit supports only Dynamics 365 SOAP interface. For PHP implementation of the Dynamics 365 Web API, see dynamics-webapi-toolkit project., (*2)

Installation

Install the latest version with, (*3)

$ composer require alexacrm/php-crm-toolkit:dev-master

Examples


/** * Use init.php if you didn't install the package via Composer */ require_once 'vendor/autoload.php'; use AlexaCRM\CRMToolkit\Client as OrganizationService; use AlexaCRM\CRMToolkit\Settings; $contactId = '1d2fc62f-1c56-448b-b546-edfb6d6fec5c'; /* * WS-Trust is now deprecated $options = [ 'serverUrl' => 'https://org.crmN.dynamics.com', 'username' => 'portal@org.onmicrosoft.com', 'password' => 'portalPassword', 'authMode' => 'OnlineFederation', ]; $serviceSettings = new Settings( $options ); */ $options = [ 'serverUrl' => 'https://org.crmN.dynamics.com', 'applicationId' => '1111c62f-dead-beef-dead-edfbffffec5c', 'clientSecret' => 'whateveristhesecretgenerated', 'authMode' => 'OnlineFederation', 'authMethod' => 'sharedSecretAuth', 'cache' => new AlexaCRM\CRMToolkit\NullCache(), ]; // This code uses NullCache which allows to connect and run the operations // but it is very inefficient and should not be used in production. // You can use any PSR-6 compliant cache implementation. $serviceSettings = new OnlineS2SSecretAuthenticationSettings( $options ); $service = new OrganizationService( $serviceSettings ); // retrieve a contact and update its fields $contact = $service->entity( 'contact', $guid ); $contact->firstname = explode( '@', $contact->emailaddress1 )[0]; $contact->update(); printf( 'Info for %s %s updated.', $contact->firstname, $contact->lastname ); // create a new contact $contact = $service->entity( 'contact' ); $contact->firstname = 'John'; $contact->lastname = 'Doe'; $contact->emailaddress1 = 'john.doe@example.com'; $contactId = $contact->create(); // delete a contact $contact->delete(); // execute an action $whoAmIResponse = $service->executeAction( 'WhoAmI' ); echo 'Organization ID: ' . $whoAmIResponse->OrganizationId; // inject cache repo // must be instance of AlexaCRM\CRMToolkit\CacheInterface $cacheRepo = Cache::instance(); $service = new Client( $serviceSettings, $cacheRepo );

In /examples/ you can find a few examples of toolkit usage. Copy config.example.php to config.php, set up credentials for your CRM and you are ready to go!, (*4)

Contributing

Pull requests are gladly accepted in the GitHub repository., (*5)

License

Copyright (c) 2016 AlexaCRM., (*6)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3., (*7)

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Lesser Public License for more details., (*8)

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/., (*9)

The Versions

26/07 2018

dev-master

9999999-dev

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

26/07 2018

20180726

20180726

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

19/07 2018

20180719

20180719

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

29/06 2018

20180629

20180629

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

12/06 2018

20180612

20180612

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

09/05 2018

20180509

20180509

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

12/03 2018

20180321

20180321

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

21/11 2017

20171222

20171222

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

15/11 2017

20171115

20171115

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

12/10 2017

v1.2

1.2.0.0

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

24/11 2016

v1.1.2

1.1.2.0

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Development Requires

by AlexaCRM

php sdk crm dynamics crm

15/08 2016

v1.1.1

1.1.1.0

PHP Toolkit for Microsoft Dynamics CRM

  Sources   Download

LGPL-3.0

The Development Requires

by AlexaCRM

php sdk crm dynamics crm