debug billplz payment

This commit is contained in:
edmondlang
2023-03-15 19:58:05 +08:00
parent 92b6e6dc3a
commit ef3c738fb1
@@ -50,6 +50,8 @@ class debugBillplzFailedPayment extends Command
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->get(config('billplz.base_url').'/api/v3/bills/'.$transaction->payment_reference);
// dd($response);
// dd($transaction->owner->owner->owner->reference);
if($response->successful()){
$data = $response->json();
@@ -70,6 +72,6 @@ class debugBillplzFailedPayment extends Command
public function returnLog($text, $transaction) {
$approvalStatusArray = ApprovalStatus::APPROVAL_STATUS_ID;
$this->info($text . ' - id: '. $transaction->id . '. Booking Marking: '. $transaction->owner->marking . ' - Date: '.$transaction->created_at->format('d-m-Y').' - Amount: '. $transaction->amount . '. Current Status: ' . $approvalStatusArray[$transaction->status]);
$this->info($text . ' - id: '. $transaction->id . '. Order Marking: '. $transaction->owner->owner->owner->reference . ' - Date: '.$transaction->created_at->format('d-m-Y').' - Amount: '. $transaction->amount . '. Current Status: ' . $approvalStatusArray[$transaction->status]);
}
}