Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/worker/HeraldWebhookWorker.php
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | $payload = array( | ||||
'type' => phid_get_type($object->getPHID()), | 'type' => phid_get_type($object->getPHID()), | ||||
'phid' => $object->getPHID(), | 'phid' => $object->getPHID(), | ||||
), | ), | ||||
'triggers' => $trigger_data, | 'triggers' => $trigger_data, | ||||
'action' => array( | 'action' => array( | ||||
'test' => $request->getIsTestAction(), | 'test' => $request->getIsTestAction(), | ||||
'silent' => $request->getIsSilentAction(), | 'silent' => $request->getIsSilentAction(), | ||||
'secure' => $request->getIsSecureAction(), | 'secure' => $request->getIsSecureAction(), | ||||
'epoch' => (int)$request->getDateCreated(), | |||||
), | ), | ||||
'transactions' => $xaction_data, | 'transactions' => $xaction_data, | ||||
); | ); | ||||
$payload = id(new PhutilJSON())->encodeFormatted($payload); | $payload = id(new PhutilJSON())->encodeFormatted($payload); | ||||
$key = $hook->getHmacKey(); | $key = $hook->getHmacKey(); | ||||
$signature = PhabricatorHash::digestHMACSHA256($payload, $key); | $signature = PhabricatorHash::digestHMACSHA256($payload, $key); | ||||
$uri = $hook->getWebhookURI(); | $uri = $hook->getWebhookURI(); | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |