
     h                     V    d dl mZmZmZ d dlmZmZmZ d dlm	Z	  G d de
          ZdS )    )absolute_importdivisionprint_function)api_requestorconnect_api_baseerror)	urlencodec                   l    e Zd Zed             Zedd            Zedd            Zedd            ZdS )	OAuthc                 T    d| v rd S ddl m} |r|| d<   d S t          j        d          )N	client_idr   )r   ax  No client_id provided. (HINT: set your client_id using "stripe.client_id = <CLIENT-ID>"). You can find your client_ids in your Stripe dashboard at https://dashboard.stripe.com/account/applications/settings, after registering your account as a platform. See https://stripe.com/docs/connect/standalone-accounts for details, or email support@stripe.com if you have any questions.)striper   r   AuthenticationError)paramsr   s     H/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/stripe/oauth.py_set_client_idzOAuth._set_client_id   sV    &  F$$$$$$ 	"+F;F'E
 
 	
    Fc                     | du rd}nd}t                               |           d|vrd|d<   t          t          t	          j        |                              }t          |z   dz   |z   }|S )NFz/oauth/authorizez/express/oauth/authorizeresponse_typecode?)r   r   r	   listr   _api_encoder   )expressr   pathqueryurls        r   authorize_urlzOAuth.authorize_url   s{    e%DD-DV$$$&((&,F?#$}8@@AABB%+e3
r   Nc                 |    t          j        | t                    }|                    dd|d           \  }}|j        S )Napi_basepostz/oauth/token)r   APIRequestorr   requestdataapi_keyr   	requestorresponse_s        r   tokenzOAuth.token+   sF    !..
 
 
	  ''MM!}r   c                     t          j        | t                    }t                              |           |                    dd|d           \  }}|j        S )Nr    r"   z/oauth/deauthorize)r   r#   r   r   r   r$   r%   r&   s        r   deauthorizezOAuth.deauthorize3   sb    !..
 
 
	 	V$$$''(&$
 
! }r   )F)N)__name__
__module____qualname__staticmethodr   r   r+   r-    r   r   r   r      s        
 
 \
(    \    \    \  r   r   N)
__future__r   r   r   r   r   r   r   stripe.six.moves.urllib.parser	   objectr   r2   r   r   <module>r6      s    @ @ @ @ @ @ @ @ @ @ 9 9 9 9 9 9 9 9 9 9 3 3 3 3 3 35 5 5 5 5F 5 5 5 5 5r   