Skip to Content
Menu
This question has been flagged

I have a customer that is having issues with Authorize.net payment gateway. 

They were getting a "Your script timed out while we were trying to post transaction results to it." error from Authorize.

Well, what I found out is that the `x_relay_url` was being sent as http rather than https.

The part that is throwing me off is we have the `web.base.url` set as `https://domain.com` and `web.base.url.freeze` set to `True`. 

So why is the base url being passed as non https?

I found the function creating the base url from `payment.acquirer` (see below)
Also this customer doesn't have the website module installed, so that shouldn't be a factor.

Not sure how the `request` works in this case, that is the only thing I could see that is throwing it off?

def get_base_url(self):

        self.ensure_one()

        # priority is always given to url_root

        # from the request

        url = ''

        if request:

            url = request.httprequest.url_root


        if not url and 'website_id' in self and self.website_id:

            url = self.website_id._get_http_domain()


        return url or self.env['ir.config_parameter'].sudo().get_param('web.base.url')


Any ideas would be helpful. I have a patch working for them, but it is a crud fix and is not a long term fix.

Avatar
Discard
Related Posts Replies Views Activity
0
Nov 24
87
0
Mar 24
279
1
Dec 23
5773
1
Feb 22
6855
1
Mar 20
3591