Skip to content

Allow your customers to pay with BTCPay Server from your Shopify store

Notifications You must be signed in to change notification settings

btcpayserver/btcpayserver-shopify-plugin

Repository files navigation

Shopify plugin

Configuration

Environment variable Description Example
BTCPAY_SHOPIFY_PLUGIN_DEPLOYER The URL of the shopify-app-deployer http://localhost:5000/

For maintainers

If you are a developer maintaining this plugin, in order to maintain this plugin, you need to clone this repository with --recurse-submodules:

git clone --recurse-submodules https://github.com/btcpayserver/btcpayserver-shopify-plugin

Then create the appsettings.dev.json file in submodules\btcpayserver\BTCPayServer, with the following content:

{
  "DEBUG_PLUGINS": "../../../Plugins/BTCPayServer.Plugins.ShopifyPlugin/bin/Debug/net8.0/BTCPayServer.Plugins.ShopifyPlugin.dll",
  "SHOPIFY_PLUGIN_DEPLOYER": "http://localhost:32204/"
}

This will ensure that BTCPay Server loads the plugin when it starts.

Next, Shopify requires a public domain in order to integrate with it. The docker-compose contains [cloudflared] for this purpose.

Create a .env file at the root of the project, with the following content:

CLOUDFLARE_TUNNEL_TOKEN="<token>"

To get the token, follow this documentation.

  1. In the Edit public hostname part, Service should be https://host.docker.internal:14142.
  2. Disable TLS check: Additional application settings => TLS => Check No TLS Verify.

Finally, start the development dependencies via docker-compose:

docker-compose up -d dev

Finally:

  1. Set up BTCPay Server as the startup project in Rider or Visual Studio.
  2. Make sure to select the Bitcoin-HTTPS launch settings.

If you want to reset the environment you can run:

docker-compose down -v
docker-compose up -d dev

Note: Running or compiling the BTCPay Server project will not automatically recompile the plugin project. Therefore, if you make any changes to the project, do not forget to build it before running BTCPay Server in debug mode.

We recommend using Rider for plugin development, as it supports hot reload with plugins. You can edit .cshtml files, save, and refresh the page to see the changes.

Visual Studio does not support this feature.

About

Allow your customers to pay with BTCPay Server from your Shopify store

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published