Files
dpl/app/Services/PaymentHealth/ChannelIdentity.php
T

12 lines
352 B
PHP

<?php
namespace App\Services\PaymentHealth;
use App\Models\Payment;
class ChannelIdentity
{
public static function revision(Payment $p):string
{
$config=$p->config??[];ksort($config);
return hash_hmac('sha256',json_encode([$p->uuid,$p->payment,$config,$p->notify_domain],JSON_THROW_ON_ERROR),(string)config('app.key'));
}
}