Bảo mật
Bảo mật
Chat với AI▼
1. Hướng dẫn tạo signature API Tạo hoá đơn thanh toán
Ví dụ tham số truyền lên API
{
"billCode": "60586f8d6a684",
"billInfo": "Thanh toán hóa đơn",
"serviceCode": "GAME",
"customerName": "NGUYEN VAN A",
"notifyUrl": "https://yourdomain.com/ipn",
"amount": 50000,
"billExpiryTime": 1616818154,
"paymentCondition": "NO",
"bankCode": "WOORIBANK",
"signature": "abc123"
}
Thứ tự các tham số để tạo ra signature sẽ được sort theo thứ tự alphabet
Các trường được ký bao gồm (billCode + billInfo + serviceCode + customerName + notifyUrl + amount + billExpiryTime + paymentCondition + bankCode)
Chuỗi được tạo ra với các tham số trên sẽ là:
"amount=50000&bankCode=WOORIBANK&billCode=60586f8d6a684&billExpiryTime=1616818154&billInfo=Thanh toán hóa đơn&customerName=NGUYEN VAN A¬ifyUrl=https://yourdomain.com/ipn&paymentCondition=NO&serviceCode=GAME"
signature = HMAC_SHA256("amount=50000&bankCode=WOORIBANK&billCode=60586f8d6a684&billExpiryTime=1616818154&billInfo=Thanh toán hóa đơn&customerName=NGUYEN VAN A¬ifyUrl=https://yourdomain.com/ipn&paymentCondition=NO&serviceCode=GAME", YOUR_SECRET_KEY)