Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
2906 Представления

Hi, I am developing a new payment acquirer for e-commerce.

I used the same technique used in core odoo for paypal or other payment aquirer(for external PA).

I used in 'payment.acquirer' inherit, the method used also in other acquirer module.


EX:

_get_acquirer_urls;

acquirer_get_form_action_url;

acquirer_form_generate_values

(Where acquirer is name of my acquirer).


Now, when in e-commerce the button 'Pay now' is clicked Odoo does a POST call to my url.

But for me is a problem, because i need Redirect to my URL and not POST call.

Is possibile with a different method?(The provider not accept the POST call)

have you a example with new payment acquirer with custom REDIRECT url?

Thanks in advance.


Best Regards.

Аватар
Отменить
Лучший ответ

Hello,

To specify a different HTTP method for the redirection, you can override this method in your module: https://github.com/odoo/odoo/blob/12.0/addons/payment/static/src/js/payment_form.js#L219-L227

Аватар
Отменить
Лучший ответ

Hi Gianmarco,

I don't have enough karma to comment so please excuse.

I am also having the same problem. Can you please elaborate more how you resolved it using static redirect + globalvar. Because however I tried the tx_url always post data. The API I use is also not not accepting post. Appreciate your response.

Аватар
Отменить
Лучший ответ

Thank's Antoine,

We resolve without override method but with method acquirer_form_generate_values where we return the static redirect + globalvar.


Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мая 24
1897
1
июл. 24
565
3
февр. 24
3019
1
нояб. 20
10246