1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00
This commit is contained in:
David Bomba 2022-02-07 19:14:54 +11:00
parent 35e7ab57dc
commit 4fe06b8a29
4 changed files with 59 additions and 3 deletions

View File

@ -1 +1 @@
5.3.55
5.3.56

View File

@ -88,6 +88,8 @@ class ProcessPostmarkWebhook implements ShouldQueue
return $this->processBounce();
case 'SpamComplaint':
return $this->processSpamComplaint();
case 'Open':
return $this->processOpen();
default:
# code...
break;
@ -95,6 +97,59 @@ class ProcessPostmarkWebhook implements ShouldQueue
}
// {
// "Metadata": {
// "example": "value",
// "example_2": "value"
// },
// "RecordType": "Open",
// "FirstOpen": true,
// "Client": {
// "Name": "Chrome 35.0.1916.153",
// "Company": "Google",
// "Family": "Chrome"
// },
// "OS": {
// "Name": "OS X 10.7 Lion",
// "Company": "Apple Computer, Inc.",
// "Family": "OS X 10"
// },
// "Platform": "WebMail",
// "UserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36",
// "ReadSeconds": 5,
// "Geo": {
// "CountryISOCode": "RS",
// "Country": "Serbia",
// "RegionISOCode": "VO",
// "Region": "Autonomna Pokrajina Vojvodina",
// "City": "Novi Sad",
// "Zip": "21000",
// "Coords": "45.2517,19.8369",
// "IP": "188.2.95.4"
// },
// "MessageID": "00000000-0000-0000-0000-000000000000",
// "MessageStream": "outbound",
// "ReceivedAt": "2022-02-06T06:37:48Z",
// "Tag": "welcome-email",
// "Recipient": "john@example.com"
// }
private function processOpen()
{
$this->invitation->opened_date = now();
$this->invitation->save();
SystemLogger::dispatch($this->request,
SystemLog::CATEGORY_MAIL,
SystemLog::EVENT_MAIL_OPENED,
SystemLog::TYPE_WEBHOOK_RESPONSE,
$this->invitation->contact->client,
$this->invitation->company
);
}
// {
// "RecordType": "Delivery",
// "ServerID": 23,

View File

@ -50,6 +50,7 @@ class SystemLog extends Model
const EVENT_MAIL_BOUNCED = 32;
const EVENT_MAIL_SPAM_COMPLAINT = 33;
const EVENT_MAIL_DELIVERY = 34;
const EVENT_MAIL_OPENED = 35;
const EVENT_WEBHOOK_RESPONSE = 40;
const EVENT_WEBHOOK_SUCCESS = 41;

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.3.55',
'app_tag' => '5.3.55',
'app_version' => '5.3.56',
'app_tag' => '5.3.56',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),