Browse Source

Jan 10 [ADD] : Initial Commit 'myfatoorah_payment_gateway'

pull/254/merge
AjmalCybro 1 year ago
parent
commit
3f2d583ddf
  1. 56
      myfatoorah_payment_gateway/README.rst
  2. 44
      myfatoorah_payment_gateway/__init__.py
  3. 47
      myfatoorah_payment_gateway/__manifest__.py
  4. 22
      myfatoorah_payment_gateway/controllers/__init__.py
  5. 74
      myfatoorah_payment_gateway/controllers/myfatoorah_payment_gateway.py
  6. 16
      myfatoorah_payment_gateway/data/payment_provider_data.xml
  7. 6
      myfatoorah_payment_gateway/doc/RELEASE_NOTES.md
  8. 24
      myfatoorah_payment_gateway/models/__init__.py
  9. 34
      myfatoorah_payment_gateway/models/account_payment_method.py
  10. 58
      myfatoorah_payment_gateway/models/payment_acquirer.py
  11. 151
      myfatoorah_payment_gateway/models/payment_transaction.py
  12. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/check.png
  13. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/chevron.png
  14. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/cogs.png
  15. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/consultation.png
  16. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/ecom-black.png
  17. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/education-black.png
  18. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/hotel-black.png
  19. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/license.png
  20. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/lifebuoy.png
  21. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/logo.png
  22. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/manufacturing-black.png
  23. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/pos-black.png
  24. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/puzzle.png
  25. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/restaurant-black.png
  26. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/service-black.png
  27. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/trading-black.png
  28. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/training.png
  29. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/update.png
  30. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/user.png
  31. BIN
      myfatoorah_payment_gateway/static/description/assets/icons/wrench.png
  32. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/categories.png
  33. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/check-box.png
  34. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/compass.png
  35. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/corporate.png
  36. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/customer-support.png
  37. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/cybrosys-logo.png
  38. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/features.png
  39. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/logo.png
  40. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/pictures.png
  41. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/pie-chart.png
  42. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/right-arrow.png
  43. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/star.png
  44. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/support.png
  45. BIN
      myfatoorah_payment_gateway/static/description/assets/misc/whatsapp.png
  46. BIN
      myfatoorah_payment_gateway/static/description/assets/modules/1.png
  47. BIN
      myfatoorah_payment_gateway/static/description/assets/modules/2.png
  48. BIN
      myfatoorah_payment_gateway/static/description/assets/modules/3.png
  49. BIN
      myfatoorah_payment_gateway/static/description/assets/modules/4.png
  50. BIN
      myfatoorah_payment_gateway/static/description/assets/modules/5.png
  51. BIN
      myfatoorah_payment_gateway/static/description/assets/modules/6.png
  52. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/hero.gif
  53. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_1.png
  54. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_2.png
  55. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_3.png
  56. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_4.png
  57. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_5.png
  58. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_6.png
  59. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_7.png
  60. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_8.png
  61. BIN
      myfatoorah_payment_gateway/static/description/assets/screenshots/image_9.png
  62. BIN
      myfatoorah_payment_gateway/static/description/banner.png
  63. BIN
      myfatoorah_payment_gateway/static/description/icon.png
  64. 619
      myfatoorah_payment_gateway/static/description/index.html
  65. 107
      myfatoorah_payment_gateway/views/myfatoorah_payment_templates.xml
  66. 20
      myfatoorah_payment_gateway/views/payment_acquirer_views.xml
  67. 23
      myfatoorah_payment_gateway/views/payment_myfatoorah_templates.xml

56
myfatoorah_payment_gateway/README.rst

