From 25b06ab9118463bbbfcc09be2f6a08c0fc8a878b Mon Sep 17 00:00:00 2001 From: ndeet Date: Mon, 12 Aug 2024 13:30:34 +0200 Subject: [PATCH] Preparing module for app store submission. --- payment_btcpay/__manifest__.py | 3 +- payment_btcpay/static/description/index.html | 72 ++++++++++++++++---- 2 files changed, 62 insertions(+), 13 deletions(-) diff --git a/payment_btcpay/__manifest__.py b/payment_btcpay/__manifest__.py index 5d9f570..d3f1c58 100644 --- a/payment_btcpay/__manifest__.py +++ b/payment_btcpay/__manifest__.py @@ -22,11 +22,12 @@ { 'name': 'Payment Provider: BTCPay', 'summary': 'This module integrates BTCPAY - pay with Bitcoin - with Odoo v17.0', - 'author': 'Vandekul', + 'author': 'Vandekul, ndeet', 'website': 'https://github.com/btcpayserver/odoo', 'category': 'Accounting/Payment Providers', 'version': '17.0.1.1', 'license': 'GPL-3', + 'currency': 'USD', 'application': False, 'installable': True, 'auto_install': False, diff --git a/payment_btcpay/static/description/index.html b/payment_btcpay/static/description/index.html index 175b55f..bf4c75b 100644 --- a/payment_btcpay/static/description/index.html +++ b/payment_btcpay/static/description/index.html @@ -3,11 +3,11 @@
-

BTCPay Gateway

-

This is the module to connect Odoo 17.0 and BTCPay

+

BTCPay Server Gateway

+

This is the module to connect Odoo 17.0 and BTCPay Server

- +
@@ -20,19 +20,67 @@
-

Configure Payment Provider

+

Install the module

+
+

+

    +
  • Clone our [repository](https://github.com/btcpayserver/odoo) or download the .zip from the [releases page](https://github.com/btcpayserver/odoo/releases) +
  • Make sure you are on branch `17.0` or downloaded a release tagged with version v17.x +
  • Place the `payment_btcpay` directory in your Odoo addons directory +
  • Install dependencies by running `pip install -r requirements.txt` (from inside the `payment_btcpay` directory) +
  • Restart Odoo +
  • Go to Apps -> Update Apps List +
  • Remove the "Apps" filter and search for "btcpay" +
  • Click **Activate** button +
+

+
+
+
+ +
+
+

Configure BTCPay as payment provider

    -
  • Install BTCPay Module -> Website -> eCommerce -> Payment Acquirers -> BTCPay
  • -
  • Put your facace. Best option is 'merchant'.
  • -
  • Put the location as test or live url. Test example url: https://testnet.demo.btcpayserver.org
  • -
  • Put the Confirmation URL where BTCpay will return after payment.
  • -
  • Put your "Pairing Code" if you want that system get the "Token", after that "Pairing Code" will be deleted and the "Token" will appear in the corresponding field. You must safe the changes in order that this happens. NOTE: if you want to get new "Token" throw new "Pairing Code", please remove the "Token" field. Keep in mind that "Token" field must be in blank if you want to get throw the API.
  • -
  • Put your "Token" if you have it and don't want to use Pairing Code to get it. Remember, if you want to get throw API please don't write anything here.
  • -
  • If you have a Private Key you can write here otherwise system will get when you safe the Payment Provider
  • -
  • Remember to Publish On Website
  • +
  • Go to Website -> Configuration -> Payment Providers
  • +
  • Search for BTCPay and click on button Activate
+ +

In the BTCPay settings form, tab "Credentials":

+
    +
  • Set field "State" to enabled
  • +
  • Set field "BTCPay Server URL" as test or live URL including https://. Example URL: https://testnet.demo.btcpayserver.org
  • +
  • Get a pairing code from your BTCPay Server store: Settings -> Access Tokens +
      +
    • Click on "Create Token" button
    • +
    • Label: enter e.g. "My odoo store"
    • +
    • Public Key: leave empty
    • +
    • Click on "Request Pairing" button, on next page click "Approve" button
    • +
    • At the top copy the code next to "Server initiated pairing code", e.g. "hg7z8wN"
    • +
    +
  • +
  • Back in Odoo, paste the code into "Pairing Code" field
  • +
  • Hit Tab key on your keyboard (or click on another field) and the pairing process will start automatically
  • +
  • When the pairing is successful the "Token" and "Private Key" field will be filled automatically
  • +
  • Field Facade, keep default 'merchant'.
  • +
+ +

On the tab "Configuration":

+
    +
  • Make sure field "Payment Journal" is set to "Bank", otherwise you can click the dropdown and click on the suggestion "Bank"
  • +
  • Now you can save the settings
  • +
+ +

Check the payment method is enabled:

+
    +
  • Go to Website -> Configuration -> Payment Methods
  • +
  • Make sure "Pay with Bitcoin / Lightning Network" is active
  • +
+ +

Congrats, all done. Do some testing to be sure all works.

+