nickolaspz / marketingcloud
Marketing Cloud Wrapper
v2.0
2019-11-01 19:47 UTC
Requires
Requires (Dev)
- phpunit/phpunit: ~7.0
This package is auto-updated.
Last update: 2025-04-20 10:26:33 UTC
README
SF Marketing Cloud wrapper for FuelSDK-PHP
Config
Create file nmc-config.php in app root folder with the following contents filled in
return [ 'appsignature' => 'none', 'clientid' => '', 'clientsecret' => '', 'defaultwsdl' => '', 'xmlloc' => __DIR__ . '\\..\\cache\\ExactTargetWSDL.xml', 'baseAuthUrl' => '', 'baseSoapUrl' => '', 'baseUrl' => '', 'useOAuth2Authentication' => true, 'accountId' => '', 'scope' => '' ];
Example
use Nickolaspz\MarketingCloud\Trigger; use Nickolaspz\MarketingCloud\DataExtension; public function send_trigger(Request $request) { $email = 'myemail@gmail.com'; $data = [ [ 'Name' => 'Attribute', 'Value' => 'Value' ] ]; $trigger = new Trigger($this->getConfig()); $response = $trigger->send('Trigger_Name', $email, $data); }