Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
2855 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Najlepsza odpowiedź

Thank's Antoine,

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


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 24
1813
1
lip 24
509
3
lut 24
2947
1
lis 20
10204