iyzipay_resource.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:iyzipay-python 作者: iyzico 项目源码 文件源码
def get_http_header(self, options=None, pki_string=None):
        header = {"Accept": "application/json", "Content-type": "application/json"}
        if pki_string is not None:
            random_header_value = "".join(
                random.SystemRandom().choice(string.ascii_lowercase + string.ascii_uppercase + string.digits) for _ in
                range(self.RANDOM_STRING_SIZE))
            header.update(
                {'Authorization': self.prepare_auth_string(options, random_header_value, pki_string)})
            header.update({'x-iyzi-rnd': random_header_value})
            header.update({'x-iyzi-client-version': 'iyzipay-python-1.0.29'})
        return header
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号