[FIX] payment_stripe_sca: do not redefine _get_stripe_api_url
There is no need to redefine `_get_stripe_api_url` by adding `https` since all existing calls to the method programmatically add it already. Therefore, we use the same approach: we add `https://`, then join the URL. opw-2031745 closes odoo/odoo#36957 X-original-commit: 0412786486462423c91afc1c5a4dcb25886827e4 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
committed by
fw-bot
parent
6c97d73adb
commit
3198705e30
@@ -44,7 +44,8 @@ class PaymentAcquirerStripeSCA(models.Model):
|
||||
|
||||
def _stripe_request(self, url, data=False, method="POST"):
|
||||
self.ensure_one()
|
||||
url = urls.url_join(self._get_stripe_api_url(), url)
|
||||
stripe_url = 'https://%s/' % (self._get_stripe_api_url())
|
||||
url = urls.url_join(stripe_url, url)
|
||||
headers = {
|
||||
"AUTHORIZATION": "Bearer %s" % self.sudo().stripe_secret_key,
|
||||
"Stripe-Version": "2019-05-16", # SetupIntent need a specific version
|
||||
@@ -84,10 +85,6 @@ class PaymentAcquirerStripeSCA(models.Model):
|
||||
)
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def _get_stripe_api_url(self):
|
||||
return "https://api.stripe.com/v1/"
|
||||
|
||||
@api.model
|
||||
def stripe_s2s_form_process(self, data):
|
||||
last4 = data.get("card", {}).get("last4")
|
||||
|
||||
Reference in New Issue
Block a user