File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ public function clientException(ClientException $exception)
1212
1313 $ detail = __ ('exception::exceptions.client.unavailable ' );
1414 $ code = $ this ->getCode ('client.default ' );
15- if ($ this ->clientExceptionCausers ()::PAGARME_HOST == $ requestHost ) {
16- $ detail = $ detail ;
17- $ code = $ this ->getCode ('client.pagarme ' );
15+ if ($ this ->clientExceptionCausers ()->isPagarme ($ requestHost )) {
16+ $ pagarMeCode = config ($ this ->configFile .'codes.client.pagarme ' ) ?? $ code ;
17+
18+ $ detail = $ detail .' # ' .$ pagarMeCode ;
19+ $ code = $ pagarMeCode ;
1820 }
1921
2022 $ error = [[
@@ -33,6 +35,11 @@ public function clientExceptionCausers()
3335 {
3436 return new class () {
3537 const PAGARME_HOST = 'api.pagar.me ' ;
38+
39+ public function isPagarme ($ host )
40+ {
41+ return self ::PAGARME_HOST == $ host ;
42+ }
3643 };
3744 }
3845}
You can’t perform that action at this time.
0 commit comments