Skip to content

btcpayserver/wix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 

Repository files navigation

BTCPay Server integration for Wix

This guide will show you how you can enable Bitcoin payments using BTCPay Server on your Wix store. At the time of writing it is not possible to package this into a Wix app, so you will need to follow the steps below and copy and paste the code into your Wix editor.

Requirements

Create a payment service provider plugin (PSPP)

  1. In your Wix site, open your Wix Editor.
  2. At the top click on "Dev Mode" and the "Turn on Dev Mode" button to enable the developer mode. Dev Mode
  3. Now on the left side, click on the { } icon to open the code editor.
  4. In the section "Service Plugins" click on the (+) sign and select "Payment" Add payment provider service plugin
  5. On the following screen, click "Start now" Start now
  6. On the legal terms page, check the terms and click "Accept" Accept terms
  7. Now enter the name of the plugin: "BTCPay" (you can use any name but this will make it easier to follow the guide). Then, click "Add & Edit Code": Add & Edit Code
  8. This created the directory "BTCPay" containing two files: BTCPay.js and BTCPay-config.js which is open in the editor. BTCPay-config.js
  9. Next steps are to copy the contents of those two files from our Git repository. You can see the same data structure as on your wix editor. In the BTCPay-config.js file, paste the code from the same file on our Git repository: BTCPay-config.js. Easiest to click the "Copy raw file" icon. BTCPay-config.js
  10. Make sure you delete example code on the BTCPay-config.js file in the wix editor before pasting the new code. BTCPay-config.js completed
  11. Now, open the BTCPay.js file in the wix editor and paste the code from our Git repository: BTCPay.js. Do not forget to remove all the example code from the file before pasting the copied code. BTCPay.js BTCPay.js
  12. Now we need to add the http-functions.js file to the backend directory. To do so, in the "backend" section of your editor click again on the (+) icon and select "Expose Site API" which creates the mentioned http-functions.js file. Note: If you already have that file present then you can skip this step. Create http-functions.js
  13. Copy the code from our Git repository: http-functions.js. If you already had a http-functions.js file, make sure to add the code from the Git repository to the existing file add the copied code below the existing code. If not then make sure you delete all the example code before pasting the code from Github. http-functions.js
  14. Now the code is done it is important to click on publish to save the changes and make the plugin available.

Configure the payment service provider plugin (PSPP)

  1. Go back to your site's dashboard. On the left menu click on "Settings", on that page click "Accept Payments" Settings Accept Payments
  2. On the following page, you should see "Bitcoin Payments with BTCPay" as payment provider. If not, try to refresh the page to clear the Wix cache. Click on "Connect" BTCPay

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published