Exemplo n.º 1
0
def registContact(request):
    """
    연동회원의 담당자를 신규로 등록합니다.
    - https://docs.popbill.com/easyfinbank/python/api#RegistContact
    """
    try:
        # 팝빌회원 사업자번호
        CorpNum = settings.testCorpNum

        # 팝빌회원 아이디
        UserID = settings.testUserID

        # 담당자 정보
        newContact = ContactInfo(

            # 아이디 (6자 이상 50자 미만)
            id="popbill_test_id",

            # 비밀번호 (8자 이상 20자 미만)
            # 영문, 숫자, 특수문자 조합
            Password="******",

            # 담당자명 (최대 100자)
            personName="담당자명",

            # 담당자 연락처 (최대 20자)
            tel="010-111-222",

            # 담당자 휴대폰번호 (최대 20자)
            hp="010-111-222",

            # 담당자 팩스번호 (최대 20자)
            fax="070-111-222",

            # 담당자 이메일 (최대 100자)
            email="*****@*****.**",

            #담당자 조회권한, 1(개인) 2(읽기) 3(회사)
            searchRole=1)

        response = easyFinBankService.registContact(CorpNum, newContact,
                                                    UserID)

        return render(request, 'response.html', {
            'code': response.code,
            'message': response.message
        })
    except PopbillException as PE:
        return render(request, 'exception.html', {
            'code': PE.code,
            'message': PE.message
        })
Exemplo n.º 2
0
def updateContact(request):
    """
    연동회원의 담당자 정보를 수정합니다.
    - https://docs.popbill.com/easyfinbank/python/api#UpdateContact
    """
    try:
        # 팝빌회원 사업자번호
        CorpNum = settings.testCorpNum

        # 팝빌회원 아이디
        UserID = settings.testUserID

        # 담당자 정보
        updateInfo = ContactInfo(

            # 담당자 아이디
            id=UserID,

            # 담당자 성명 (최대 100자)
            personName="담당자_성명",

            # 담당자 연락처 (최대 20자)
            tel="010-111-111",

            # 담당자 휴대폰번호 (최대 20자)
            hp="010-111-111",

            # 담당자 팩스번호 (최대 20자)
            fax="070-111-222",

            # 담당자 메일주소 (최대 100자)
            email="*****@*****.**",

            #담당자 조회권한, 1(개인) 2(읽기) 3(회사)
            searchRole=1)

        response = easyFinBankService.updateContact(CorpNum, updateInfo,
                                                    UserID)

        return render(request, 'response.html', {
            'code': response.code,
            'message': response.message
        })
    except PopbillException as PE:
        return render(request, 'exception.html', {
            'code': PE.code,
            'message': PE.message
        })
    UserID = testValue.testUserID

    # 담당자 정보
    newContact = ContactInfo(

        # 아이디 (6자 이상 50자 미만)
        id="popbill_test_id",

        # 비밀번호 (8자 이상 20자 미만)
        # 영문, 숫자, 특수문자 조합
        Password="******",

        # 담당자명 (최대 100자)
        personName="담당자명",

        # 담당자 연락처 (최대 20자)
        tel="010-111-222",

        # 담당자 휴대폰번호 (최대 20자)
        hp="010-111-222",

        # 담당자 팩스번호 (최대 20자)
        fax="070-111-222",

        # 담당자 이메일 (최대 100자)
        email="*****@*****.**",

        #담당자 조회권한, 1(개인) 2(읽기) 3(회사)
        searchRole=1)

    result = taxinvoiceService.registContact(CorpNum, newContact, UserID)
    print("처리결과 : [%d] %s" % (result.code, result.message))
Exemplo n.º 4
0
    # 팝빌회원 아이디
    UserID = testValue.testUserID

    # 담당자 정보
    updateInfo = ContactInfo(

        # 담당자 아이디
        id=UserID,

        # 담당자 성명 (최대 100자)
        personName="담당자 성명",

        # 연락처 (최대 20자)
        tel="070-4304-2991",

        # 휴대폰번호 (최대 20자)
        hp="010-4324-4324",

        # 팩스번호 (최대 20자)
        fax="070-111-222",

        # 메일주소 (최대 100자)
        email="*****@*****.**",

        ##담당자 조회권한, 1(개인) 2(읽기) 3(회사)
        searchRole=1)

    result = taxinvoiceService.updateContact(CorpNum, updateInfo, UserID)

    print("처리결과 : [%d] %s" % (result.code, result.message))