1) Creating Payment
The merchant with API Accounts should send an inquiry to api.paym.es service as follows.
post
https://api.paym.es
/v4.6/order_create
order_create
To generate hash; concatenate strings in this order:
"orderId + price + currency + productName + buyerName + buyerPhone + buyerEmail + buyerAddress + secretKey"
Get the hash of the string with SHA512 (SHA1 512).
Encoding this output should be base64
For example, a hash value that created using the following values:
orderId = "123456789";
price = "1050";
currency = "TRY";
productName = "Ürün İsmi";
buyerName = "Mehmet Yılmaz";
buyerPhone = "05555555555";
buyerEmail = "[email protected]";
buyerAddress = "Örnek adres bilgisi";
secretKey = "111111111";
Combine these variables via the string concatenate method:
str = orderId + price + currency + productName + buyerName + buyerPhone + buyerEmail + buyerAddress + secretKey;
str = "1234567891050TRYÜrün İsmiMehmet Yılma[email protected]Örnek adres bilgisi111111111";
If this string is hashed with the SHA512 method and then the output is encoded with base64, the output will be in the following string:
hash = "knYih0b6Nrvqvw7yxtt5H9Tb6kkH7RJkYlB450FziSBKfx0q2eZACHLi+ZexDZKcs9rxJ//QCmoaq12LaI5+3g==";
If the hash is sent incorrectly, the request will fail.
Last modified 1yr ago