Add PayDunya payment provider integration

- Implemented PayDunya payment provider with necessary models, controllers, and views.
- Added configuration files for Docker and Odoo setup.
- Included .gitignore for Python and Odoo specific files.
This commit is contained in:
MMG
2026-02-06 11:36:42 +00:00
commit c93b260937
14 changed files with 570 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="paydunya_redirect_form">
<t t-call="website.layout">
<div class="container my-5">
<div class="oe_paydunya_redirect">
<h3>Redirection vers PayDunya...</h3>
<form id="paydunya_redirect_form" t-att-action="redirect_url" method="post">
<input type="hidden" name="token" t-att-value="paydunya_token"/>
<noscript>
<button type="submit" class="btn btn-primary">Payer</button>
</noscript>
</form>
<t t-if="redirect_url">
<script type="text/javascript">
(function () {
const f = document.getElementById('paydunya_redirect_form');
if (f) { f.submit(); }
})();
</script>
</t>
</div>
</div>
</t>
</template>
</odoo>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Form view for PayDunya payment provider -->
<record id="payment_provider_paydunya_form" model="ir.ui.view">
<field name="name">payment.provider.paydunya.form</field>
<field name="model">payment.provider</field>
<field name="inherit_id" ref="payment.payment_provider_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='credentials']" position="inside">
<group id="paydunya_credentials" invisible='code != "paydunya"'>
<h2>PayDunya Credentials</h2>
<field name="environment"/>
<field name="paydunya_master_key" password="True"/>
<field name="paydunya_public_key"/>
<field name="paydunya_private_key" password="True"/>
<field name="paydunya_token" password="True"/>
</group>
</xpath>
</field>
</record>
</odoo>