Skip to content

TriggerNotificationEvent - incorrect example for passing attributes to localApi call #287

@Makinami

Description

@Makinami

In localApi example, attributes are passed same as in over the network call, while they should be defined as regular PHP array.
https://developers.whmcs.com/api-reference/triggernotificationevent/

Working example:

// ...
$postData = array(
    'notification_identifier' => 'custom.server.add',
    'title' => 'New Server Added',
    'message' => 'new-server.examplehost.com added as a cPanel server and is available for provisioning.',
    'url' => 'https://whmcs.example.test/admin/configservers.php?action=manage&id=3',
    'status' => 'Success',
    'statusStyle' => 'info',
    'attributes' => [
        [
            'label' => 'example',
            'value' => 'example',
            'url' => 'https://whmcs.example.test/admin/configservers.php?action=manage&id=3',
            'style' => 'success',
            'icon' => 'example',
        ],
    ],
);
// ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions