6) Terminal Payment Create

Merchants should send mobile payment request to api.paym.es service as follows.
post
https://api.paym.es
/v4.6/order_create
order_create

Generating Hash Information

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ı[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.
If the payment request with the terminal is successful, you can make a payment from the terminal with the invoiceCode parameter included in the response.
{
"status" : "return_url",
"message" : "Redirect 3D",
"returnUrl" : "https://api.paym.es/payment/fbe04621-ee39-451b-a694-09a6fed22809",
"paymesOrderId" : "fbe04621-ee39-451b-a694-09a6fed22809",
"invoiceCode" : "1255403"
}
When the payment process with the terminal is completed, the result of the transaction is sent to your webhook URL address.