- hash_hmac: documentation ( source)
- base64_encode: documentation ( source)
- json_encode: documentation ( source)
<?php
$merchant = 'VICTORIA_BRIDES';
$secretKey = '53b9565a-f717-42e1-990c-ba64a3598901';
echo base64_encode(
hash_hmac(
'sha512',
$merchant . \json_encode(['order_id' => 1000001067]) . $merchant,
$secretKey
)
);