Browse Source

Feb 20 : [UPDT] Controller feature updated 'safer_pay'

pull/254/merge
RisvanaCybro 1 year ago
parent
commit
38f0b94a8f
  1. 10
      safer_pay/README.rst
  2. 8
      safer_pay/__manifest__.py
  3. 9
      safer_pay/controllers/safer_pay.py
  4. 7
      safer_pay/doc/RELEASE_NOTES.md
  5. 8
      safer_pay/static/description/index.html

10
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
=============

8
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',

9
safer_pay/controllers/safer_pay.py

@ -20,6 +20,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###############################################################################
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,

7
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

8
safer_pay/static/description/index.html

@ -27,9 +27,9 @@
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Safer-Pay Payment Gateway Integration</h1>
Safer-pay Payment Gateway Integration</h1>
<p
style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">Safer-Pay Payment Gateway in
style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">Safer-pay Payment Gateway in
eCommerce</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/saferpay.gif" class="img-responsive"
@ -120,8 +120,8 @@
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
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
</div>
</div>
<!-- END OF OVERVIEW SECTION -->

Loading…
Cancel
Save