Commit db69eb08 by Triyah Fatmawati

Update credential VA

parent 3fa50be4
......@@ -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'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment