SF Marketing Cloud wrapper for FuelSDK-PHP
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' => ''
];
use Nickolaspz\MarketingCloud\Trigger;
use Nickolaspz\MarketingCloud\DataExtension;
public function send_trigger(Request $request)
{
$email = '[email protected]';
$data = [
[
'Name' => 'Attribute',
'Value' => 'Value'
]
];
$trigger = new Trigger($this->getConfig());
$response = $trigger->send('Trigger_Name', $email, $data);
}