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:
@@ -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()
|
||||
|
||||
@@ -105,7 +105,7 @@ class PaymentTransaction(models.Model):
|
||||
if self.provider_code != 'btcpay':
|
||||
return
|
||||
|
||||
#_logger.info("_process_notification_data %s", pprint.pformat(notification_data))
|
||||
_logger.info("_process_notification_data %s", pprint.pformat(notification_data))
|
||||
txn_id = notification_data.get('reference')
|
||||
if not all(txn_id):
|
||||
raise ValidationError(
|
||||
|
||||
Reference in New Issue
Block a user