disable default bank for billplz

This commit is contained in:
omair saleh
2021-12-21 20:56:30 +08:00
parent 11fb3a6913
commit 9587653253
2 changed files with 3 additions and 4 deletions
@@ -40,9 +40,7 @@ class CreateBillplzBillLogic extends AbstractControllerLogic
/**
* @param Request $request
* @return JsonResponse
* @throws \App\Classes\Exceptions\AccessForbiddenException
* @throws \App\Classes\Exceptions\MalformedRequestException
* @throws \App\Classes\Exceptions\RequestValidationException
* @throws MalformedRequestException
*/
public function logic(Request $request) : JsonResponse
{
@@ -20,6 +20,7 @@ class CreatesBillplzBill
*/
public function execute(string $name, string $email, string $description, float $amount, string $billNumber, ?string $bankCode = null) {
try{
// config('billplz.maybank')
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->post(config('billplz.base_url').'/api/v3/bills', [
'collection_id' => config('billplz.collection_id'),
'name' => $name,
@@ -29,7 +30,7 @@ class CreatesBillplzBill
'redirect_url' => route('online_payment.redirect'),
'callback_url' => route('api.online_payment.callback'),
'reference_1_label' => 'Bank Code',
'reference_1' => $bankCode ? $bankCode : config('billplz.maybank'),
'reference_1' => $bankCode ? $bankCode : '',
'reference_2_label' => 'Bill Number',
'reference_2' => $billNumber
]);