integrate create billplz bill with create booking payment, and a new billplz callback url

This commit is contained in:
ahmedsophyudden
2021-10-08 10:31:23 +08:00
parent 223caa2c33
commit 7dbe51bda9
3 changed files with 3 additions and 3 deletions
@@ -72,7 +72,7 @@ class CallbackBillplzLogic extends AbstractControllerLogic
$transaction = $this->fetchesTransaction->execute(['payment_reference' => $billplzXSignatureObject->getBillPlzId()]);
if($billPlz->state == 'paid') $this->updatesTransactionStatus->execute($transaction, ApprovalStatus::PENDING_VERIFICATION);
if($billPlz->state == 'paid') $this->updatesTransactionStatus->execute($transaction, ApprovalStatus::APPROVED);
return $this->response(['data' => $billPlz]);
@@ -10,7 +10,7 @@ class CreatesBillplzBill
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(string $name, string $email, string $description, float $amount, string $billNumber, string $bankCode = '') {
public function execute(string $name, string $email, string $description, float $amount, string $billNumber, ?string $bankCode = null) {
try{
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->post(config('billplz.base_url').'/api/v3/bills', [
'collection_id' => config('billplz.collection_id'),
@@ -169,7 +169,7 @@
</div>
</div>
</div>
<div class="row no-margin" :class="[{'bg-complete-light': paymentMethod.name === 'Online Transfer'}, {'text-white': paymentMethod.name === 'Online Transfer'}, {'hover-complete': paymentMethod.name !== 'Online Transfer'}]" @click="updatePaymentType({name: 'Online Transfer', id: 'ot'})">
<div class="row no-margin" :class="[{'bg-complete-light': paymentMethod.name === 'Online Transfer'}, {'text-white': paymentMethod.name === 'Online Transfer'}, {'hover-complete': paymentMethod.name !== 'Online Transfer'}]" @click="updatePaymentType({name: 'Online Transfer', id: 'payment gateway'})">
<div class="col b-b b-grey p-t-10 p-b-10 pointer hover-t-10 p-b-10">
<div class="row align-items-center justify-content-center">
<div class="col">