diff --git a/safer_pay/README.rst b/safer_pay/README.rst index e2d8b85b6..c4930595c 100644 --- a/safer_pay/README.rst +++ b/safer_pay/README.rst @@ -1,12 +1,12 @@ -.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg +.. 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 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 +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 ============= diff --git a/safer_pay/__manifest__.py b/safer_pay/__manifest__.py index 620f53ac6..7a6672104 100644 --- a/safer_pay/__manifest__.py +++ b/safer_pay/__manifest__.py @@ -21,17 +21,17 @@ # ############################################################################### { - 'name': "Safer-Pay Payment Gateway Integration", + '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.' + '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'], + 'depends': ['base', 'payment', 'website_sale'], 'data': [ 'data/payment_acquirer_data.xml', 'views/payment_acquirer_views.xml', diff --git a/safer_pay/controllers/safer_pay.py b/safer_pay/controllers/safer_pay.py index b785dd16c..513894e00 100644 --- a/safer_pay/controllers/safer_pay.py +++ b/safer_pay/controllers/safer_pay.py @@ -20,6 +20,7 @@ # along with this program. If not, see . # ############################################################################### +import base64 import json import requests from odoo import http, _ @@ -41,6 +42,10 @@ class SaferPayPayment(http.Controller): [('name', '=', sequence)]) provider_details = request.env.ref('safer_pay.payment_acquirer_data') if provider_details.customer and provider_details.terminal: + credentials = f"{provider_details.username}:{provider_details.password}" + base64_credentials = base64.b64encode( + credentials.encode('utf-8')).decode('utf-8') + authorization_header = f'Basic {base64_credentials}' url = "https://test.saferpay.com/api/Payment/v1/PaymentPage/Initialize" payload = json.dumps({ "RequestHeader": { @@ -67,9 +72,7 @@ class SaferPayPayment(http.Controller): 'Accept': 'application/json', 'SpecVersion': '1.33', 'RetryIndicator': '0', - 'Authorization': - 'Basic QVBJXzI2NzkxNV8wNzM5NzUxOTpKc29uQXBpUHdk' - 'MV9iV3Blayw1SEIvJF0=', + 'Authorization': authorization_header, 'Cookie': 'ASP.NET_SessionId=lr0an2dywf25itkugaam32pm; PREF=C=en' } response = requests.request("POST", url, headers=headers, diff --git a/safer_pay/doc/RELEASE_NOTES.md b/safer_pay/doc/RELEASE_NOTES.md index a716f0501..a49ccc774 100644 --- a/safer_pay/doc/RELEASE_NOTES.md +++ b/safer_pay/doc/RELEASE_NOTES.md @@ -4,4 +4,9 @@ #### Version 15.0.1.0.0 #### ADD -- Initial commit for Safer-Pay Payment Gateway Integration +- Initial commit for Safer-pay Payment Gateway Integration + +#### 19.02.2024 +#### Version 15.0.1.0.0 +#### ADD +- Debug Fix diff --git a/safer_pay/static/description/index.html b/safer_pay/static/description/index.html index 9f22cacaf..b1480dc47 100644 --- a/safer_pay/static/description/index.html +++ b/safer_pay/static/description/index.html @@ -27,9 +27,9 @@

- Safer-Pay Payment Gateway Integration

+ Safer-pay Payment Gateway Integration

Safer-Pay Payment Gateway in + style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">Safer-pay Payment Gateway in eCommerce

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