Toss payments 개발자 커뮤니티Tp개커Toss payments 개발자 커뮤니티
Powered by
updaunU
Toss payments 개발자 커뮤니티•3y ago•
3 replies
updaun

라이브 키로 에스크로 거래 후 고객 이메일에서 구매확정 완료 후 라이브 서버 웹훅이 안오고 있습니다.

안녕하세요.

24.01.11 (목) 14:35 경 라이브 서버에 에스크로 처리결과 수신 웹훅 등록을 이메일로 요청드려 등록되었다고 확인 이메일 수신했습니다.

그 이후 라이브 키를 활용해 에스크로 거래 테스트를 진행했습니다.

금일 16:41분 경 구매자의 구매확정 이메일을 통해 구매확정을 진행했습니다.
웹훅을 수신받았습니다!!

2024-01-12 16:57:22,104 WARNING Bad Request: /order/escrow/
2024-01-12 16:57:25,881 WARNING Bad Request: /order/escrow/
2024-01-12 16:57:25,906 WARNING Bad Request: /order/escrow/
2024-01-12 17:00:12,694 WARNING Bad Request: /order/escrow/
2024-01-12 17:11:30,928 WARNING Bad Request: /order/escrow/
2024-01-12 17:15:28,514 WARNING Bad Request: /order/escrow/
2024-01-12 16:57:22,104 WARNING Bad Request: /order/escrow/
2024-01-12 16:57:25,881 WARNING Bad Request: /order/escrow/
2024-01-12 16:57:25,906 WARNING Bad Request: /order/escrow/
2024-01-12 17:00:12,694 WARNING Bad Request: /order/escrow/
2024-01-12 17:11:30,928 WARNING Bad Request: /order/escrow/
2024-01-12 17:15:28,514 WARNING Bad Request: /order/escrow/


mid : mokpohlpih
our endpoint : https://mphw.l-league.co.kr/order/escrow/

    def validate(self, attrs):
        mid = attrs.get("mid", "")
        oid = attrs.get("oid", "")
        transactionid = attrs.get("transactionid", "")
        txtype = attrs.get("txtype", "")
        productid = attrs.get("productid", "")
        ssn = attrs.get("ssn", "")
        ip = attrs.get("ip", "")
        mac = attrs.get("mac", "")
        resdate = attrs.get("resdate", "")
        mertkey = settings.TOSS_MERT_KEY
        hash_string = f"{mid}{oid}{transactionid}{txtype}{productid}{ssn}{ip}{mac}{resdate}{mertkey}"
        hashdata2 = hashlib.md5(hash_string.encode()).hexdigest()
        hashdata = attrs.get("hashdata", "")
        if hashdata != hashdata2:
            raise CustomValidationError({"data": "잘못된 요청입니다."})
        return attrs
    def validate(self, attrs):
        mid = attrs.get("mid", "")
        oid = attrs.get("oid", "")
        transactionid = attrs.get("transactionid", "")
        txtype = attrs.get("txtype", "")
        productid = attrs.get("productid", "")
        ssn = attrs.get("ssn", "")
        ip = attrs.get("ip", "")
        mac = attrs.get("mac", "")
        resdate = attrs.get("resdate", "")
        mertkey = settings.TOSS_MERT_KEY
        hash_string = f"{mid}{oid}{transactionid}{txtype}{productid}{ssn}{ip}{mac}{resdate}{mertkey}"
        hashdata2 = hashlib.md5(hash_string.encode()).hexdigest()
        hashdata = attrs.get("hashdata", "")
        if hashdata != hashdata2:
            raise CustomValidationError({"data": "잘못된 요청입니다."})
        return attrs

이렇게 검증을 했는데 잘못되었을까요?

예제코드 php 파일은 transactionid가 tid로 나와있는데 transactionid가 맞는 건가요?

tid로 바꿨는데 되었습니다!!
xpay 가이드에는 transactionid로 되어있어 혼동되었습니다.
해결되었습니다. 🙂
Toss payments 개발자 커뮤니티 banner
Toss payments 개발자 커뮤니티Join
Toss payments 개발자 커뮤니티입니다. 결제 연동하며 겪는 기술 문의부터, 결제 시장에 대한 다양한 정보까지 얻어가세요~
15,588Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

에스크로 구매확정 이메일 관련 질문이 있습니다.
동준동동준 / ❓┃연동개발-문의
3y ago
에스크로 구매확정 부분취소
정수현정정수현 / ❓┃연동개발-문의
8mo ago
에스크로 구매하고 7일 후 구매확정 할 수 있나요?
rinaRrina / ❓┃연동개발-문의
3y ago
가상계좌 에스크로 배송 등록 후 완료 처리
joenoyJjoenoy / ❓┃연동개발-문의
13mo ago