Fixes for static analysis in PayFast token billing class
This commit is contained in:
parent
6da076de5d
commit
9b97ba7fae
|
|
@ -62,11 +62,17 @@ class Token
|
|||
return $this->processSuccessfulPayment($response);
|
||||
}
|
||||
|
||||
return $this->processUnsuccessfulPayment($response, $payment_hash);
|
||||
return $this->processUnsuccessfulPayment($response);
|
||||
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
echo 'There was an exception: '.$e->getMessage();
|
||||
return $this->processUnsuccessfulPayment($e->getMessage());
|
||||
$data = [
|
||||
'data' => [
|
||||
'message' => $e->getMessage(),
|
||||
],
|
||||
'code' => 500,
|
||||
];
|
||||
return $this->processUnsuccessfulPayment($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ class MapSettings extends AbstractService
|
|||
}
|
||||
private function handleLanguage(string $language_id): string
|
||||
{
|
||||
/** @var \App\Models\Language $language */
|
||||
$language = app('languages')->firstWhere('id', $language_id);
|
||||
return $language->name;
|
||||
}
|
||||
|
|
@ -114,11 +115,11 @@ class MapSettings extends AbstractService
|
|||
private function handleCompanyGateways(string $company_gateway_ids): string
|
||||
{
|
||||
nlog($company_gateway_ids);
|
||||
if(strlen($company_gateway_ids) == "0") {
|
||||
if($company_gateway_ids == "0") {
|
||||
return "Payment Gateways Disabled!";
|
||||
}
|
||||
|
||||
if (strlen($company_gateway_ids) == "") {
|
||||
if ($company_gateway_ids == "") {
|
||||
return "No Special Configuration.";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue