Remove auth from insurance listener. Fail silently if invalid callback given #761

This commit is contained in:
Ramon Gutierrez 2023-10-09 14:05:25 +08:00
parent 9b616cf398
commit e3a79361bd
3 changed files with 18 additions and 0 deletions

View file

@ -53,6 +53,10 @@ security:
pattern: ^\/test_capi\/
security: false
insurance:
pattern: ^\/insurance\/
security: false
paymongo:
pattern: ^\/paymongo\/
security: false

View file

@ -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'];

View file

@ -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'];