Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Makinami opened this issue May 9, 2023 · 0 comments

Comments

@Makinami
Copy link

Makinami commented May 9, 2023

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',
        ],
    ],
);
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant