src/Payload.php
public function setButton($payload)
    {
        $model = new Button();

        $model->setType(!empty($payload['type']) ? $payload['type'] : 'web_url');

        if (!empty($payload['title'])) {
            $model->setTitle($payload['title']);
        }

        if (!empty($payload['payload'])) {
            $model->setPayload($payload['payload']);
        }

        if (!empty($payload['url'])) {
            $model->setUrl($payload['url']);
        }

        $this->buttons[] = $model;
    }
public function setButton($payload)
    {
        $model = new Button();

        $model->setType(!empty($payload['type']) ? $payload['type'] : 'web_url');

        if (!empty($payload['title'])) {
            $model->setTitle($payload['title']);
        }

        if (!empty($payload['payload'])) {
            $model->setPayload($payload['payload']);
        }

        if (!empty($payload['url'])) {
            $model->setUrl($payload['url']);
        }

        $this->buttons[] = $model;
    }
Set button

@param array $payload Payload