Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
2924 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Thank's Antoine,

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


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 24
1911
1
thg 7 24
590
3
thg 2 24
3059
1
thg 11 20
10277