Signature Algorithm sha256
if:
appId
: af37752d8bfc9c23ce9a39e6cf44d135
appSecret
: daa153d25c25c3736b474a91aeaa7fa7{
"appId": "af37752d8bfc9c23ce9a39e6cf44d135",
"merOrderNo": "4085_12200315",
"notifyUrl": "https://19fb-15-164-4-252.ngrok-free.app/Payin/Callback/StarPagoPayTHB/4085",
"currency": "THB",
"amount": "100",
"payMethod": "PROMPTPAY",
"extra": {
"accountName": "NGUYEN TIEN HUY",
"accountNo": "123456123456",
"bankCode": "TMB",
"email": "StarPago@gmail.com",
"mobile": "0123445677"
},
"return_url": "/",
"attach": "StarPago",
}
Sort by the Unicode of key. Then concatenate the parameters in the form of key1=value1&key2=value2&key3=value3. The same applies to the parameters in extra.amount=100&appId=af37752d8bfc9c23ce9a39e6cf44d135&attach=StarPago¤cy=THB&extra=accountName=NGUYEN TIEN HUY&accountNo=123456123456&bankCode=TMB&email=StarPago@gmail.com&mobile=0123445677&merOrderNo=4085_12200315¬ifyUrl=https://19fb-15-164-4-252.ngrok-free.app/Payin/Callback/StarPagoPayTHB/4085&payMethod=PROMPTPAY&return_url=/&key=daa153d25c25c3736b474a91aeaa7fa7
got sign: e751a90689e87ffdbc3025d9e37825f11ed76742e9d1316c0cfbac6313c580aa
{
"appId": "af37752d8bfc9c23ce9a39e6cf44d135",
"merOrderNo": "4085_12200315",
"notifyUrl": "https://19fb-15-164-4-252.ngrok-free.app/Payin/Callback/StarPagoPayTHB/4085",
"currency": "THB",
"amount": "100",
"payMethod": "PROMPTPAY",
"extra": {
"accountName": "NGUYEN TIEN HUY",
"accountNo": "123456123456",
"bankCode": "TMB",
"email": "StarPago@gmail.com",
"mobile": "0123445677"
},
"return_url": "/",
"attach": "StarPago",
"sign": "e751a90689e87ffdbc3025d9e37825f11ed76742e9d1316c0cfbac6313c580aa",
}
Demo#
Java#
php#
NodeJs#
Golang#
Modified at 2025-01-08 10:56:30