diff --git a/safer_pay/README.rst b/safer_pay/README.rst new file mode 100644 index 000000000..9d9551dbc --- /dev/null +++ b/safer_pay/README.rst @@ -0,0 +1,52 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Safer-pay Payment Gateway Integration +===================================== +Safer-pay is the modern and secure payment service provider.This Module helps +to integrate Safer-pay Payment Gateway with your eCommerce Website.Hence +Allow us to make payments via Safer-pay Payment Gateway + +Configuration +============= +* Activate Payment provider in invoicing + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Lesser General Public License, Version 3 (LGPL v3). + +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +Developer: + (V15) Fathima Mazlin AM, + (V17) Jumana Haseen, +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/safer_pay/__init__.py b/safer_pay/__init__.py new file mode 100644 index 000000000..02cdc570f --- /dev/null +++ b/safer_pay/__init__.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +from . import models +from . import controllers +from odoo.addons.payment import setup_provider, reset_payment_provider + + +def post_init_hook(env): + """Functions that will execute after the module installation.""" + setup_provider(env, 'saferpay') + + +def uninstall_hook(env): + """Record will be deleted while uninstalling the module""" + reset_payment_provider(env, 'saferpay') diff --git a/safer_pay/__manifest__.py b/safer_pay/__manifest__.py new file mode 100644 index 000000000..e653021aa --- /dev/null +++ b/safer_pay/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +{ + 'name': "Safer-pay Payment Gateway Integration", + 'version': '17.0.1.0.0', + 'category': 'eCommerce', + 'summary': 'Safer-pay is a payment provider that integrate with odoo', + 'description': 'Safer-pay is a payment provider that integrate with odoo. ' + 'we can done payment through safer pay in ecommerce', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'account', 'payment', 'website_sale'], + 'data': [ + 'data/payment_method_data.xml', + 'views/payment_safer_pay_templates.xml', + 'data/payment_provider_data.xml', + 'views/payment_provider_views.xml', + 'views/sale_order_views.xml', + 'views/payment_token_views.xml', + 'views/payment_transaction_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'safer_pay/static/src/js/payment_form.js', + 'safer_pay/static/src/js/payment_saferpay_mixin.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, + 'post_init_hook': 'post_init_hook', + 'uninstall_hook': 'uninstall_hook', +} diff --git a/safer_pay/const.py b/safer_pay/const.py new file mode 100644 index 000000000..7cc6dd1a4 --- /dev/null +++ b/safer_pay/const.py @@ -0,0 +1,6 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +# The codes of the payment methods to activate when Demo is activated. +DEFAULT_PAYMENT_METHOD_CODES = [ + 'saferpay', +] diff --git a/safer_pay/controllers/__init__.py b/safer_pay/controllers/__init__.py new file mode 100644 index 000000000..d0af46877 --- /dev/null +++ b/safer_pay/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +from . import safer_pay diff --git a/safer_pay/controllers/safer_pay.py b/safer_pay/controllers/safer_pay.py new file mode 100644 index 000000000..159d678cb --- /dev/null +++ b/safer_pay/controllers/safer_pay.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +import json +import requests +from odoo import _ +from odoo.exceptions import UserError +import logging +from odoo import http +from odoo.http import request +_logger = logging.getLogger(__name__) + + +class SaferPay(http.Controller): + """For connecting safer pay payment acquirer with odoo """ + + @http.route('/saferpay/payment', type='json', auth='public', website=True) + def saferpay_payment(self, reference): + """ Connect with safer pay payment gateway""" + base_url = request.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + transaction = request.env['payment.transaction'].sudo().search( + [('reference', '=', reference)]) + amount = int((transaction.amount * 0.011) * 100) + sequence = transaction.reference + order = request.env['sale.order'].sudo().search( + [('name', '=', sequence)]) + provider_details = request.env.ref('safer_pay.payment_acquirer_data') + if provider_details.customer and provider_details.terminal: + url = "https://test.saferpay.com/api/Payment/v1/PaymentPage/Initialize" + payload = json.dumps({ + "RequestHeader": { + "SpecVersion": "1.33", + "CustomerId": str(provider_details.customer), + "RequestId": "1", + "RetryIndicator": 0 + }, + "TerminalId": str(provider_details.terminal), + "Payment": { + "Amount": { + "Value": str(amount), + "CurrencyCode": "CHF" + }, + "OrderId": str(order.id), + "Description": str(sequence) + }, + "ReturnUrl": { + "Url": base_url + "/shop/confirmation", + } + }) + headers = { + 'Content-Type': 'application/json; charset=utf-8', + 'Accept': 'application/json', + 'SpecVersion': '1.33', + 'RetryIndicator': '0', + 'Authorization': + 'Basic QVBJXzI3MjI0NF85Nzg0NTM3MzpKdW1hbmFIYXNlZW41NSoqKg==', + 'Cookie': 'ASP.NET_SessionId=lr0an2dywf25itkugaam32pm; PREF=C=en' + } + response = requests.request("POST", url, headers=headers, + data=payload) + text = response.json() + website = request.env['website'].get_current_website() + sale_order = website.sale_get_order(force_create=True) + if sale_order.state != 'draft': + request.session['sale_order_id'] = None + sale_order = website.sale_get_order( + force_create=True) + sale_order.write({ + 'state': 'sale', + 'payment': False + }) + if text.get('RedirectUrl'): + sale_order.write({ + 'payment': False, + 'sale_order': sale_order.id, + }) + redirect_url = text['RedirectUrl'] + return redirect_url + else: + sale_order.write({ + 'payment': True + }) + return False + else: + raise UserError(_("Please set the credential.")) diff --git a/safer_pay/data/payment_method_data.xml b/safer_pay/data/payment_method_data.xml new file mode 100644 index 000000000..26c94c35e --- /dev/null +++ b/safer_pay/data/payment_method_data.xml @@ -0,0 +1,15 @@ + + + + + SaferPay + saferpay + 2 + + True + False + partial + + diff --git a/safer_pay/data/payment_provider_data.xml b/safer_pay/data/payment_provider_data.xml new file mode 100644 index 000000000..60f40c376 --- /dev/null +++ b/safer_pay/data/payment_provider_data.xml @@ -0,0 +1,21 @@ + + + + + SaferPay + test + saferpay + + + + + True + True + + + + diff --git a/safer_pay/doc/RELEASE_NOTES.md b/safer_pay/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..72c5db7d8 --- /dev/null +++ b/safer_pay/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 27.11.2023 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Safer-pay Payment Gateway Integration \ No newline at end of file diff --git a/safer_pay/models/__init__.py b/safer_pay/models/__init__.py new file mode 100644 index 000000000..feb28029a --- /dev/null +++ b/safer_pay/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +from . import payment_provider +from . import payment_token +from . import payment_transaction +from . import sale_order diff --git a/safer_pay/models/payment_provider.py b/safer_pay/models/payment_provider.py new file mode 100644 index 000000000..db527a36e --- /dev/null +++ b/safer_pay/models/payment_provider.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class PaymentProvider(models.Model): + """Create a new records for saferpay in payment provider """ + _inherit = 'payment.provider' + + code = fields.Selection( + selection_add=[('saferpay', "saferpay")], + ondelete={'saferpay': 'set default'}, required_if_provider='demo', + help="SaferPay code" + ) + customer = fields.Char(string='Customer ID', help="Customer ID get from " + "Signup credential") + terminal = fields.Char(string="Terminal ID", help="Terminal Id get from " + "signup credential") + username = fields.Char(string="Username", help="Username of Safer-pay") + password = fields.Char(string="Password", help="Password of Safer-pay") + + @api.depends('code', 'customer', 'terminal', 'username', 'password') + def _compute_view_configuration_fields(self): + """ Override of payment to hide the credentials page. + :return: None""" + super()._compute_view_configuration_fields() + self.filtered(lambda p: p.code == 'saferpay').show_credentials_page = \ + True + + def _compute_feature_support_fields(self): + """ Override of `payment` to enable additional features. """ + super()._compute_feature_support_fields() + self.filtered(lambda p: p.code == 'saferpay').update({ + 'support_express_checkout': True, + 'support_manual_capture': 'partial', + 'support_refund': 'partial', + 'support_tokenization': True, + }) + + @api.constrains('state', 'code') + def _check_provider_state(self): + if self.filtered(lambda p: p.code == 'saferpay' and p.state not in ( + 'test', 'disabled')): + raise UserError(_("saferpay providers should never be enabled.")) diff --git a/safer_pay/models/payment_token.py b/safer_pay/models/payment_token.py new file mode 100644 index 000000000..2e41ca0fd --- /dev/null +++ b/safer_pay/models/payment_token.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +from odoo import fields, models + + +class PaymentToken(models.Model): + """Create a new records for saferpay in payment token """ + _inherit = 'payment.token' + + safer_pay_simulated_state = fields.Selection( + string="Simulated State", + help="The state in which transactions created from this token " + "should be set.", + selection=[ + ('pending', "Pending"), + ('done', "Confirmed"), + ('cancel', "Canceled"), + ('error', "Error"), + ], + ) + + def _build_display_name(self, *args, should_pad=True, **kwargs): + """ Override of `payment` to build the display name without padding. + Note: self.ensure_one() + :param list args: The arguments passed by QWeb when calling this method. + :param bool should_pad: Whether the token should be padded or not. + :param dict kwargs: Optional data. + :return: The demo token name. + :rtype: str + """ + if self.provider_code != 'saferpay': + return super()._build_display_name(*args, should_pad=should_pad, + **kwargs) + return super()._build_display_name(*args, should_pad=False, **kwargs) diff --git a/safer_pay/models/payment_transaction.py b/safer_pay/models/payment_transaction.py new file mode 100644 index 000000000..652e747a0 --- /dev/null +++ b/safer_pay/models/payment_transaction.py @@ -0,0 +1,244 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +import logging +from odoo import fields, models, _ +from odoo.exceptions import UserError, ValidationError +_logger = logging.getLogger(__name__) + + +class PaymentTransaction(models.Model): + """Create a new records for safer_pay in payment transaction """ + _inherit = 'payment.transaction' + + capture_manually = fields.Boolean(related='provider_id.capture_manually') + + # === ACTION METHODS ===# + + def action_saferpay_set_done(self): + """ Set the state of the safer_pay transaction to 'done'. + Note: self.ensure_one() + :return: None + """ + self.ensure_one() + if self.provider_code != 'saferpay': + return + notification_data = {'reference': self.reference, + 'simulated_state': 'done'} + self._handle_notification_data('saferpay', notification_data) + + def action_saferpay_set_canceled(self): + """ Set the state of the saferpay transaction to 'cancel'. + Note: self.ensure_one() + :return: None + """ + self.ensure_one() + if self.provider_code != 'saferpay': + return + notification_data = {'reference': self.reference, + 'simulated_state': 'cancel'} + self._handle_notification_data('saferpay', notification_data) + + def action_saferpay_set_error(self): + """ Set the state of the demo transaction to 'error'. + Note: self.ensure_one() + :return: None + """ + self.ensure_one() + if self.provider_code != 'saferpay': + return + notification_data = {'reference': self.reference, + 'simulated_state': 'error'} + self._handle_notification_data('saferpay', notification_data) + + # === BUSINESS METHODS ===# + + def _send_payment_request(self): + """ Override of payment to simulate a payment request. + Note: self.ensure_one() + :return: None + """ + super()._send_payment_request() + if self.provider_code != 'saferpay': + return + + if not self.token_id: + raise UserError("saferpay: " + _("The transaction is not " + "linked to a token.")) + simulated_state = self.token_id.saferpay_simulated_state + notification_data = {'reference': self.reference, + 'simulated_state': simulated_state} + self._handle_notification_data('saferpay', notification_data) + + def _send_refund_request(self, **kwargs): + """ Override of payment to simulate a refund. + + Note: self.ensure_one() + + :param dict kwargs: The keyword arguments. + :return: The refund transaction created to process the refund request. + :rtype: recordset of `payment.transaction` + """ + refund_tx = super()._send_refund_request(**kwargs) + if self.provider_code != 'saferpay': + return refund_tx + notification_data = {'reference': refund_tx.reference, + 'simulated_state': 'done'} + refund_tx._handle_notification_data('saferpay', notification_data) + + return refund_tx + + def _send_capture_request(self, amount_to_capture=None): + """ Override of `payment` to simulate a capture request. """ + child_capture_tx = super()._send_capture_request(amount_to_capture= + amount_to_capture) + if self.provider_code != 'saferpay': + return child_capture_tx + + tx = child_capture_tx or self + notification_data = { + 'reference': tx.reference, + 'simulated_state': 'done', + 'manual_capture': True, # Distinguish manual captures + # from regular one-step captures. + } + tx._handle_notification_data('saferpay', notification_data) + + return child_capture_tx + + def _send_void_request(self, amount_to_void=None): + """ Override of `payment` to simulate a void request. """ + child_void_tx = super()._send_void_request(amount_to_void= + amount_to_void) + if self.provider_code != 'saferpay': + return child_void_tx + + tx = child_void_tx or self + notification_data = {'reference': tx.reference, + 'simulated_state': 'cancel'} + tx._handle_notification_data('saferpay', notification_data) + + return child_void_tx + + def _get_tx_from_notification_data(self, provider_code, notification_data): + """ Override of payment to find the transaction based on dummy data. + :param str provider_code: The code of the provider that handled the + transaction + :param dict notification_data: The dummy notification data + :return: The transaction if found + :rtype: recordset of `payment.transaction` + :raise: ValidationError if the data match no transaction + """ + tx = super()._get_tx_from_notification_data(provider_code, + notification_data) + if provider_code != 'saferpay' or len(tx) == 1: + return tx + + reference = notification_data.get('reference') + tx = self.search([('reference', '=', reference), ('provider_code', + '=', 'saferpay')]) + if not tx: + raise ValidationError( + "saferpay: " + _("No transaction found matching reference %s.", + reference) + ) + return tx + + def _process_notification_data(self, notification_data): + """ Override of payment to process the transaction based on dummy data. + + Note: self.ensure_one() + + :param dict notification_data: The dummy notification data + :return: None + :raise: ValidationError if inconsistent data were received + """ + super()._process_notification_data(notification_data) + if self.provider_code != 'saferpay': + return + + # Update the provider reference. + self.provider_reference = f'saferpay-{self.reference}' + + # Create the token. + if self.tokenize: + # The reasons why we immediately tokenize the transaction + # regardless of the state rather + # than waiting for the payment method to be validated + # ('authorized' or 'done') like the + # other payment providers do are: + # - To save the simulated state and payment details on the + # token while we have them. + # - To allow customers to create tokens whose transactions + # will always end up in the + # said simulated state. + self._saferpay_tokenize_from_notification_data(notification_data) + + # Update the payment state. + state = notification_data['simulated_state'] + if state == 'pending': + self._set_pending() + elif state == 'done': + if self.capture_manually and not notification_data.get( + 'manual_capture'): + self._set_authorized() + else: + self._set_done() + # Immediately post-process the transaction if it is a refund, + # as the post-processing + # will not be triggered by a customer browsing the transaction + # from the portal. + if self.operation == 'refund': + self.env.ref( + 'payment.cron_post_process_payment_tx')._trigger() + elif state == 'cancel': + self._set_canceled() + else: # Simulate an error state. + self._set_error( + _("You selected the following demo payment status: %s", state)) + + def _saferpay_tokenize_from_notification_data(self, notification_data): + """ Create a new token based on the notification data. + Note: self.ensure_one() + :param dict notification_data: The fake notification data to tokenize + from. + :return: None + """ + self.ensure_one() + + state = notification_data['simulated_state'] + + token = self.env['payment.token'].create({ + 'provider_id': self.provider_id.id, + 'payment_method_id': self.payment_method_id.id, + 'payment_details': notification_data['payment_details'], + 'partner_id': self.partner_id.id, + 'provider_ref': 'fake provider reference', + 'saferpay_simulated_state': state, + }) + self.write({ + 'token_id': token, + 'tokenize': False, + }) + _logger.info( + "Created token with id %s for partner with id %s.", + token.id, self.partner_id.id + ) diff --git a/safer_pay/models/sale_order.py b/safer_pay/models/sale_order.py new file mode 100644 index 000000000..ab225f86d --- /dev/null +++ b/safer_pay/models/sale_order.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin AM (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# along with this program. If not, see . +# +############################################################################### +from odoo import fields, models + + +class SaleOrder(models.Model): + """For getting get_portal_last_transaction method in sale order""" + _inherit = 'sale.order' + + payment = fields.Boolean(string="Payment", help="For payment details") + sale_order = fields.Integer(string="Sale order Number", + help="To get sale order") + + def get_portal_last_transaction(self): + """For updating the transaction""" + super().get_portal_last_transaction() + self.ensure_one() + if self.transaction_ids: + code = self.transaction_ids.provider_id.id + provider = self.env.ref('safer_pay.payment_acquirer_data').id + sale_order = self.env['sale.order'].search( + [('transaction_ids', 'in', self.transaction_ids.ids)]) + if (sale_order.id == sale_order.sale_order and + not sale_order.payment and code == provider): + self.transaction_ids.write({ + 'state': 'done' + }) + return self.transaction_ids._get_last() diff --git a/safer_pay/static/description/assets/icons/check.png b/safer_pay/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/safer_pay/static/description/assets/icons/check.png differ diff --git a/safer_pay/static/description/assets/icons/chevron.png b/safer_pay/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/safer_pay/static/description/assets/icons/chevron.png differ diff --git a/safer_pay/static/description/assets/icons/cogs.png b/safer_pay/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/safer_pay/static/description/assets/icons/cogs.png differ diff --git a/safer_pay/static/description/assets/icons/consultation.png b/safer_pay/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/safer_pay/static/description/assets/icons/consultation.png differ diff --git a/safer_pay/static/description/assets/icons/ecom-black.png b/safer_pay/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/safer_pay/static/description/assets/icons/ecom-black.png differ diff --git a/safer_pay/static/description/assets/icons/education-black.png b/safer_pay/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/safer_pay/static/description/assets/icons/education-black.png differ diff --git a/safer_pay/static/description/assets/icons/hotel-black.png b/safer_pay/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/safer_pay/static/description/assets/icons/hotel-black.png differ diff --git a/safer_pay/static/description/assets/icons/license.png b/safer_pay/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/safer_pay/static/description/assets/icons/license.png differ diff --git a/safer_pay/static/description/assets/icons/lifebuoy.png b/safer_pay/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/safer_pay/static/description/assets/icons/lifebuoy.png differ diff --git a/safer_pay/static/description/assets/icons/manufacturing-black.png b/safer_pay/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/safer_pay/static/description/assets/icons/manufacturing-black.png differ diff --git a/safer_pay/static/description/assets/icons/pos-black.png b/safer_pay/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/safer_pay/static/description/assets/icons/pos-black.png differ diff --git a/safer_pay/static/description/assets/icons/puzzle.png b/safer_pay/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/safer_pay/static/description/assets/icons/puzzle.png differ diff --git a/safer_pay/static/description/assets/icons/restaurant-black.png b/safer_pay/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/safer_pay/static/description/assets/icons/restaurant-black.png differ diff --git a/safer_pay/static/description/assets/icons/service-black.png b/safer_pay/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/safer_pay/static/description/assets/icons/service-black.png differ diff --git a/safer_pay/static/description/assets/icons/trading-black.png b/safer_pay/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/safer_pay/static/description/assets/icons/trading-black.png differ diff --git a/safer_pay/static/description/assets/icons/training.png b/safer_pay/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/safer_pay/static/description/assets/icons/training.png differ diff --git a/safer_pay/static/description/assets/icons/update.png b/safer_pay/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/safer_pay/static/description/assets/icons/update.png differ diff --git a/safer_pay/static/description/assets/icons/user.png b/safer_pay/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/safer_pay/static/description/assets/icons/user.png differ diff --git a/safer_pay/static/description/assets/icons/wrench.png b/safer_pay/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/safer_pay/static/description/assets/icons/wrench.png differ diff --git a/safer_pay/static/description/assets/misc/categories.png b/safer_pay/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/safer_pay/static/description/assets/misc/categories.png differ diff --git a/safer_pay/static/description/assets/misc/check-box.png b/safer_pay/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/safer_pay/static/description/assets/misc/check-box.png differ diff --git a/safer_pay/static/description/assets/misc/compass.png b/safer_pay/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/safer_pay/static/description/assets/misc/compass.png differ diff --git a/safer_pay/static/description/assets/misc/corporate.png b/safer_pay/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/safer_pay/static/description/assets/misc/corporate.png differ diff --git a/safer_pay/static/description/assets/misc/customer-support.png b/safer_pay/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/safer_pay/static/description/assets/misc/customer-support.png differ diff --git a/safer_pay/static/description/assets/misc/cybrosys-logo.png b/safer_pay/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/safer_pay/static/description/assets/misc/cybrosys-logo.png differ diff --git a/safer_pay/static/description/assets/misc/features.png b/safer_pay/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/safer_pay/static/description/assets/misc/features.png differ diff --git a/safer_pay/static/description/assets/misc/logo.png b/safer_pay/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/safer_pay/static/description/assets/misc/logo.png differ diff --git a/safer_pay/static/description/assets/misc/pictures.png b/safer_pay/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/safer_pay/static/description/assets/misc/pictures.png differ diff --git a/safer_pay/static/description/assets/misc/pie-chart.png b/safer_pay/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/safer_pay/static/description/assets/misc/pie-chart.png differ diff --git a/safer_pay/static/description/assets/misc/right-arrow.png b/safer_pay/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/safer_pay/static/description/assets/misc/right-arrow.png differ diff --git a/safer_pay/static/description/assets/misc/star.png b/safer_pay/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/safer_pay/static/description/assets/misc/star.png differ diff --git a/safer_pay/static/description/assets/misc/support.png b/safer_pay/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/safer_pay/static/description/assets/misc/support.png differ diff --git a/safer_pay/static/description/assets/misc/whatsapp.png b/safer_pay/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/safer_pay/static/description/assets/misc/whatsapp.png differ diff --git a/safer_pay/static/description/assets/modules/barcode.png b/safer_pay/static/description/assets/modules/barcode.png new file mode 100644 index 000000000..618e3e6c4 Binary files /dev/null and b/safer_pay/static/description/assets/modules/barcode.png differ diff --git a/safer_pay/static/description/assets/modules/product_brand.png b/safer_pay/static/description/assets/modules/product_brand.png new file mode 100644 index 000000000..1d2238b80 Binary files /dev/null and b/safer_pay/static/description/assets/modules/product_brand.png differ diff --git a/safer_pay/static/description/assets/modules/website_cart.png b/safer_pay/static/description/assets/modules/website_cart.png new file mode 100644 index 000000000..163485cfd Binary files /dev/null and b/safer_pay/static/description/assets/modules/website_cart.png differ diff --git a/safer_pay/static/description/assets/modules/website_favourites_grid.jpg b/safer_pay/static/description/assets/modules/website_favourites_grid.jpg new file mode 100644 index 000000000..483dd03a4 Binary files /dev/null and b/safer_pay/static/description/assets/modules/website_favourites_grid.jpg differ diff --git a/safer_pay/static/description/assets/modules/website_repeat_sale.png b/safer_pay/static/description/assets/modules/website_repeat_sale.png new file mode 100644 index 000000000..ed175b076 Binary files /dev/null and b/safer_pay/static/description/assets/modules/website_repeat_sale.png differ diff --git a/safer_pay/static/description/assets/modules/website_upload_files.jpg b/safer_pay/static/description/assets/modules/website_upload_files.jpg new file mode 100644 index 000000000..5e0523196 Binary files /dev/null and b/safer_pay/static/description/assets/modules/website_upload_files.jpg differ diff --git a/safer_pay/static/description/assets/screenshots/1.png b/safer_pay/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..ada3662ca Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/1.png differ diff --git a/safer_pay/static/description/assets/screenshots/2.png b/safer_pay/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..38c896ee2 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/2.png differ diff --git a/safer_pay/static/description/assets/screenshots/3.png b/safer_pay/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..2ad16b0c1 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/3.png differ diff --git a/safer_pay/static/description/assets/screenshots/4.png b/safer_pay/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..765f2eb1b Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/4.png differ diff --git a/safer_pay/static/description/assets/screenshots/5.png b/safer_pay/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..a4a588ed0 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/5.png differ diff --git a/safer_pay/static/description/assets/screenshots/6.png b/safer_pay/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..f69d26be6 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/6.png differ diff --git a/safer_pay/static/description/assets/screenshots/7.png b/safer_pay/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..cddc281dc Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/7.png differ diff --git a/safer_pay/static/description/assets/screenshots/8.png b/safer_pay/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..69961d02a Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/8.png differ diff --git a/safer_pay/static/description/assets/screenshots/9.png b/safer_pay/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..6749a4416 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/9.png differ diff --git a/safer_pay/static/description/assets/screenshots/hero.gif b/safer_pay/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..e51fffb69 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/hero.gif differ diff --git a/safer_pay/static/description/banner.jpg b/safer_pay/static/description/banner.jpg new file mode 100644 index 000000000..7c3a0d8dd Binary files /dev/null and b/safer_pay/static/description/banner.jpg differ diff --git a/safer_pay/static/description/icon.png b/safer_pay/static/description/icon.png new file mode 100644 index 000000000..a65d30de3 Binary files /dev/null and b/safer_pay/static/description/icon.png differ diff --git a/safer_pay/static/description/index.html b/safer_pay/static/description/index.html new file mode 100644 index 000000000..d26d6f74c --- /dev/null +++ b/safer_pay/static/description/index.html @@ -0,0 +1,828 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ Safer-pay Payment Gateway Integration

+

+ Safer-pay is a payment provider that integrate with odoo +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Module helps to integrate Safer-pay Payment + Gateway with your eCommerce Website.

+
+
+
+
+
+
+ +
+
+

+ Payments via Safer-pay Payment Gateway.

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ After installation of the module a new + payment provider record(SaferPay) is + created.

+

+

+
+
+
+
+
+
+ +
+
+

+ Using the required credential,configure the + SaferPay payment provider.

+

+

+
+
+
+
+
+
+ +
+
+

+ Enable Allow Express Checkout and Allow + Saving Payment Methods to redirect to + checkout pages +

+

+

+
+
+
+
+
+
+ +
+
+

+ Go to Configuration > Payment Methods

+

+ It shows the Available Payment Methods +

+

+
+
+
+
+
+
+ +
+
+

+ Payment Method of Payment Provider + SaferPay

+

+ From the view,we can see the Provider as + SaferPay in test mode and give the icon for + image in Payment method inorder to avoid + errors +

+

+
+
+
+
+
+
+ +
+
+

+ Go to Site > Homepage > Shop >checkout

+

+ After adding Products to cart, in the cart + page see the checkout button + on review order and redirected to payment + page +

+

+
+
+
+
+
+
+ +
+
+

+ Payment on Confirming order

+

