import imp

imp.reload(sys)
try:
    sys.setdefaultencoding('UTF8')
except Exception as E:
    pass

import testValue

from popbill import AccountCheckService, PopbillException

accountCheckService = AccountCheckService(testValue.LinkID,
                                          testValue.SecretKey)
accountCheckService.IsTest = testValue.IsTest
accountCheckService.IPRestrictOnOff = testValue.IPRestrictOnOff
accountCheckService.UseStaticIP = testValue.UseStaticIP
accountCheckService.UseLocalTimeYN = testValue.UseLocalTimeYN
'''
팝빌 회원아이디 중복여부를 확인합니다.
'''

try:
    print("=" * 15 + " 회원아이디 중복확인 " + "=" * 15)

    # 중복확인할 아이디
    memberID = "testkorea"

    response = accountCheckService.checkID(memberID)

    print("처리결과 : [%d] %s" % (response.code, response.message))
Пример #2
0
# -*- coding: utf-8 -*-
from django.shortcuts import render
from popbill import AccountCheckService, PopbillException, JoinForm, ContactInfo, CorpInfo

from config import settings

# config/settings.py 작성한 LinkID, SecretKey를 이용해 accountCheckService 객체 생성
accountCheckService = AccountCheckService(settings.LinkID, settings.SecretKey)

# 연동환경 설정값, 개발용(True), 상업용(False)
accountCheckService.IsTest = settings.IsTest

# 인증토큰 IP제한기능 사용여부, 권장(True)
accountCheckService.IPRestrictOnOff = settings.IPRestrictOnOff

# 팝빌 API 서비스 고정 IP 사용여부, true-사용, false-미사용, 기본값(false)
accountCheckService.UseStaticIP = settings.UseStaticIP

#로컬시스템 시간 사용여부, 권장(True)
accountCheckService.UseLocalTimeYN = settings.UseLocalTimeYN


def index(request):
    return render(request, 'AccountCheck/Index.html', {})


def checkAccountInfo(request):
    """
    1건의 예금주성명을 조회합니다.
    - https://docs.popbill.com/accountcheck/python/api#CheckAccountInfo
    """