summaryrefslogtreecommitdiff
path: root/addons/payment_adyen/models
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2014-03-19 15:46:08 +0100
committerThibault Delavallée <tde@openerp.com>2014-03-19 15:46:08 +0100
commit38ae695d00e5afe95da7220e0029c53ed0cda510 (patch)
treefcea20a10a90c74c40f56616e1d4bd89fc2c925a /addons/payment_adyen/models
parent10babec89d7457e668a78f11dc972154cd473a6f (diff)
[IMP] payment modules: added provider selection field that is different
from the name. This allows to distinguish name and provider. Provider is a more technical field, used to call some specific methods (<provider>_method_name). The name field is used for display on the website. Code and views udpated accordingly. bzr revid: tde@openerp.com-20140319144608-0i4rv520l0bh53f0
Diffstat (limited to 'addons/payment_adyen/models')
-rw-r--r--addons/payment_adyen/models/adyen.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/addons/payment_adyen/models/adyen.py b/addons/payment_adyen/models/adyen.py
index 80103f50dae..607d65738c5 100644
--- a/addons/payment_adyen/models/adyen.py
+++ b/addons/payment_adyen/models/adyen.py
@@ -26,14 +26,14 @@ class AcquirerAdyen(osv.Model):
- yhpp: hosted payment page: pay.shtml for single, select.shtml for multiple
"""
- if env == 'prod':
- return {
- 'adyen_form_url': 'https://prod.adyen.com/hpp/pay.shtml',
- }
- else:
- return {
- 'adyen_form_url': 'https://test.adyen.com/hpp/pay.shtml',
- }
+ return {
+ 'adyen_form_url': 'https://%s.adyen.com/hpp/pay.shtml' % env,
+ }
+
+ def _get_providers(self, cr, uid, context=None):
+ providers = super(AcquirerAdyen, self)._get_providers(cr, uid, context=context)
+ providers.append(['adyen', 'Adyen'])
+ return providers
_columns = {
'adyen_merchant_account': fields.char('Merchant Account', required_if_provider='adyen'),
@@ -54,7 +54,7 @@ class AcquirerAdyen(osv.Model):
:return string: shasign
"""
assert inout in ('in', 'out')
- assert acquirer.name == 'adyen'
+ assert acquirer.provider == 'adyen'
if inout == 'in':
keys = "paymentAmount currencyCode shipBeforeDate merchantReference skinCode merchantAccount sessionValidity shopperEmail shopperReference recurringContract allowedMethods blockedMethods shopperStatement merchantReturnData billingAddressType deliveryAddressType offset".split()