+ After clicking Checkout button redirected to + Payment page. In the Payment page, Choose + delivery + method,and Choose Payment Method SaferPay + and click Pay now button +

+

+
+
+
+
+
+
+ +
+
+

+ When we are clicking the pay now button it + redirect to Saferpay website.

+

+

+

+
+
+
+
+
+
+ +
+
+

+ After the transaction it redirects to + confirmation page of odoo from SaferPay + website.

+

+

+

+
+
+
+
+
+
+
    +
  • + Available in + Odoo 17.0 Community and Enterprise +
  • +
  • + Payments via + Safer-pay Payment Gateway. +
  • +
  • + Safer-pay + Payment Gateway Integration +
      +
    • +

      + Safer-pay is the modern and secure + payment service provider.This + Module helps to integrate Safer-pay + Payment + Gateway with your eCommerce + Website.Hence, Allow us to make + payments via + Safer-pay Payment Gateway +

      +
    • +
    +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:27th November 2023 +
+

+ Initial Commit for Safer-pay Payment Gateway + Integration

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/safer_pay/static/src/js/payment_form.js b/safer_pay/static/src/js/payment_form.js new file mode 100644 index 000000000..d19e44ca9 --- /dev/null +++ b/safer_pay/static/src/js/payment_form.js @@ -0,0 +1,52 @@ +/** @odoo-module **/ + +import paymentForm from '@payment/js/payment_form'; +import paymentSaferPayMixin from '@safer_pay/js/payment_saferpay_mixin'; +paymentForm.include({ + + // #=== DOM MANIPULATION ===# + + /** + * Prepare the inline form of safer_pay for direct payment. + * + * @override method from @payment/js/payment_form + * @private + * @param {number} providerId - The id of the selected payment option's provider. + * @param {string} providerCode - The code of the selected payment option's provider. + * @param {number} paymentOptionId - The id of the selected payment option + * @param {string} paymentMethodCode - The code of the selected payment method, if any. + * @param {string} flow - The online payment flow of the selected payment option. + * @return {void} + */ + async _prepareInlineForm(providerId, providerCode, paymentOptionId, paymentMethodCode, flow) { + if (providerCode !== 'saferpay') { + this._super(...arguments); + return; + } else if (flow === 'token') { + return; + } + this._setPaymentFlow('direct'); + }, + + // #=== PAYMENT FLOW ===# + + /** + * Simulate a feedback from a payment provider and redirect the customer to the status page. + * + * @override method from payment.payment_form + * @private + * @param {string} providerCode - The code of the selected payment option's provider. + * @param {number} paymentOptionId - The id of the selected payment option. + * @param {string} paymentMethodCode - The code of the selected payment method, if any. + * @param {object} processingValues - The processing values of the transaction. + * @return {void} + */ + async _processDirectFlow(providerCode, paymentOptionId, paymentMethodCode, processingValues) { + if (providerCode !== 'saferpay') { + this._super(...arguments); + return; + } + paymentSaferPayMixin.processSaferPayPayment(processingValues); + }, + +}); diff --git a/safer_pay/static/src/js/payment_saferpay_mixin.js b/safer_pay/static/src/js/payment_saferpay_mixin.js new file mode 100644 index 000000000..6ca8e01f9 --- /dev/null +++ b/safer_pay/static/src/js/payment_saferpay_mixin.js @@ -0,0 +1,33 @@ +/** @odoo-module **/ +import { Dialog } from "@web/core/dialog/dialog"; +import { _t } from "@web/core/l10n/translation"; +import { jsonrpc, RPCError } from "@web/core/network/rpc_service"; +export default { + /** + * Simulate a feedback from a payment provider and redirect the customer to the provider official page. + * + * @private + * @param {object} processingValues - The processing values of the transaction. + * @return {void} + */ + async processSaferPayPayment(processingValues) { + const customerInput = document.getElementById('customer_input').value; + const simulatedPaymentState = document.getElementById('simulated_payment_state').value; + console.log('f1',simulatedPaymentState) + jsonrpc('/saferpay/payment', { + 'reference': processingValues.reference, + 'payment_details': customerInput, + 'simulated_state': simulatedPaymentState, + }).then((result) => { + window.location = result; + }).catch(error => { + if (error instanceof RPCError) { + this._displayErrorDialog(_t("Payment processing failed"), error.data.message); + this._enableButton?.(); // This method doesn't exists in Express Checkout form. + } else { + return Promise.reject(error); + } + }) + +} +} diff --git a/safer_pay/views/payment_provider_views.xml b/safer_pay/views/payment_provider_views.xml new file mode 100644 index 000000000..48701a20f --- /dev/null +++ b/safer_pay/views/payment_provider_views.xml @@ -0,0 +1,25 @@ + + + + + payment.provider.view.form.inherit.safer.pay + payment.provider + + + + + + + + + + + + + diff --git a/safer_pay/views/payment_safer_pay_templates.xml b/safer_pay/views/payment_safer_pay_templates.xml new file mode 100644 index 000000000..b81d2bebe --- /dev/null +++ b/safer_pay/views/payment_safer_pay_templates.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + diff --git a/safer_pay/views/payment_token_views.xml b/safer_pay/views/payment_token_views.xml new file mode 100644 index 000000000..d8954b3af --- /dev/null +++ b/safer_pay/views/payment_token_views.xml @@ -0,0 +1,17 @@ + + + + SafePay Token Form + payment.token + + + + + + + + + + diff --git a/safer_pay/views/payment_transaction_views.xml b/safer_pay/views/payment_transaction_views.xml new file mode 100644 index 000000000..848b76b6d --- /dev/null +++ b/safer_pay/views/payment_transaction_views.xml @@ -0,0 +1,31 @@ + + + + SaferPay Transaction Form + payment.transaction + + +
+ +
+
+
+
diff --git a/safer_pay/views/sale_order_views.xml b/safer_pay/views/sale_order_views.xml new file mode 100644 index 000000000..79c77a98d --- /dev/null +++ b/safer_pay/views/sale_order_views.xml @@ -0,0 +1,14 @@ + + + + sale.order.view.form.inherit.safer.pay + sale.order + + + + + + + + +