| 1 |
# coding: utf-8 |
| 2 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 3 |
|
| 4 |
from odoo import fields, models, api |
| 5 |
|
| 6 |
|
| 7 |
class PosPaymentMethod(models.Model): |
| 8 |
_inherit = 'pos.payment.method' |
| 9 |
|
| 10 |
adyen_merchant_account = fields.Char(help='The POS merchant account code used in Adyen') |
| 11 |
|
| 12 |
def _get_adyen_endpoints(self): |
| 13 |
return { |
| 14 |
**super(PosPaymentMethod, self)._get_adyen_endpoints(), |
| 15 |
'adjust': 'https://pal-%s.adyen.com/pal/servlet/Payment/v52/adjustAuthorisation', |
| 16 |
'capture': 'https://pal-%s.adyen.com/pal/servlet/Payment/v52/capture', |
| 17 |
} |
| 18 |
|
| 19 |
@api.model |
| 20 |
def _load_pos_data_fields(self, config): |
| 21 |
params = super()._load_pos_data_fields(config) |
| 22 |
params += ['adyen_merchant_account'] |
| 23 |
return params |