mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 23:58:24 +02:00
Configure Hello Asso return endpoint
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -57,7 +57,7 @@ def get_hello_asso_access_token():
|
||||
return _access_token
|
||||
|
||||
|
||||
def get_checkout_intent(checkout_id):
|
||||
def get_checkout_intent(checkout_id, none_if_link_disabled=False):
|
||||
base_url = _get_hello_asso_api_base_url()
|
||||
token = get_hello_asso_access_token()
|
||||
|
||||
@ -72,7 +72,7 @@ def get_checkout_intent(checkout_id):
|
||||
response.raise_for_status()
|
||||
|
||||
checkout_intent = response.json()
|
||||
if requests.head(checkout_intent["redirectUrl"]).status_code == 404:
|
||||
if none_if_link_disabled and requests.head(checkout_intent["redirectUrl"]).status_code == 404:
|
||||
return None
|
||||
|
||||
return checkout_intent
|
||||
|
Reference in New Issue
Block a user