Authorization Using Received Credentials#
You must use the endpointid and merchant_control obtained from the manager for authorizing requests.endpointid is used in the following methods:/paynet/api/v2/sale/{endpointid}
/paynet/api/v2/sale/status/{endpointid}
merchant_control is used to generate the control parameter in the request body.
Example of Using merchant_control#
For example, the parameters:endpointid=1111
client_orderid=902B4FF5
amount=10.42
email=john.smith@gmail.com
merchant_control=B17F59B4-A7DC-41B4-8FF9-37D986B43D20
will be concatenated to the string:
1111902B4FF51042john.smith@gmail.comB17F59B4-A7DC-41B4-8FF9-37D986B43D20Then, encrypt the received string using SHA-1.Java SHA-1 Generation Example#
JavaScript SHA-1 Generation Example#
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha1.js"></script>
<script type="text/javascript">
var sha1value = CryptoJS.SHA1("test string to sha1");
</script>
Bash + OpenSSL SHA-1 Generation Example#
echo -n "test string to sha1" | openssl dgst -sha1After that, the signature will look like this:
c6bdd88a78834ef4b863b088827a459f039e8257Modified at 2024-12-12 13:18:26