Includes: - Odoo 19 framework (odoo/) - 27 custom EnCoach addons (new_project/custom_addons/) - encoach_core, encoach_api, encoach_lms_api, encoach_adaptive_api - encoach_exam, encoach_taxonomy, encoach_adaptive, encoach_assignment - encoach_ai, encoach_ai_grading, encoach_ai_generation, encoach_ai_media - encoach_courseware, encoach_communication, encoach_subscription - encoach_notification, encoach_approval, encoach_branding - encoach_classroom, encoach_registration, encoach_stats - encoach_faq, encoach_ticket, encoach_training, encoach_resources - encoach_adaptive_ai, encoach_sis - 21 OpenEduCat Enterprise modules (new_project/enterprise-19/) - 14 OpenEduCat Community modules (new_project/openeducat_erp-19.0/) - Configuration: odoo.conf, requirements.txt, scripts - 200+ REST API endpoints with JWT authentication - SRS and test documentation Made-with: Cursor
64 lines
2.4 KiB
Python
64 lines
2.4 KiB
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo.addons.payment.tests.common import PaymentCommon
|
|
|
|
|
|
class XenditCommon(PaymentCommon):
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
super().setUpClass()
|
|
|
|
cls.xendit = cls._prepare_provider('xendit', update_values={
|
|
'xendit_public_key': 'xnd_public_key',
|
|
'xendit_secret_key': 'xnd_secret_key',
|
|
'xendit_webhook_token': 'xnd_webhook_token',
|
|
})
|
|
cls.provider = cls.xendit
|
|
cls.amount = 11100
|
|
cls.currency = cls._enable_currency('IDR')
|
|
cls.webhook_payment_data = {
|
|
'amount': cls.amount,
|
|
'status': 'PAID',
|
|
'created': '2023-07-12T09:31:13.111Z',
|
|
'paid_at': '2023-07-12T09:31:22.830Z',
|
|
'updated': '2023-07-12T09:31:23.577Z',
|
|
'user_id': '64118d86854d7d89206e732d',
|
|
'currency': cls.currency.name,
|
|
'bank_code': 'BNI',
|
|
'description': cls.reference,
|
|
'external_id': cls.reference,
|
|
'paid_amount': cls.amount,
|
|
'merchant_name': 'Odoo',
|
|
'initial_amount': cls.amount,
|
|
'payment_method': 'BANK_TRANSFER',
|
|
'payment_channel': 'BNI',
|
|
'payment_destination': '880891384013',
|
|
}
|
|
cls.charge_payment_data = {
|
|
'status': 'CAPTURED',
|
|
'authorized_amount': cls.amount,
|
|
'capture_amount': cls.amount,
|
|
'currency': cls.currency.name,
|
|
'metadata': {},
|
|
'credit_card_token_id': '6645aaa2f00da60017cdc669',
|
|
'business_id': '64118d86854d7d89206e732d',
|
|
'merchant_id': 'samplemerchant',
|
|
'merchant_reference_code': '6645aaa3f00da60017cdc66a',
|
|
'external_id': 'ABC00026',
|
|
'eci': '00',
|
|
'charge_type': 'MULTIPLE_USE_TOKEN',
|
|
'masked_card_number': '520000XXXXXX2151',
|
|
'card_brand': 'MASTERCARD',
|
|
'card_type': 'CREDIT',
|
|
'descriptor': 'XDT*ODOO',
|
|
'authorization_id': '6645aaa3f00da60017cdc66b',
|
|
'bank_reconciliation_id': '7158417004836852803955',
|
|
'issuing_bank_name': 'PT BANK NEGARA INDONESIA TBK',
|
|
'cvn_code': 'M',
|
|
'approval_code': '831000',
|
|
'created': '2024-05-16T06:41:41.176Z',
|
|
'id': '6645aaa5f00da60017cdc66c',
|
|
'card_fingerprint': '652e1897a273b700164639a7'
|
|
}
|