Hello, I am as of now trying to make a module that introduce a new Payment Provider, and so I took inspiration from module that are already in Odoo like Stripe or Adyen.
However, as I am trying to make the inline form work, I have a hard time understanding this bit of code :
def _adyen_get_inline_form_values(self, pm_code, amount=None, currency=None):
""" Return a serialized JSON of the required values to render the inline form.
Note: `self.ensure_one()`
:param str pm_code: The code of the payment method whose inline form to render.
:param float amount: The transaction amount.
:param res.currency currency: The transaction currency.
:return: The JSON serial of the required values to render the inline form.
:rtype: str
"""
self.ensure_one()
inline_form_values = {
'client_key': self.adyen_client_key,
'adyen_pm_code': const.PAYMENT_METHODS_MAPPING.get(pm_code, pm_code),
'formatted_amount': self._adyen_get_formatted_amount(amount, currency),
}
return json.dumps(inline_form_values)
No, I understand what it does. My problem is to know what the required values are. Do they change between providers? Where do I find them?