1919 *
2020 */
2121
22+ /**
23+ * SendGrid Plugin for CakePHP
24+ * Copyright (c) SprintCube (https://www.sprintcube.com)
25+ *
26+ * Licensed under The MIT License
27+ * For full copyright and license information, please see the LICENSE.md
28+ * Redistributions of files must retain the above copyright notice.
29+ *
30+ * @copyright Copyright (c) SprintCube (https://www.sprintcube.com)
31+ * @license https://opensource.org/licenses/mit-license.php MIT License
32+ * @link https://github.com/sprintcube/cakephp-sendgrid
33+ * @since 5.0.0
34+ */
2235
2336namespace SendGrid \Controller ;
2437
@@ -75,7 +88,7 @@ public function index()
7588 if (isset ($ config ['secure ' ]) && $ config ['secure ' ] == 'true ' ) {
7689 $ this ->request ->getBody ()->rewind ();
7790 $ payload = $ this ->request ->getBody ()->getContents ();
78- // Log::debug($payload);
91+ // Log::debug($payload);
7992
8093 if (!isset ($ config ['verification_key ' ])) {
8194 if (isset ($ config ['debug ' ]) && $ config ['debug ' ] == 'true ' ) {
@@ -85,7 +98,7 @@ public function index()
8598 $ this ->viewBuilder ()->setOption ('serialize ' , "error " );
8699 return ;
87100 }
88-
101+
89102 $ publicKey = PublicKey::fromString ($ config ['verification_key ' ]);
90103
91104 $ timestampedPayload = $ this ->request ->getHeaderLine ($ this ::TIMESTAMP ) . $ payload ;
@@ -126,5 +139,4 @@ public function index()
126139 $ this ->set ('OK ' , "OK " );
127140 $ this ->viewBuilder ()->setOption ('serialize ' , "OK " );
128141 }
129-
130142}
0 commit comments