diff --git a/safer_pay/README.rst b/safer_pay/README.rst new file mode 100644 index 000000000..c4930595c --- /dev/null +++ b/safer_pay/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-green.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 +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +Developer: (V15) Fathima Mazlin AM, 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..e6ed6673b --- /dev/null +++ b/safer_pay/__init__.py @@ -0,0 +1,30 @@ +# -*- 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 . import controllers +from . import models +from odoo.addons.payment import reset_payment_acquirer + + +def uninstall_hook(cr, registry): + """ Record will be deleted while uninstalling the module""" + reset_payment_acquirer(cr, registry, 'saferpay') diff --git a/safer_pay/__manifest__.py b/safer_pay/__manifest__.py new file mode 100644 index 000000000..6e540ab50 --- /dev/null +++ b/safer_pay/__manifest__.py @@ -0,0 +1,51 @@ +# -*- 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 . +# +############################################################################### +{ + 'name': "Safer-pay Payment Gateway Integration", + 'version': '15.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': ['payment', 'website_sale'], + 'data': [ + 'data/payment_acquirer_data.xml', + 'views/payment_acquirer_views.xml', + 'views/sale_order_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'safer_pay/static/src/js/payment_form.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, + 'uninstall_hook': 'uninstall_hook', +} diff --git a/safer_pay/controllers/__init__.py b/safer_pay/controllers/__init__.py new file mode 100644 index 000000000..5438f6568 --- /dev/null +++ b/safer_pay/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- 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 . 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..b785dd16c --- /dev/null +++ b/safer_pay/controllers/safer_pay.py @@ -0,0 +1,99 @@ +# -*- 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 . +# +############################################################################### +import json +import requests +from odoo import http, _ +from odoo.exceptions import UserError +from odoo.http import request + + +class SaferPayPayment(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') + amount = int((reference.get("amount") * 0.011) * 100) + sequence = reference.get("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 QVBJXzI2NzkxNV8wNzM5NzUxOTpKc29uQXBpUHdk' + 'MV9iV3Blayw1SEIvJF0=', + '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({ + 'payment': False + }) + if text.get('RedirectUrl'): + sale_order.write({ + 'payment': False, + 'order_number': 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_acquirer_data.xml b/safer_pay/data/payment_acquirer_data.xml new file mode 100644 index 000000000..b3273dd8c --- /dev/null +++ b/safer_pay/data/payment_acquirer_data.xml @@ -0,0 +1,21 @@ + + + + + + SaferPay + saferpay + False + True + false + + + + + Saferpay + saferpay + inbound + + + diff --git a/safer_pay/doc/RELEASE_NOTES.md b/safer_pay/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..eb389d5be --- /dev/null +++ b/safer_pay/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 22.09.2023 +#### Version 15.0.1.0.0 +#### ADD + +- Initial commit for Safer-pay Payment Gateway Integration diff --git a/safer_pay/models/__init__.py b/safer_pay/models/__init__.py new file mode 100644 index 000000000..0514fe8d5 --- /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: 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 . import account_payment_method +from . import payment_acquirer +from . import sale_order diff --git a/safer_pay/models/account_payment_method.py b/safer_pay/models/account_payment_method.py new file mode 100644 index 000000000..4feca4194 --- /dev/null +++ b/safer_pay/models/account_payment_method.py @@ -0,0 +1,37 @@ +# -*- 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 api, models + + +class AccountPaymentMethod(models.Model): + """ For get details of payment method """ + _inherit = 'account.payment.method' + + @api.model + def _get_payment_method_information(self): + """ Record for safer pay in payment acquirer is + created while installing the module. this function is + used for to get default payment method details """ + res = super()._get_payment_method_information() + res['saferpay'] = {'mode': 'unique', 'domain': [('type', '=', 'bank')]} + return res diff --git a/safer_pay/models/payment_acquirer.py b/safer_pay/models/payment_acquirer.py new file mode 100644 index 000000000..fd60736cf --- /dev/null +++ b/safer_pay/models/payment_acquirer.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 models, fields + + +class PaymentProvider(models.Model): + """ For create a record for safer pay in payment provider """ + _inherit = 'payment.acquirer' + + provider = fields.Selection( + selection_add=[('saferpay', "saferpay")], + ondelete={'saferpay': 'set default'}) + 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") + + def _get_default_payment_method_id(self): + """ Record for safer pay in payment acquirer is + created while installing the module. this function is + used for to get default payment method id """ + self.ensure_one() + if self.provider != 'saferpay': + return super()._get_default_payment_method_id() + return self.env.ref('safer_pay.payment_method_saferpay').id diff --git a/safer_pay/models/sale_order.py b/safer_pay/models/sale_order.py new file mode 100644 index 000000000..cad858b3f --- /dev/null +++ b/safer_pay/models/sale_order.py @@ -0,0 +1,49 @@ +# -*- 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") + order_number = fields.Integer(string="Last Transaction Order", + help="To check the current order and " + "last transaction is equal") + + 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.acquirer_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.order_number + 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/delivery_date_ecommerce.png b/safer_pay/static/description/assets/modules/delivery_date_ecommerce.png new file mode 100644 index 000000000..5856d1b7e Binary files /dev/null and b/safer_pay/static/description/assets/modules/delivery_date_ecommerce.png differ diff --git a/safer_pay/static/description/assets/modules/openai_website_product_media.png b/safer_pay/static/description/assets/modules/openai_website_product_media.png new file mode 100644 index 000000000..5c172b9ab Binary files /dev/null and b/safer_pay/static/description/assets/modules/openai_website_product_media.png differ diff --git a/safer_pay/static/description/assets/modules/product_brand_ecommerce.png b/safer_pay/static/description/assets/modules/product_brand_ecommerce.png new file mode 100644 index 000000000..ae3e11bff Binary files /dev/null and b/safer_pay/static/description/assets/modules/product_brand_ecommerce.png differ diff --git a/safer_pay/static/description/assets/modules/website_custom_contact_us.png b/safer_pay/static/description/assets/modules/website_custom_contact_us.png new file mode 100644 index 000000000..05da61813 Binary files /dev/null and b/safer_pay/static/description/assets/modules/website_custom_contact_us.png differ diff --git a/safer_pay/static/description/assets/modules/website_multi_variant.png b/safer_pay/static/description/assets/modules/website_multi_variant.png new file mode 100644 index 000000000..b64b96d92 Binary files /dev/null and b/safer_pay/static/description/assets/modules/website_multi_variant.png 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..2b5926612 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/screenshots/credentials.png b/safer_pay/static/description/assets/screenshots/credentials.png new file mode 100644 index 000000000..6a1892897 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/credentials.png differ diff --git a/safer_pay/static/description/assets/screenshots/redirect.png b/safer_pay/static/description/assets/screenshots/redirect.png new file mode 100644 index 000000000..325db3228 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/redirect.png differ diff --git a/safer_pay/static/description/assets/screenshots/saferpay.gif b/safer_pay/static/description/assets/screenshots/saferpay.gif new file mode 100644 index 000000000..07cba0108 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/saferpay.gif differ diff --git a/safer_pay/static/description/assets/screenshots/saferpay_gateway.png b/safer_pay/static/description/assets/screenshots/saferpay_gateway.png new file mode 100644 index 000000000..3eb53d568 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/saferpay_gateway.png differ diff --git a/safer_pay/static/description/assets/screenshots/select_saferpay.png b/safer_pay/static/description/assets/screenshots/select_saferpay.png new file mode 100644 index 000000000..ca8507bf1 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/select_saferpay.png differ diff --git a/safer_pay/static/description/assets/screenshots/success.png b/safer_pay/static/description/assets/screenshots/success.png new file mode 100644 index 000000000..f0c8a0232 Binary files /dev/null and b/safer_pay/static/description/assets/screenshots/success.png differ diff --git a/safer_pay/static/description/banner.jpg b/safer_pay/static/description/banner.jpg new file mode 100644 index 000000000..9d57632be 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..2a43408a2 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..b1480dc47 --- /dev/null +++ b/safer_pay/static/description/index.html @@ -0,0 +1,615 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Safer-pay Payment Gateway Integration

