nickolaspz/marketingcloud

Marketing Cloud Wrapper

Installs: 94

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/nickolaspz/marketingcloud

v2.0 2019-11-01 19:47 UTC

This package is auto-updated.

Last update: 2025-10-20 11:30:32 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);
}