feat: 도매상 API 통합 및 스키마 업데이트
- wholesale 패키지 연동 (SooinSession, GeoYoungSession) - Flask Blueprint 분리 (sooin_api.py, geoyoung_api.py) - order_context 스키마 확장 (wholesaler_id, internal_code 등) - 수인약품 개별 취소 기능 (cancel_item, restore_item) - 문서 추가: WHOLESALE_API_INTEGRATION.md - 테스트 스크립트들
This commit is contained in:
44
backend/test_cart_debug.py
Normal file
44
backend/test_cart_debug.py
Normal file
@@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""장바구니 디버깅"""
|
||||
import sys
|
||||
sys.path.insert(0, r'c:\Users\청춘약국\source\pharmacy-pos-qr-system\backend')
|
||||
from sooin_api import SooinSession
|
||||
|
||||
session = SooinSession()
|
||||
|
||||
if not session.login():
|
||||
print("로그인 실패")
|
||||
sys.exit(1)
|
||||
|
||||
print("로그인 성공!")
|
||||
|
||||
# 1. 장바구니 추가 요청의 실제 응답 확인
|
||||
print("\n=== 장바구니 추가 요청 ===")
|
||||
data = {
|
||||
'qty_0': '1',
|
||||
'pc_0': '32495',
|
||||
'stock_0': '238',
|
||||
'saleqty_0': '0',
|
||||
'price_0': '14220',
|
||||
'soldout_0': 'N',
|
||||
'ordunitqty_0': '1',
|
||||
'bidqty_0': '0',
|
||||
'outqty_0': '0',
|
||||
'overqty_0': '0',
|
||||
'manage_0': 'N',
|
||||
'prodno_0': '',
|
||||
'termdt_0': ''
|
||||
}
|
||||
|
||||
resp = session.session.post(session.BAG_URL, data=data, timeout=15)
|
||||
print(f"Status: {resp.status_code}")
|
||||
print(f"URL: {resp.url}")
|
||||
print(f"\n응답 (처음 2000자):\n{resp.text[:2000]}")
|
||||
|
||||
# 2. 장바구니 조회 응답 확인
|
||||
print("\n\n=== 장바구니 조회 요청 ===")
|
||||
params = {'currVenCd': session.VENDOR_CODE}
|
||||
resp2 = session.session.get(session.BAG_URL, params=params, timeout=15)
|
||||
print(f"Status: {resp2.status_code}")
|
||||
print(f"URL: {resp2.url}")
|
||||
print(f"\n응답 (처음 3000자):\n{resp2.text[:3000]}")
|
||||
Reference in New Issue
Block a user