-
-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADD] Nuevo modulo para pagos con tarjeta de credito (sermepa-redsys) #72
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
03357d0
[ADD] Nuevo modulo para pagos con tajeta (sermepa-redsys)
sergio-teruel 70b8762
[FIX] PEP8
sergio-teruel 6461ac0
[FIX] delete incorrect files
sergio-teruel c1b9560
[FIX] Flake8
sergio-teruel 5408a2a
[FIX] payment_redsys Add timestamp in reference. Pedro Baeza recomend…
sergio-teruel 32f50e2
[FIX] payment_redsys Pylint fixes
sergio-teruel abba856
[FIX] payment_redsys Pylint fixes
sergio-teruel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Pasarela de pago Redsys | ||
======================== | ||
|
||
|
||
Este modulo añade la opcion de pago a traves de la pasarela de Redsys | ||
|
||
|
||
|
||
PARAMETROS: | ||
|
||
Nombre del comercio: Indicaremos el nombre del comercio. | ||
|
||
Número de comercio (FUC): Indicaremos el número de comercio que | ||
|
||
nuestra entidad nos ha comunicado. | ||
|
||
Clave secreta de encriptación: Indicaremos la clave de encriptación | ||
|
||
que tiene el comercio. | ||
|
||
Número de terminal: Indicaremos el terminal del TPV. | ||
|
||
Tipo de firma: Seleccionaremos el tipo de firma del comercio. | ||
|
||
Tipo de moneda: Seleccionaremos la moneda de nuestro terminal TPV | ||
(Normalmente Euros). | ||
|
||
Tipo de transacción: Indicaremos el tipo de transacción, 0. | ||
|
||
Idiomas TPV: Indicaremos el idiomas en el TPV. | ||
|
||
URL_OK/URL_KO: durante el proceso del pago, y una vez que | ||
se muestra al cliente la pantalla con el resultado del mismo, es | ||
posible redirigir su navegador a una URL para las transacciones | ||
autorizadas y a otra si la transacción ha sido denegada. A estas | ||
se las denomina URL_OK y URL_KO, respectivamente. Se trata | ||
de dos URL que pueden ser proporcionadas por el comercio. | ||
|
||
|
||
|
||
Requirements | ||
------------ | ||
|
||
Odoo v8.0 | ||
|
||
|
||
Note | ||
---- | ||
|
||
Se tiene que verificar la configuración del comercio en el | ||
módulo de administración de Redsys, donde la opción “Parámetros en las | ||
URLs” debe tener el valor “SI”. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License 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 Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
from . import models | ||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
{ | ||
'name': 'Redsys Payment Acquirer', | ||
'category': 'Hidden', | ||
'summary': 'Payment Acquirer: Redsys Implementation', | ||
'version': '1.0', | ||
'description': """ | ||
|
||
======================== | ||
Pasarela de pago Redsys | ||
======================== | ||
|
||
|
||
Este modulo añade la opcion de pago a traves de la pasarela de Redsys | ||
|
||
|
||
|
||
PARAMETROS: | ||
|
||
Nombre del comercio: Indicaremos el nombre del comercio. | ||
|
||
Número de comercio (FUC): Indicaremos el número de comercio que | ||
|
||
nuestra entidad nos ha comunicado. | ||
|
||
Clave secreta de encriptación: Indicaremos la clave de encriptación | ||
|
||
que tiene el comercio. | ||
|
||
Número de terminal: Indicaremos el terminal del TPV. | ||
|
||
Tipo de firma: Seleccionaremos el tipo de firma del comercio. | ||
|
||
Tipo de moneda: Seleccionaremos la moneda de nuestro terminal TPV | ||
(Normalmente Euros). | ||
|
||
Tipo de transacción: Indicaremos el tipo de transacción, 0. | ||
|
||
Idiomas TPV: Indicaremos el idiomas en el TPV. | ||
|
||
URL_OK/URL_KO: durante el proceso del pago, y una vez que | ||
se muestra al cliente la pantalla con el resultado del mismo, es | ||
posible redirigir su navegador a una URL para las transacciones | ||
autorizadas y a otra si la transacción ha sido denegada. A estas | ||
se las denomina URL_OK y URL_KO, respectivamente. Se trata | ||
de dos URL que pueden ser proporcionadas por el comercio. | ||
|
||
""", | ||
'author': 'Incaser Informatica S.L.', | ||
'depends': ['payment'], | ||
'data': [ | ||
'views/redsys.xml', | ||
'views/payment_acquirer.xml', | ||
'data/redsys.xml', | ||
], | ||
'installable': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
import logging | ||
import pprint | ||
import werkzeug | ||
|
||
from openerp import http, SUPERUSER_ID | ||
from openerp.http import request | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
class RedsysController(http.Controller): | ||
_return_url = '/payment/redsys/return' | ||
_cancel_url = '/payment/redsys/cancel' | ||
_exception_url = '/payment/redsys/error' | ||
_reject_url = '/payment/redsys/reject' | ||
|
||
@http.route([ | ||
'/payment/redsys/return', | ||
'/payment/redsys/cancel', | ||
'/payment/redsys/error', | ||
'/payment/redsys/reject', | ||
], type='http', auth='none') | ||
def redsys_return(self, **post): | ||
""" Redsys.""" | ||
_logger.info('Redsys: entering form_feedback with post data %s', | ||
pprint.pformat(post)) | ||
if post: | ||
request.registry['payment.transaction'].form_feedback( | ||
request.cr, SUPERUSER_ID, post, 'redsys', | ||
context=request.context) | ||
return_url = post.pop('return_url', '') | ||
if not return_url: | ||
return_url = '/shop' | ||
return werkzeug.utils.redirect(return_url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data noupdate="1"> | ||
|
||
<record id="payment_acquirer_redsys" model="payment.acquirer"> | ||
<field name="name">Credit Card Redsys</field> | ||
<field name="provider">redsys</field> | ||
<field name="company_id" ref="base.main_company"/> | ||
<field name="view_template_id" ref="redsys_acquirer_button"/> | ||
<field name="environment">test</field> | ||
<field name="pre_msg"><![CDATA[ | ||
<p>You will be redirected to the redsys website after cliking on the payment button.</p>]]> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from . import redsys |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya no es necesario repetir esta descripción. La coge del archivo. Elimínala por favor.