summaryrefslogtreecommitdiff
path: root/addons/payment_adyen/views
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/payment_adyen/views
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/payment_adyen/views')
-rw-r--r--addons/payment_adyen/views/payment_adyen_templates.xml27
-rw-r--r--addons/payment_adyen/views/payment_views.xml22
2 files changed, 49 insertions, 0 deletions
diff --git a/addons/payment_adyen/views/payment_adyen_templates.xml b/addons/payment_adyen/views/payment_adyen_templates.xml
new file mode 100644
index 00000000..75d2fddc
--- /dev/null
+++ b/addons/payment_adyen/views/payment_adyen_templates.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data noupdate="1">
+ <template id="adyen_form">
+ <input type="hidden" name="data_set" t-att-data-action-url="tx_url" data-remove-me=""/>
+ <input type="hidden" name="merchantReference" t-att-value="merchantReference"/>
+ <input type="hidden" name="paymentAmount" t-att-value="paymentAmount"/>
+ <input type="hidden" name="currencyCode" t-att-value="currencyCode"/>
+ <input type="hidden" name="shipBeforeDate" t-att-value="shipBeforeDate"/>
+ <input type="hidden" name="skinCode" t-att-value="skinCode"/>
+ <input type="hidden" name="merchantAccount" t-att-value="merchantAccount"/>
+ <input type="hidden" name="shopperLocale" t-att-value="shopperLocale"/>
+ <input type="hidden" name="sessionValidity" t-att-value="sessionValidity"/>
+ <input type="hidden" name="merchantSig" t-att-value="merchantSig"/>
+ <!-- URLs -->
+ <input type="hidden" name='resURL'
+ t-att-value="resURL"/>
+ <!-- custom -->
+ <input t-if="merchantReturnData" type="hidden" name='merchantReturnData'
+ t-att-value="merchantReturnData"/>
+ <!-- shopperEmail is not included for SHA-1. To avoid breaking compatibility,
+ include only if filled in -->
+ <input t-if="shopperEmail"
+ type="hidden" name='shopperEmail' t-att-value="shopperEmail"/>
+ </template>
+ </data>
+</odoo>
diff --git a/addons/payment_adyen/views/payment_views.xml b/addons/payment_adyen/views/payment_views.xml
new file mode 100644
index 00000000..af6fac25
--- /dev/null
+++ b/addons/payment_adyen/views/payment_views.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="acquirer_form_adyen" model="ir.ui.view">
+ <field name="name">acquirer.form.adyen</field>
+ <field name="model">payment.acquirer</field>
+ <field name="inherit_id" ref="payment.acquirer_form"/>
+ <field name="arch" type="xml">
+ <xpath expr='//group[@name="acquirer"]' position='inside'>
+ <group attrs="{'invisible': [('provider', '!=', 'adyen')]}">
+ <field name="adyen_merchant_account" attrs="{'required':[('provider', '=', 'adyen'), ('state', '!=', 'disabled')]}"/>
+ <field name="adyen_skin_code" attrs="{'required':[('provider', '=', 'adyen'), ('state', '!=', 'disabled')]}"/>
+ <field name="adyen_skin_hmac_key" attrs="{'required':[('provider', '=', 'adyen'), ('state', '!=', 'disabled')]}"/>
+ <a colspan="2" href="https://www.adyen.com/home/payment-services/online-payments" target="_blank">How to configure your Adyen account?</a>
+ </group>
+ </xpath>
+ </field>
+ </record>
+
+ </data>
+</odoo>