Signature
Each request must be signed for validation. Clients will be given secret keys for different documentations. The key will be processed to provide signature through these following steps:
Parameters used:
- Request UUID
- Request Datetime
- Community Code
- Key
- Service Name
Step 1 :
Combine the parameters used in the following order:
##Request UUID##Request Datetime##Community Code##Key##Service Name ##
Example :
Request UUID : 123ABC-DEF456
Request Datetime : 2017-08-08 09:17:45
Community Code : MYCOMMCODE
Key : S3cr317kEY
Service Name : SendInvoice
This will be converted into a string as shown below:
Result = ##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3cr317kEY##SendInvoice##
Step 2 :
Uppercase parameter combination in Step 1:
##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3CR317KEY##SENDINVOICE##
Step 3 :
Hash the result of Step 2 by using sha256:
$sha256 = hash(sha256, '##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3CR317KEY##SENDINVOICE##')
Result = 638f5fd9f590ce81b15570d32edaec03dab1498aa2525947411be6d6e2aa7a2d
The result of step 3 will be used as the value of the signature parameter.