[RENAME] payment_acquirer_* -> payment_ *
bzr revid: tde@openerp.com-20140122175702-1h1e51z4njt4s70w
|
@ -28,8 +28,8 @@ class PaymentAcquirer(osv.Model):
|
|||
to have required fields that depend on a specific acquirer.
|
||||
|
||||
Each acquirer has a link to an ir.ui.view record that is a template of
|
||||
a button used to display the payment form. See examples in ``payment_acquirer_ogone``
|
||||
and ``payment_acquirer_paypal`` modules.
|
||||
a button used to display the payment form. See examples in ``payment_ogone``
|
||||
and ``payment_paypal`` modules.
|
||||
|
||||
Methods that should be added in an acquirer-specific implementation:
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
@ -10,8 +10,8 @@ import hmac
|
|||
import logging
|
||||
import urlparse
|
||||
|
||||
from openerp.addons.payment_acquirer.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_acquirer_adyen.controllers.main import AdyenController
|
||||
from openerp.addons.payment.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_adyen.controllers.main import AdyenController
|
||||
from openerp.osv import osv, fields
|
||||
from openerp.tools import float_round
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
@ -3,9 +3,9 @@
|
|||
from lxml import objectify
|
||||
import urlparse
|
||||
|
||||
from openerp.addons.payment_acquirer.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_acquirer.tests.common import PaymentAcquirerCommon
|
||||
from openerp.addons.payment_acquirer_adyen.controllers.main import AdyenController
|
||||
from openerp.addons.payment.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment.tests.common import PaymentAcquirerCommon
|
||||
from openerp.addons.payment_adyen.controllers.main import AdyenController
|
||||
from openerp.osv.orm import except_orm
|
||||
from openerp.tools import mute_logger
|
||||
|
||||
|
@ -18,7 +18,7 @@ class AdyenCommon(PaymentAcquirerCommon):
|
|||
self.base_url = self.registry('ir.config_parameter').get_param(cr, uid, 'web.base.url')
|
||||
|
||||
# get the adyen account
|
||||
model, self.adyen_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'payment_acquirer_adyen', 'payment_acquirer_adyen')
|
||||
model, self.adyen_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'payment_adyen', 'payment_acquirer_adyen')
|
||||
|
||||
# some CC (always use expiration date 06 / 2016, cvc 737, cid 7373 (amex))
|
||||
self.amex = (('370000000000002', '7373'))
|
||||
|
@ -84,12 +84,12 @@ class AdyenForm(AdyenCommon):
|
|||
'adyen: wrong value for input %s: received %s instead of %s' % (form_input.get('name'), form_input.get('value'), form_values[form_input.get('name')])
|
||||
)
|
||||
|
||||
@mute_logger('openerp.addons.payment_acquirer_paypal.models.paypal', 'ValidationError')
|
||||
def test_20_paypal_form_management(self):
|
||||
cr, uid, context = self.cr, self.uid, {}
|
||||
# be sure not to do stupid things
|
||||
adyen = self.payment_acquirer.browse(self.cr, self.uid, self.adyen_id, None)
|
||||
self.assertEqual(adyen.env, 'test', 'test without test env')
|
||||
# @mute_logger('openerp.addons.payment_adyen.models.adyen', 'ValidationError')
|
||||
# def test_20_paypal_form_management(self):
|
||||
# cr, uid, context = self.cr, self.uid, {}
|
||||
# # be sure not to do stupid things
|
||||
# adyen = self.payment_acquirer.browse(self.cr, self.uid, self.adyen_id, None)
|
||||
# self.assertEqual(adyen.env, 'test', 'test without test env')
|
||||
|
||||
# {'authResult': u'AUTHORISED',
|
||||
# 'merchantReference': u'SO014',
|
|
@ -22,7 +22,7 @@
|
|||
<!-- submit -->
|
||||
<button type="image" name="submit" width="100px"
|
||||
t-att-class="submit_class">
|
||||
<img t-if="not submit_txt" src="/payment_acquirer_adyen/static/src/img/adyen_icon.png"/>
|
||||
<img t-if="not submit_txt" src="/payment_adyen/static/src/img/adyen_icon.png"/>
|
||||
<span t-if="submit_txt"><t t-esc="submit_txt"/> <span class="fa fa-long-arrow-right"/></span>
|
||||
</button>
|
||||
</form>
|
|
@ -9,9 +9,9 @@ from urllib import urlencode
|
|||
import urllib2
|
||||
import urlparse
|
||||
|
||||
from openerp.addons.payment_acquirer.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_acquirer_ogone.controllers.main import OgoneController
|
||||
from openerp.addons.payment_acquirer_ogone.data import ogone
|
||||
from openerp.addons.payment.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_ogone.controllers.main import OgoneController
|
||||
from openerp.addons.payment_ogone.data import ogone
|
||||
from openerp.osv import osv, fields
|
||||
from openerp.tools import float_round
|
||||
from openerp.tools.float_utils import float_compare
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
@ -4,9 +4,9 @@ from lxml import objectify
|
|||
import time
|
||||
import urlparse
|
||||
|
||||
from openerp.addons.payment_acquirer.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_acquirer.tests.common import PaymentAcquirerCommon
|
||||
from openerp.addons.payment_acquirer_ogone.controllers.main import OgoneController
|
||||
from openerp.addons.payment.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment.tests.common import PaymentAcquirerCommon
|
||||
from openerp.addons.payment_ogone.controllers.main import OgoneController
|
||||
from openerp.tools import mute_logger
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ class OgonePayment(PaymentAcquirerCommon):
|
|||
self.base_url = self.registry('ir.config_parameter').get_param(cr, uid, 'web.base.url')
|
||||
|
||||
# get the adyen account
|
||||
model, self.ogone_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'payment_acquirer_ogone', 'payment_acquirer_ogone')
|
||||
model, self.ogone_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'payment_ogone', 'payment_acquirer_ogone')
|
||||
|
||||
def test_10_ogone_form_render(self):
|
||||
cr, uid, context = self.cr, self.uid, {}
|
||||
|
@ -105,7 +105,7 @@ class OgonePayment(PaymentAcquirerCommon):
|
|||
'ogone: wrong value for form input %s: received %s instead of %s' % (form_input.get('name'), form_input.get('value'), form_values[form_input.get('name')])
|
||||
)
|
||||
|
||||
@mute_logger('openerp.addons.payment_acquirer_ogone.models.ogone', 'ValidationError')
|
||||
@mute_logger('openerp.addons.payment_ogone.models.ogone', 'ValidationError')
|
||||
def test_20_ogone_form_management(self):
|
||||
cr, uid, context = self.cr, self.uid, {}
|
||||
# be sure not to do stupid thing
|
|
@ -43,7 +43,7 @@
|
|||
<!-- submit -->
|
||||
<button type="image" name="submit" width="100px"
|
||||
t-att-class="submit_class">
|
||||
<img t-if="not submit_txt" src="/payment_acquirer_ogone/static/src/img/ogone_icon.png"/>
|
||||
<img t-if="not submit_txt" src="/payment_ogone/static/src/img/ogone_icon.png"/>
|
||||
<span t-if="submit_txt"><t t-esc="submit_txt"/> <span class="fa fa-long-arrow-right"/></span>
|
||||
</button>
|
||||
</form>
|
|
@ -10,8 +10,8 @@ import urlparse
|
|||
import urllib
|
||||
import urllib2
|
||||
|
||||
from openerp.addons.payment_acquirer.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_acquirer_paypal.controllers.main import PaypalController
|
||||
from openerp.addons.payment.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_paypal.controllers.main import PaypalController
|
||||
from openerp.osv import osv, fields
|
||||
from openerp.tools.float_utils import float_compare
|
||||
|
||||
|
@ -25,8 +25,8 @@ class AcquirerPaypal(osv.Model):
|
|||
""" Paypal URLS """
|
||||
if env == 'prod':
|
||||
return {
|
||||
'paypal_form_url': 'https://www.sandbox.paypal.com/cgi-bin/webscr',
|
||||
'paypal_rest_url': 'https://api.sandbox.paypal.com/v1/oauth2/token',
|
||||
'paypal_form_url': 'https://www.paypal.com/cgi-bin/webscr',
|
||||
'paypal_rest_url': 'https://api.paypal.com/v1/oauth2/token',
|
||||
}
|
||||
else:
|
||||
return {
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
@ -1,9 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.addons.payment_acquirer.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment_acquirer.tests.common import PaymentAcquirerCommon
|
||||
from openerp.addons.payment_acquirer_paypal.controllers.main import PaypalController
|
||||
from openerp.osv.orm import except_orm
|
||||
from openerp.addons.payment.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment.tests.common import PaymentAcquirerCommon
|
||||
from openerp.addons.payment_paypal.controllers.main import PaypalController
|
||||
from openerp.tools import mute_logger
|
||||
|
||||
from lxml import objectify
|
||||
|
@ -18,7 +17,7 @@ class PaypalCommon(PaymentAcquirerCommon):
|
|||
self.base_url = self.registry('ir.config_parameter').get_param(cr, uid, 'web.base.url')
|
||||
|
||||
# get the paypal account
|
||||
model, self.paypal_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'payment_acquirer_paypal', 'payment_acquirer_paypal')
|
||||
model, self.paypal_id = self.registry('ir.model.data').get_object_reference(cr, uid, 'payment_paypal', 'payment_acquirer_paypal')
|
||||
# tde+seller@openerp.com - tde+buyer@openerp.com - tde+buyer-it@openerp.com
|
||||
|
||||
# some CC
|
||||
|
@ -152,7 +151,7 @@ class PaypalForm(PaypalCommon):
|
|||
self.assertEqual(form_input.get('value'), '1.56', 'paypal: wrong computed fees')
|
||||
self.assertTrue(handling_found, 'paypal: fees_active did not add handling input in rendered form')
|
||||
|
||||
@mute_logger('openerp.addons.payment_acquirer_paypal.models.paypal', 'ValidationError')
|
||||
@mute_logger('openerp.addons.payment_paypal.models.paypal', 'ValidationError')
|
||||
def test_20_paypal_form_management(self):
|
||||
cr, uid, context = self.cr, self.uid, {}
|
||||
# be sure not to do stupid things
|
|
@ -33,7 +33,7 @@
|
|||
<!-- submit -->
|
||||
<button type="image" name="submit" width="100px"
|
||||
t-att-class="submit_class">
|
||||
<img t-if="not submit_txt" src="/payment_acquirer_paypal/static/src/img/paypal_icon.png"/>
|
||||
<img t-if="not submit_txt" src="/payment_paypal/static/src/img/paypal_icon.png"/>
|
||||
<span t-if="submit_txt"><t t-esc="submit_txt"/> <span class="fa fa-long-arrow-right"/></span>
|
||||
</button>
|
||||
</form>
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-'8' "-*-"
|
||||
|
||||
from openerp.addons.payment_acquirer.models.payment_acquirer import ValidationError
|
||||
from openerp.addons.payment.models.payment_acquirer import ValidationError
|
||||
from openerp.osv import osv
|
||||
from openerp.tools.float_utils import float_compare
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -13,7 +13,7 @@
|
|||
<!-- submit -->
|
||||
<button type="image" name="submit" width="100px"
|
||||
t-att-class="submit_class">
|
||||
<img t-if="not submit_txt" src="/payment_acquirer_transfer/static/src/img/transfer_icon.png"/>
|
||||
<img t-if="not submit_txt" src="/payment_transfer/static/src/img/transfer_icon.png"/>
|
||||
<span t-if="submit_txt"><t t-esc="submit_txt"/> <span class="fa fa-long-arrow-right"/></span>
|
||||
</button>
|
||||
</form>
|
|
@ -9,7 +9,7 @@ OpenERP E-Commerce
|
|||
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['website', 'sale', 'payment_acquirer'],
|
||||
'depends': ['website', 'sale', 'payment'],
|
||||
'data': [
|
||||
'data/website_sale_data.xml',
|
||||
'views/website_sale.xml',
|
||||
|
|