Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sarun Mungthanya
SpnPatch-Laravel
Commits
a485da71
Commit
a485da71
authored
Dec 13, 2024
by
Chanon.u
Browse files
Add second try send with unverify peer
parent
592b70cf
Changes
1
Show whitespace changes
Inline
Side-by-side
app/Http/Livewire/Pages/ManualResponse/ManualResponse.php
View file @
a485da71
...
@@ -229,6 +229,12 @@ class ManualResponse extends Component
...
@@ -229,6 +229,12 @@ class ManualResponse extends Component
$result
=
curl_exec
(
$ch
);
$result
=
curl_exec
(
$ch
);
$error
=
curl_error
(
$ch
);
$error
=
curl_error
(
$ch
);
if
(
$error
)
{
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
false
);
// Disable peer verification
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYHOST
,
false
);
// Disable host verification
$result
=
curl_exec
(
$ch
);
$error
=
curl_error
(
$ch
);
// Check for errors
}
curl_close
(
$ch
);
curl_close
(
$ch
);
$messageType
=
MasterMessages
::
where
(
'id'
,
$this
->
messageId
)
->
value
(
'name'
)
??
''
;
$messageType
=
MasterMessages
::
where
(
'id'
,
$this
->
messageId
)
->
value
(
'name'
)
??
''
;
...
@@ -322,7 +328,7 @@ class ManualResponse extends Component
...
@@ -322,7 +328,7 @@ class ManualResponse extends Component
$tempCode
=
MasterResponseTemplates
::
find
(
$this
->
templateId
);
$tempCode
=
MasterResponseTemplates
::
find
(
$this
->
templateId
);
$fileName
=
$this
->
xmlData
[
'DeclarationNumber'
]
??
''
.
'-'
.
$tempCode
->
code
.
'-'
.
str_replace
(
"/"
,
"-"
,
$this
->
xmlData
[
'Message'
])
.
'.xml'
;
$fileName
=
$this
->
xmlData
[
'DeclarationNumber'
]
??
''
.
'-'
.
$tempCode
->
code
.
'-'
.
str_replace
(
"/"
,
"-"
,
$this
->
xmlData
[
'Message'
])
.
'.xml'
;
$xmlContent
=
$this
->
xmlContent
;
$xmlContent
=
$this
->
xmlContent
;
\
Storage
::
disk
(
'public'
)
->
put
(
$fileName
,
$xmlContent
);
Storage
::
disk
(
'public'
)
->
put
(
$fileName
,
$xmlContent
);
$this
->
emit
(
'fileManualDownload'
,
asset
(
'storage/'
.
$fileName
));
$this
->
emit
(
'fileManualDownload'
,
asset
(
'storage/'
.
$fileName
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment