1. Download code: Click Here
2. To add in shopify you will have to create two files:
Assets/my-custom-style.css
Snippets/my-smart-button.liquid
3. Include the liquid file wherever smart button required:
{% include ‘my-smart-button’ %}
4. Include .css file in theme.liquid:
{{ ‘my-custom-style.css’ | asset_url | stylesheet_tag }}