File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,3 +257,11 @@ L5_SWAGGER_CONST_TOKEN_URL=${IDP_TOKEN_ENDPOINT}
257257
258258MEMCACHED_SERVER_HOST = 127.0.0.1
259259MEMCACHED_SERVER_PORT = 11211
260+
261+ # PAYMENT SERVICE
262+
263+ PAYMENTS_SERVICE_BASE_URL =
264+ # CLIENT SHOULD BE CONFIGURED with SECRET POST at IDP
265+ PAYMENTS_SERVICE_OAUTH2_CLIENT_ID =
266+ PAYMENTS_SERVICE_OAUTH2_CLIENT_SECRET =
267+ PAYMENTS_SERVICE_OAUTH2_SCOPES = payment-profile/read
Original file line number Diff line number Diff line change 2020use Illuminate \Queue \InteractsWithQueue ;
2121use Illuminate \Queue \SerializesModels ;
2222use Illuminate \Support \Facades \Log ;
23+ use models \summit \IPaymentConstants ;
2324use models \summit \ISummitRepository ;
2425use models \summit \Summit ;
2526
@@ -60,6 +61,11 @@ public function handle(PaymentsMQJob $job): void{
6061 $ data = $ payload ['data ' ];
6162 $ id = intval ($ data ['id ' ]);
6263 $ summit_id = intval ($ data ['summit_id ' ]);
64+ $ application_type = $ data ['application_type ' ];
65+ if (!in_array ($ application_type , IPaymentConstants::ValidApplicationTypes)){
66+ Log::warning ("CreatePaymentProfileMQJob::handle Application Type $ application_type is not valid. " );
67+ return ;
68+ }
6369 $ response = $ this ->payments_api ->getPaymentProfile ($ summit_id , $ id );
6470 Log::debug ("CreatePaymentProfileMQJob::handle " , ['response ' => $ response ]);
6571 $ summit = $ this ->summit_repository ->getById ($ summit_id );
Original file line number Diff line number Diff line change 2020use Illuminate \Queue \InteractsWithQueue ;
2121use Illuminate \Queue \SerializesModels ;
2222use Illuminate \Support \Facades \Log ;
23+ use models \summit \IPaymentConstants ;
2324use models \summit \ISummitRepository ;
2425use models \summit \PaymentGatewayProfile ;
2526use models \summit \Summit ;
@@ -57,6 +58,11 @@ public function handle(PaymentsMQJob $job): void{
5758
5859 $ id = intval ($ data ['id ' ]);
5960 $ summit_id = intval ($ data ['summit_id ' ]);
61+ $ application_type = $ data ['application_type ' ];
62+ if (!in_array ($ application_type , IPaymentConstants::ValidApplicationTypes)){
63+ Log::warning ("DeletePaymentProfileMQJob::handle Application Type $ application_type is not valid. " );
64+ return ;
65+ }
6066
6167 $ summit = $ this ->summit_repository ->getById ($ summit_id );
6268 $ local_payment_profile = $ this ->payment_gateway_profile_repository ->getByExternalId ($ id );
Original file line number Diff line number Diff line change 2121use Illuminate \Queue \InteractsWithQueue ;
2222use Illuminate \Queue \SerializesModels ;
2323use Illuminate \Support \Facades \Log ;
24+ use models \summit \IPaymentConstants ;
2425use models \summit \ISummitRepository ;
2526use models \summit \PaymentGatewayProfile ;
2627use models \summit \Summit ;
@@ -67,6 +68,12 @@ public function handle(PaymentsMQJob $job): void{
6768 $ data = $ payload ['data ' ];
6869 $ id = intval ($ data ['id ' ]);
6970 $ summit_id = intval ($ data ['summit_id ' ]);
71+ $ application_type = $ data ['application_type ' ];
72+
73+ if (!in_array ($ application_type , IPaymentConstants::ValidApplicationTypes)){
74+ Log::warning ("UpdatePaymentProfileMQJob::handle Application Type $ application_type is not valid. " );
75+ return ;
76+ }
7077 $ response = $ this ->payments_api ->getPaymentProfile ($ summit_id , $ id );
7178 Log::debug ("UpdatePaymentProfileMQJob::handle " , ['response ' => $ response ]);
7279 $ summit = $ this ->summit_repository ->getById ($ summit_id );
You can’t perform that action at this time.
0 commit comments