From 789aaee722d62bad62f5607367d45147f9b3d8d3 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Wed, 19 Mar 2025 09:54:00 +0500 Subject: [PATCH] wip --- app/Http/Controllers/OnlinePaymentController.php | 2 +- app/Models/Payment/OnlinePaymentHistory.php | 14 +------------- .../VisaMaster/HandlesVisaMasterPayments.php | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/app/Http/Controllers/OnlinePaymentController.php b/app/Http/Controllers/OnlinePaymentController.php index b171d00..262c7c4 100644 --- a/app/Http/Controllers/OnlinePaymentController.php +++ b/app/Http/Controllers/OnlinePaymentController.php @@ -31,7 +31,7 @@ class OnlinePaymentController extends Controller /** @var \App\Models\Branch\Branch */ $bank = $data['bank_branch']; - info([$paymentHistory->api_response]); + info(gettype($paymentHistory->api_response)); // if ($data['success'] && $paymentHistory) { // info(OnlinePaymentRepo::syncWithBilling( diff --git a/app/Models/Payment/OnlinePaymentHistory.php b/app/Models/Payment/OnlinePaymentHistory.php index 4303a44..6400ace 100644 --- a/app/Models/Payment/OnlinePaymentHistory.php +++ b/app/Models/Payment/OnlinePaymentHistory.php @@ -27,7 +27,7 @@ use Illuminate\Database\Eloquent\Model; * @property string $username * @property int $online_paymantable_id * @property string $online_paymantable_type - * @property ?array $api_response + * @property $api_response * @property \Illuminate\Support\Carbon $created_at * @property \Illuminate\Support\Carbon $updated_at */ @@ -41,16 +41,4 @@ class OnlinePaymentHistory extends Model * @var string */ protected $table = 'online_payment_histories'; - - /** - * Get the attributes that should be cast. - * - * @return array - */ - protected function casts(): array - { - return [ - 'api_response' => 'array', - ]; - } } diff --git a/app/Repos/Payment/VisaMaster/HandlesVisaMasterPayments.php b/app/Repos/Payment/VisaMaster/HandlesVisaMasterPayments.php index 83b51d5..84fa557 100644 --- a/app/Repos/Payment/VisaMaster/HandlesVisaMasterPayments.php +++ b/app/Repos/Payment/VisaMaster/HandlesVisaMasterPayments.php @@ -76,7 +76,7 @@ trait HandlesVisaMasterPayments 'paymentStatus' => OnlinePaymentRepo::FAILED, 'cardholderName' => $cardholderName, 'pan' => $cardPan, - 'api_response' => $response->body(), + 'api_response' => $response->json(), ]); return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL);