Compare commits
2 Commits
a02af3b0f0
...
763e041a8b
| Author | SHA1 | Date | |
|---|---|---|---|
| 763e041a8b | |||
| f9d3fbf937 |
@@ -15,12 +15,12 @@ from db.models.transactions import BalanceTxType
|
||||
from misc.pally import BillStatus
|
||||
from schemas.di import APIDependenciesDTO
|
||||
|
||||
router = APIRouter(prefix="/checkout/pally")
|
||||
router = APIRouter(prefix="/pally")
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@router.post("/callback")
|
||||
@router.post("/result")
|
||||
async def pally_callback(
|
||||
id: str = Form(...),
|
||||
bill_id: str = Form(...),
|
||||
|
||||
@@ -19,6 +19,7 @@ from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
ENDPOINT = "/pally/result"
|
||||
|
||||
def calculate_signature(
|
||||
payment_id: str,
|
||||
@@ -70,9 +71,9 @@ def main():
|
||||
"signature": signature,
|
||||
}
|
||||
|
||||
print(f"{args.host}/checkout/pally/callback")
|
||||
print(f"{args.host}{ENDPOINT}")
|
||||
print(f"Отправляю вебхук: {payload}\n")
|
||||
response = httpx.post(f"{args.host}/checkout/pally/callback", data=payload)
|
||||
response = httpx.post(f"{args.host}{ENDPOINT}", data=payload)
|
||||
print(f"Статус ответа: {response.status_code}")
|
||||
print(f"Тело ответа: {response.text}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user