Security
Pagsmile includes a signature in the Pagsmile-Signature header of each event. This allows you to verify that the event was sent by Pagsmile instead of a third party. You can verify the signature to en
Signature
Verifying signatures manually
Pagsmile-Signature:
t=1577808000,
v2=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bdContent-Type: application/json
Method: POST
Header: Pagsmile-Signature
Body:
{
"trade_no":"",
"out_trade_no":"",
"out_request_no":"",
"app_id":"",
"trade_status":"",
"amount":"",
"method":"",
"currency":"",
"timestamp":""
}Step 1 : Extract the timestamp and signatures from the header
Step 2 : Prepare the original RequestBody string
Step 3 : Determine the expected signature
Step 4 : Compare the signatures
Example of verifying codes in Java
Last updated