Remove auth from insurance listener. Fail silently if invalid callback given #761
This commit is contained in:
parent
9b616cf398
commit
e3a79361bd
3 changed files with 18 additions and 0 deletions
|
|
@ -53,6 +53,10 @@ security:
|
|||
pattern: ^\/test_capi\/
|
||||
security: false
|
||||
|
||||
insurance:
|
||||
pattern: ^\/insurance\/
|
||||
security: false
|
||||
|
||||
paymongo:
|
||||
pattern: ^\/paymongo\/
|
||||
security: false
|
||||
|
|
|
|||
|
|
@ -39,6 +39,13 @@ class InsuranceController extends Controller
|
|||
|
||||
// END DEBUG
|
||||
|
||||
// if no transaction code given, silently fail
|
||||
if (empty($attr['transaction_code'])) {
|
||||
return $this->json([
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
// get event type and process accordingly
|
||||
$event_name = $payload['transaction_code'];
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,13 @@ class PayMongoController extends Controller
|
|||
|
||||
// END DEBUG
|
||||
|
||||
// if no event type given, silently fail
|
||||
if (empty($attr['type'])) {
|
||||
return $this->json([
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
// get event type and process accordingly
|
||||
$attr = $payload['data']['attributes'];
|
||||
$event = $attr['data'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue