| 1 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 |
|
| 3 |
from odoo.addons.payment.tests.common import PaymentCommon |
| 4 |
|
| 5 |
|
| 6 |
class MercadoPagoCommon(PaymentCommon): |
| 7 |
|
| 8 |
MP_PAYMENT_ID = '1234567890' |
| 9 |
|
| 10 |
@classmethod |
| 11 |
def setUpClass(cls): |
| 12 |
super().setUpClass() |
| 13 |
|
| 14 |
cls.provider = cls._prepare_provider('mercado_pago', update_values={ |
| 15 |
'mercado_pago_account_country_id': cls.env.ref('base.mx').id, |
| 16 |
'mercado_pago_access_token': 'TEST-4850554046279901-TEST-TEST', |
| 17 |
}) |
| 18 |
cls.payment_id = '123456' |
| 19 |
cls.redirect_payment_data = { |
| 20 |
'external_reference': cls.reference, |
| 21 |
'payment_id': cls.payment_id, |
| 22 |
} |
| 23 |
cls.webhook_payment_data = { |
| 24 |
'action': 'payment.created', |
| 25 |
'data': {'id': cls.payment_id}, |
| 26 |
} |
| 27 |
cls.verification_data = { |
| 28 |
'id': cls.payment_id, |
| 29 |
'status': 'approved', |
| 30 |
} |
| 31 |
cls.verification_data_for_error_state = { |
| 32 |
'id': cls.payment_id, |
| 33 |
'status': 404, |
| 34 |
} |