+

Safer-pay Payment Gateway in + eCommerce

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ 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 +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Community and Enterprise Support. +
+
+ + Payments via Saferpay Payment Gateway. +
+
+ + +
+
+ +
+

+ Configuration +

+
+
+
+

You can register the safer pay using this link : + https://test.saferpay.com/BO/Welcome

+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

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

+ +
+ +
+

Using the required credential,configure the SaferPay payment provider.

+ +
+ +
+

Select the payment provider as SaferPay

+ +
+ +
+

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

+ +
+ +
+

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

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

+ Related + Products +

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

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ 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 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+
+ \ No newline at end of file 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..3a020d40c --- /dev/null +++ b/safer_pay/static/src/js/payment_form.js @@ -0,0 +1,33 @@ +odoo.define('safer_pay.payment_form', require => { + 'use strict'; + const checkoutForm = require('payment.checkout_form'); + const manageForm = require('payment.manage_form'); + + const paymentProvider = { + /** + For redirecting the page to corresponding url after processing the + credentials + **/ + _processRedirectPayment: function (code, acquirerId, processingValues) { + if (code !== 'saferpay') { + return this._super(...arguments); + } + var response = this._rpc({ + route: '/saferpay/payment', + params: { + 'reference': processingValues, + }, + }).then((response) => { + if(response == false){ + this._displayError(("Please provide proper credential.")); + return + } + else{ + window.location = response + } + }); + }, + }; + checkoutForm.include(paymentProvider); + manageForm.include(paymentProvider); +}); diff --git a/safer_pay/views/payment_acquirer_views.xml b/safer_pay/views/payment_acquirer_views.xml new file mode 100644 index 000000000..c97b44131 --- /dev/null +++ b/safer_pay/views/payment_acquirer_views.xml @@ -0,0 +1,24 @@ + + + + + payment.acquirer.view.form.inherit.safer.pay + payment.acquirer + + + + + + + + + + + + + diff --git a/safer_pay/views/sale_order_views.xml b/safer_pay/views/sale_order_views.xml new file mode 100644 index 000000000..7d2bde057 --- /dev/null +++ b/safer_pay/views/sale_order_views.xml @@ -0,0 +1,15 @@ + + + + + sale.order.view.form.inherit.safer.pay + sale.order + + + + + + + + +