跳至內容
選單
此問題已被標幟
4485 瀏覽次數

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
7月 25
636
1
5月 25
1110
0
11月 24
1731
0
3月 24
1618
1
12月 23
7583