public function toHtml($sig = true)
    {
        $html = '<script';
        $html = $html . ' src="'        . self::BUTTON_SRC       . '"';
        $html = $html . ' class="'      . self::BUTTON_CLASS     . '"';
        if (isset($this->values['key'])) {
            $html = $html . ' data-key="'   . $this->values['key']   . '"';
        }
        if (isset($this->values['image'])) {
            $html = $html . ' data-image="' . $this->values['image'] . '"';
        }
        if (isset($this->values['callback'])) {
            $html = $html . ' data-callback="' . $this->values['callback'] . '"';
        }
        if (isset($this->values['cart_id'])) {
            $html = $html . ' data-cart-id="' . $this->values['cart_id'] . '"';
        }
        if (!isset($this->values['items']) || count($this->values['items']) < 1) {
            throw new Error\InvalidButton('Item is required.');
        }
        foreach ($this->values['items'] as $index => $item) {
            $index++;
            $html = $html . ' data-item-id-'         . $index . '="' . $item['id']         . '"';
            $html = $html . ' data-item-name-'       . $index . '="' . $item['name']       . '"';
            $html = $html . ' data-item-unit-price-' . $index . '="' . $item['unit_price'] . '"';
            $html = $html . ' data-item-quantity-'   . $index . '="' . $item['quantity']   . '"';
        }
        if ($sig) {
            $html = $html . ' data-sig="' . $this->signature()  . '"';
        }
        $html = $html      . '>';
        $html = $html      . '</script>';
        return $html;
    }