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:
29
addons/payment_paydunya/views/payment_paydunya_templates.xml
Normal file
29
addons/payment_paydunya/views/payment_paydunya_templates.xml
Normal 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>
|
||||
21
addons/payment_paydunya/views/payment_paydunya_views.xml
Normal file
21
addons/payment_paydunya/views/payment_paydunya_views.xml
Normal 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>
|
||||
Reference in New Issue
Block a user