This question has been flagged
3 Replies
2359 Views

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.

Avatar
Discard
Best Answer

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

Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer

Thank's Antoine,

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


Avatar
Discard