feat(performance): 카페24 대조에 환불 목록 없는 취소·반품 건별 표

결제합계 공식 교체 후 남은 차이는 결제 2일(9/25 +9,900, 9/11 +24,900)과
환불 5일(9/21·9/16 +9,900, 9/11 +26,400, 9/14 −7,000, 9/4 −3,500).
−3,500/−7,000 은 환불 목록에 없는 취소(네이버페이 등)의 배송비 환불을 안 넣은
것으로 보여, 그 건들을 건별로(뺀 금액·품목 결제금액·쿠폰·주문 전체취소 여부·
주문 배송비) 표시한다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 22:53:43 +09:00
parent 398e5181fd
commit 2f86445077
4 changed files with 21 additions and 2 deletions
@@ -402,6 +402,12 @@ class Cafe24Adapter(MarketplaceAdapter):
"quantity": qty, "amount": max(0, amount),
"product_name": str(i.get("product_name") or "")[:40],
"naver_pay_claim_status": str(i.get("naver_pay_claim_status") or ""),
# 대조용 — 주문 전체가 취소·반품됐는지, 그 주문 배송비(배송비 환불 여부 확인)
"order_all_claimed": all(str(x.get("order_status") or "") in NO_RECORD_DONE
for x in o.get("items") or []),
"order_shipping_fee": order_amounts(o)["shipping_fee"],
"item_payment_amount": _won(i.get("payment_amount")),
"coupon": _won(i.get("coupon_discount_price")),
}
if not found:
return []