Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
konaspi2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
konaspi2024
Commits
db69eb08
Commit
db69eb08
authored
a year ago
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update credential VA
parent
3fa50be4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
app/Http/Controllers/RegistrasiController.php
+17
-16
No files found.
app/Http/Controllers/RegistrasiController.php
View file @
db69eb08
...
...
@@ -212,25 +212,25 @@ public function store(Request $request) {
$registrasi
->
save
();
//
$generatedVa = $this->generateVa($multipartData);
//
$arrResponse = json_decode($generatedVa, true);
//
$registrasi->status_va = $arrResponse['BTNresponse'];
//
$registrasi->tagihan = $totalHarga;
//
$registrasi->nomor_va = $arrResponse['BTNVirtualAccount'];
$generatedVa
=
$this
->
generateVa
(
$multipartData
);
$arrResponse
=
json_decode
(
$generatedVa
,
true
);
$registrasi
->
status_va
=
$arrResponse
[
'BTNresponse'
];
$registrasi
->
tagihan
=
$totalHarga
;
$registrasi
->
nomor_va
=
$arrResponse
[
'BTNVirtualAccount'
];
//
$registrasi->save();
$registrasi
->
save
();
//
if($arrResponse['BTNresponse'] != 'Request has been processed successfully'){
//
DB::rollBack();
//
Log::error('---');
//
Log::error($multipartData);
//
Log::error($arrResponse['BTNresponse']);
//
Log::error('---');
if
(
$arrResponse
[
'BTNresponse'
]
!=
'Request has been processed successfully'
){
DB
::
rollBack
();
Log
::
error
(
'---'
);
Log
::
error
(
$multipartData
);
Log
::
error
(
$arrResponse
[
'BTNresponse'
]);
Log
::
error
(
'---'
);
//
return redirect()->route('user.create')
//
->with('error', 'Data failed to save');
//
}
return
redirect
()
->
route
(
'user.create'
)
->
with
(
'error'
,
'Data failed to save'
);
}
DB
::
commit
();
...
...
@@ -261,7 +261,8 @@ private function generateVa($multipartData)
$client
=
new
Client
();
$options
=
[
'form_params'
=>
[
'credential'
=>
'$2a$08$xSX/XuObiJ3GoJWhjDTyXepT64o1ze.A/.OVYB15uzKW3V7pxgZ6O'
,
// 'credential' => '$2a$08$xSX/XuObiJ3GoJWhjDTyXepT64o1ze.A/.OVYB15uzKW3V7pxgZ6O',
'credential'
=>
'$1$OkLGZt6i$FzuqzUwZ8nNS/xbzyPN/R/'
,
'noid'
=>
$multipartData
[
'noid'
],
'nama'
=>
$multipartData
[
'nama'
],
'tagihan'
=>
$multipartData
[
'tagihan'
],
...
...
This diff is collapsed.
Click to expand it.
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