Improvements (#6)

* Add external dependencies to manifest to avoid error on module activation; add requirements.txt.
* Readme 
* Fix errors, restructure settings form, update installation steps, streamline overall.
* Change version
This commit is contained in:
ndeet
2024-07-03 14:49:50 +02:00
committed by GitHub
parent 7930e3eb30
commit 27670dae99
12 changed files with 65 additions and 40 deletions
+6 -6
View File
@@ -13,14 +13,14 @@ class PaymentProvider(models.Model):
code = fields.Selection(
selection_add=[('btcpay', "BTCPay")], ondelete={'btcpay': 'set default'})
btcpay_location = fields.Char(string='Location', size=64, default='https://testnet.demo.btcpayserver.org')
btcpay_confirmationURL = fields.Char(string='Confirmation URL', help='Confirmation URL to return after Btcpay payment', default='http://yourdomain/shop/confirmation')
btcpay_token = fields.Char(string='Token', help='Access Token to BTCPay')
btcpay_privateKey = fields.Text(string='Private Key', help='Private Key for BTCPay Client')
btcpay_facade = fields.Char(string='Facade', help='Token facade type: merchant/pos/payroll', default='merchant') #merchant
btcpay_location = fields.Char(string='BTCPay Server URL', size=64, help='URL where your BTCPay Server instance is reachable (where you log into your BTCPay Server).', default='https://testnet.demo.btcpayserver.org')
btcpay_confirmationURL = fields.Char(string='Confirmation URL', help='Confirmation URL to return after BTCPay payment', default='http://yourdomain/shop/confirmation')
btcpay_pairingCode = fields.Char(string='Pairing Code', help='Create paring Code in your BTCPay server and put here')
btcpay_token = fields.Char(string='Token', help='Access Token to BTCPay. Leave empty, will be autogenerated during pairing.')
btcpay_privateKey = fields.Text(string='Private Key', help='Private Key for BTCPay Client. Leave empty, will be autogenerated during pairing.')
btcpay_facade = fields.Char(string='Facade', help='Token facade type: merchant/pos/payroll. Keep merchant', default='merchant')
def create(self, values_list):
if self.code == 'btcpay':
values_list['btcpay_privateKey'] = crypto.generate_privakey()