@ -0,0 +1,56 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
MyFatoorah Payment Gateway
===========================
* This module helps users to pay online through MyFatoorah payment gateway from Odoo Website.
Installation
============
- www.odoo.com/documentation/15.0/setup/install.html
- Install our custom addon
Features
========
* Easily pay for the website order in odoo through MyFatoorah payment gateway.
* Myfatoorah is a fast and reliable payment gateway and can make payment by entering card details online.
* Install the app , provide the token and make the payment.
Company
=======
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
=======
GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3)
(https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Credits
=======
* Developer: (V15) Subina P, 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 https://www.cybrosys.com.
Further information
===================
HTML Description: `<static/description/index.html>`__

44
myfatoorah_payment_gateway/__init__.py

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Subina P(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO GENERAL
# PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC
# LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import api, SUPERUSER_ID
from odoo.addons.payment import reset_payment_acquirer
from . import controllers
from . import models
def post_init_hook(cr, registry):
"""Change the 'provider' field to 'myfatoorah' on installation of the
provider"""
env = api.Environment(cr, SUPERUSER_ID, {})
acquirer_model = env['payment.acquirer']
acquirer = acquirer_model.search([('provider', '=', 'myfatoorah')], limit=1)
if not acquirer:
acquirer_model.create({
'name': 'MyFatoorah',
'provider': 'myfatoorah',
})
def uninstall_hook(cr, registry):
"""Unlinks the payment provider from model on uninstallation of the
module"""
reset_payment_acquirer(cr, registry, 'myfatoorah')

47
myfatoorah_payment_gateway/__manifest__.py

@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Subina P(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO GENERAL
# PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC
# LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'MyFatoorah Payment Gateway',
'version': '15.0.1.0.0',
'category': 'Accounting',
'Summary': """Payment Acquirer: MyFatoorah Payment Implementation""",
'description': """Pay for the website orders in Odoo through MyFatoorah
Payment Acquirer.""",
'author': "Cybrosys Techno Solutions",
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['payment', 'website_sale'],
'data': [
'views/payment_myfatoorah_templates.xml',
'views/payment_acquirer_views.xml',
'views/myfatoorah_payment_templates.xml',
'data/payment_provider_data.xml'
],
'post_init_hook': 'post_init_hook',
'uninstall_hook': 'uninstall_hook',
'images': ['static/description/banner.png'],
'license': 'AGPL-3',
'installable': True,
'application': False,
'auto_install': False,
}

22
myfatoorah_payment_gateway/controllers/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Subina P(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO GENERAL
# PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC
# LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import myfatoorah_payment_gateway

74
myfatoorah_payment_gateway/controllers/myfatoorah_payment_gateway.py

@ -0,0 +1,74 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Subina P(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO GENERAL
# PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC
# LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import ast
import logging
import pprint
from odoo import http
from odoo.http import request
_logger = logging.getLogger(__name__)
class PaymentMyFatoorahController(http.Controller):
"""MyFatoorah payment acquirer controller"""
_return_url = '/payment/myfatoorah/_return_url'
@http.route('/payment/myfatoorah/response', type='http',
auth='public', website=True, methods=['POST'], csrf=False,
save_session=False)
def myfatoorah_payment_response(self, **data):
"""This route is called to send response for the payment requested."""
payment_data = ast.literal_eval(data["data"])
vals = {
'customer': payment_data["CustomerName"],
'currency': payment_data["DisplayCurrencyIso"],
'mobile': payment_data["CustomerMobile"],
'invoice_amount': payment_data["InvoiceValue"],
'address': payment_data["CustomerAddress"]["Address"],
'payment_url': payment_data["PaymentURL"],
}
return request.render(
"myfatoorah_payment_gateway.myfatoorah_payment_gateway_form", vals)
@http.route(_return_url, type='http', auth='public',
methods=['GET'])
def myfatoorah__checkout(self, **data):
"""This route is called to return the url to redirect to the checkout
page of payment."""
_logger.info("Received MyFatoorah return data:\n%s",
pprint.pformat(data))
tx_sudo = request.env[
'payment.transaction'].sudo()._get_tx_from_feedback_data(
'myfatoorah', data)
tx_sudo._handle_feedback_data('myfatoorah', data)
return request.redirect('/payment/status')
@http.route('/payment/myfatoorah/failed', type='http', auth='user',
website=True, )
def payment_failed(self):
"""This route is called to redirect to the payment failed page,
if the payment is failed."""
return request.render(
"myfatoorah_payment_gateway.myfatoorah_payment_gateway_failed_form")

16
myfatoorah_payment_gateway/data/payment_provider_data.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- New Payment acquirer is added in payment.acquirer model-->
<record id="payment_acquirer_fatoorah" model="payment.acquirer">
<field name="name">MyFatoorah</field>
<field name="provider">myfatoorah</field>
<field name="image_128" type="base64" file="myfatoorah_payment_gateway/static/description/icon.png"/>
<field name="company_id" ref="base.main_company"/>
<field name="redirect_form_view_id" ref="redirect_form"/>
</record>
<record id="payment_method_fatoorah" model="account.payment.method">
<field name="name">MyFatoorah</field>
<field name="code">myfatoorah</field>
<field name="payment_type">inbound</field>
</record>
</odoo>

6
myfatoorah_payment_gateway/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <myfatoorah_payment_gateway>
#### 08.12.2023
#### Version 15.0.1.0.0
#### ADD
- Initial commit for MyFatoorah Payment Gateway

24
myfatoorah_payment_gateway/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Subina P(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO GENERAL
# PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC
# LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import payment_acquirer
from . import payment_transaction
from . import account_payment_method

34
myfatoorah_payment_gateway/models/account_payment_method.py

@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Subina P(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO GENERAL
# PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC
# LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import api, models
class AccountPaymentMethod(models.Model):
_inherit = 'account.payment.method'
@api.model
def _get_payment_method_information(self):
"""Fetch the payment method details"""
res = super()._get_payment_method_information()
res['myfatoorah'] = {'mode': 'unique',
'domain': [('type', '=', 'bank')]}
return res

58
myfatoorah_payment_gateway/models/payment_acquirer.py

@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Subina P(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO GENERAL
# PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC
# LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import fields, models
from odoo.exceptions import ValidationError
class PaymentAcquirer(models.Model):
"""New fields are added in payment_acquirer model and compute payment
information."""
_inherit = 'payment.acquirer'
provider = fields.Selection(
string="Provider",
selection_add=[('myfatoorah', "MyFatoorah")],
ondelete={'myfatoorah': 'set default'},
help="Selection value myfatoorah is added to specify the payment "
"provider")
myfatoorah_token = fields.Char(string='Token',
help="Token of Myfatoorah payment gateway")
def _myfatoorah_get_api_url(self):
""" Return the API URL according to the provider state.
Note: self.ensure_one()
:return: The API URL
:rtype: str
"""
self.ensure_one()
if self.state == 'enabled':
raise ValidationError(
"API URL cannot be retrieved when state is 'enabled'.")
return 'https://apitest.myfatoorah.com/'
def _get_default_payment_method_id(self):
""" To get default payment method"""
self.ensure_one()
if self.provider != 'myfatoorah':
return super()._get_default_payment_method_id()
return (self.env.ref
('myfatoorah_payment_gateway.payment_method_fatoorah').id)

151
myfatoorah_payment_gateway/models/payment_transaction.py

@ -0,0 +1,151 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Subina P(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO GENERAL
# PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC
# LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import json
import logging
import requests
from odoo import _, models
from odoo.exceptions import ValidationError
_logger = logging.getLogger(__name__)
class PaymentTransaction(models.Model):
"""Model is inherited to define functon to execute different payment
operations for MyFatoorah payment acquirer."""
_inherit = 'payment.transaction'
def _get_specific_rendering_values(self, processing_values):
"""Get payment rendering values and execute payment operation"""
res = super()._get_specific_rendering_values(processing_values)
if self.provider != 'myfatoorah':
return res
return self.execute_payment()
def execute_payment(self):
"""Fetching data and Executing Payment"""
base_api_url = self.env['payment.acquirer'].search(
[('provider', '=', 'myfatoorah')])._myfatoorah_get_api_url()
api_url = f"{base_api_url}v2/ExecutePayment"
api_key = (self.env['payment.acquirer'].
search([('provider', '=', 'myfatoorah')]).myfatoorah_token)
odoo_base_url = self.env['ir.config_parameter'].get_param(
'web.base.url')
payment_transaction = self
sale_order = payment_transaction.sale_order_ids
order_line = sale_order.order_line
invoice_items = [
{
'ItemName': rec.product_id.name,
'Quantity': int(rec.product_uom_qty),
'UnitPrice': rec.price_unit,
}
for rec in order_line
]
if len(self.partner_phone.replace('-', "").rsplit(' ', 1)[1]) > 11:
raise ValidationError(_("Phone number must not be greater than "
"11 characters"))
payment_details = {
"PaymentMethodId": 6,
"CustomerName": self.partner_name,
"DisplayCurrencyIso": self.currency_id.name,
"CustomerMobile":
self.partner_phone.replace('-', "").rsplit(' ', 1)[1],
"CustomerEmail": self.partner_email,
"InvoiceValue": (self.amount - sale_order.amount_tax),
"CallBackUrl": f"{odoo_base_url}/payment/myfatoorah/_return_url",
"ErrorUrl": f"{odoo_base_url}/payment/myfatoorah/_return_url",
"Language": "en",
"CustomerReference": self.reference,
"CustomerAddress": {
"Address": f'{self.partner_address}, {self.partner_city}, '
f'{self.partner_zip}, {self.partner_state_id.name}, '
f'{self.partner_country_id.name}',
},
"InvoiceItems":
invoice_items
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': f'Bearer {api_key}',
}
payload = json.dumps(payment_details)
response = requests.request("POST", api_url, headers=headers,
data=payload)
response_data = response.json()
payment_url = response_data.get('Data')['PaymentURL']
payment_details['PaymentURL'] = payment_url
return {
'api_url': f"{odoo_base_url}/payment/myfatoorah/response",
'data': payment_details,
}
def _get_tx_from_feedback_data(self, provider, notification_data):
"""Getting payment status from myfatoorah"""
api_key = self.env['payment.acquirer'].search(
[('provider', '=', 'myfatoorah')]).myfatoorah_token
base_api_url = self.env['payment.acquirer'].search(
[('provider', '=', 'myfatoorah')])._myfatoorah_get_api_url()
url = f"{base_api_url}v2/GetPaymentStatus"
paymentid = notification_data.get('paymentId')
payload = json.dumps({
"Key": f"{paymentid}",
"KeyType": "paymentId"
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': f'Bearer {api_key}',
}
response = requests.request("POST", url, headers=headers,
data=payload)
response_data = response.json()
received_tx = super()._get_tx_from_feedback_data('myfatoorah',
notification_data)
if provider != 'myfatoorah' or len(received_tx) == 1:
return received_tx
reference = response_data["Data"]["CustomerReference"]
received_tx = self.search(
[
('reference', '=', reference),
('provider', '=', 'myfatoorah')])
if not received_tx:
raise ValidationError(
"myfatoorah: " + _(
"No transaction found matching reference %s.",
reference)
)
return received_tx
def _handle_feedback_data(self, provider, notification_data):
"""Handle notification data and execute callback"""
received_tx = self._get_tx_from_feedback_data(provider,
notification_data)
received_tx._process_feedback_data(notification_data)
received_tx._execute_callback()
return received_tx
def _process_feedback_data(self, notification_data):
"""Process the notification data."""
super()._process_feedback_data(notification_data)
if self.provider == 'myfatoorah':
self._set_done()

BIN
myfatoorah_payment_gateway/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
myfatoorah_payment_gateway/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
myfatoorah_payment_gateway/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
myfatoorah_payment_gateway/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/modules/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
myfatoorah_payment_gateway/static/description/assets/screenshots/image_9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

BIN
myfatoorah_payment_gateway/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
myfatoorah_payment_gateway/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

619
myfatoorah_payment_gateway/static/description/index.html

@ -0,0 +1,619 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between"
style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
<div style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div
style="background-color: #3285a8 !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div>
</div>
</div>
</div>
<div class="container" style="padding: 0rem 1.5rem 4rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
MyFatoorah Payment Gateway</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Pay Online For Website Orders Through MyFatoorah Payment Gateway
</p>
<img src="./assets/screenshots/hero.gif" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
This module helps users to pay online through MyFatoorah payment gateway from Odoo Website.
</p>
</div>
</div>
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/features.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Features
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center" style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> Available in Odoo 15.0 Community, Enterprise and Odoo.sh </span>
</div>
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Easily pay for the website order in odoo through MyFatoorah payment gateway.</span>
</div>
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Myfatoorah is a fast and reliable payment gateway and can make payment by entering card details online.</span>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Go to Website > Configuration > Payment Acquirers</h4>
<img src="assets/screenshots/image_1.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Payment Acquirer Kanban View</h4>
<img src="assets/screenshots/image_2.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Payment Acquirer Form View</h4>
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Enable the payment acquirer and provide the token for payment.
<br/>
Test tokens are available in myfatoorah website docs page.
</h4>
<img src="assets/screenshots/image_3.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Website shop</h4>
<img src="assets/screenshots/image_4.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
In the Payment section choose Myfatoorah Payment Acquirer and click on Pay Now.</h4>
<img src="assets/screenshots/image_5.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Order details will be automatically added to Payment Form.</h4>
<img src="assets/screenshots/image_6.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Provide the card details.</h4>
<img src="assets/screenshots/image_7.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Complete the payment by providing the details.</h4>
<img src="assets/screenshots/image_8.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
After completing the payment, It will be redirected to the odoo payment status page.</h4>
<img src="assets/screenshots/image_9.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/account_payment_approval/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/1.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/multiple_payment_for_outstanding_dues/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/2.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/payment_details_invoice_report/#"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/account_payment_instalment/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/4.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/total_payable_receivable/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/5.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/account_partner_ledger_filter/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="width:35px; color:#000">
<span
class="carousel-control-prev-icon">
<i
class="fa fa-chevron-left"
style="font-size:24px"></i>
</span>
</a>
<a class="carousel-control-next" href="#demo1"
data-slide="next" style="width:35px; color:#000">
<span class="carousel-control-next-icon">
<i
class="fa fa-chevron-right"
style="font-size:24px"></i>
</span>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</section>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</section>
<!-- END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>WhatsApp</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

107
myfatoorah_payment_gateway/views/myfatoorah_payment_templates.xml

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- MyFatoorah payment page form template-->
<template id="myfatoorah_payment_gateway_form"
name="Myfatoorah Payment confirm form">
<t t-call="website.layout">
<div id="wrap">
<div class="container">
<div class="d-flex justify-content-center">
<div class="mt-5">
<h2 class="text-center">Payment Details</h2>
<br/>
<div class="form-label-group">
<table class="table table-borderless">
<tbody>
<tr>
<td>
<label for="customer">
Customer
</label>
<input type="text"
class="form-control shadow-none"
name="customer"
t-att-value="customer"
readonly="1"/>
</td>
<td>
<label for="currency">
Currency
</label>
<input type="text"
class="form-control shadow-none"
name="currency"
t-att-value="currency"
readonly="1"/>
</td>
</tr>
<tr>
<td>
<label for="mobile">
Mobile
</label>
<input type="text"
class="form-control shadow-none"
name="mobile"
t-att-value="mobile"
readonly="1"/>
</td>
</tr>
<tr>
<td>
<label for="invoice_amount">
Invoice Amount
</label>
<input type="text"
class="form-control shadow-none"
name="invoice_amount"
t-att-value="invoice_amount"
readonly="1"/>
</td>
<td>
<label for="address">
Address
</label>
<input type="text"
class="form-control shadow-none"
name="address"
t-att-value="address"
readonly="1"/>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"
class="text-center">
<a class="btn btn-primary"
t-attf-href="{{payment_url}}">
Confirm
</a>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<!-- MyFatoorah payment failed template-->
<template id="myfatoorah_payment_gateway_failed_form"
name="Myfatoorah Payment confirm failed form">
<t t-call="website.layout">
<div id="wrap">
<div class="container">
<div class="col-md-12">
<div class="alert alert-danger">
Payment Failed! Please try again.
</div>
</div>
</div>
</div>
</t>
</template>
</odoo>

20
myfatoorah_payment_gateway/views/payment_acquirer_views.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Field token is added in payment.acquirer model for myfatoorah payment acquirer-->
<record id="payment_acquirer_form" model="ir.ui.view">
<field name="name">payment.acquirer.view.form.inherit.myfatoorah.payment.gateway</field>
<field name="model">payment.acquirer</field>
<field name="inherit_id" ref="payment.payment_acquirer_form"/>
<field name="arch" type="xml">
<group name="acquirer" position='inside'>
<group attrs="{'invisible': [('provider', '!=', 'myfatoorah')]}">
<field name="myfatoorah_token"
string="Token"
attrs="{'required': [('provider', '=', 'myfatoorah'), ('state', '!=', 'disabled')]}"/>
</group>
</group>
</field>
</record>
</odoo>

23
myfatoorah_payment_gateway/views/payment_myfatoorah_templates.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Payment Redirect Form-->
<template id="redirect_form">
<form t-att-action="api_url" method="post">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<input type="hidden" name="headers" t-att-value="headers"/>
<input type="hidden" name="data" t-att-value="data"/>
<input type="hidden" name="CustomerName"
t-att-value="CustomerName"/>
<input type="hidden" name="InvoiceValue"
t-att-value="InvoiceValue"/>
<input type="hidden" name="DisplayCurrencyIso"
t-att-value="DisplayCurrencyIso"/>
<input type="hidden" name="CustomerReference"
t-att-value="CustomerReference"/>
<input type="hidden" name="CallBackUrl" t-att-value="CallBackUrl"/>
<input type="hidden" name="ErrorUrl" t-att-value="ErrorUrl"/>
<input t-if="payment_type" type="hidden" name="payment_type" t-att-value="payment_type"/>
</form>
</template>
</odoo>
Loading…
Cancel
Save