Skip to content

Commit

Permalink
Fix cash app payments error
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed Jun 15, 2024
1 parent 912f631 commit a016f92
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/Livewire/OrderPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public function getPaymentDetails($method): array

public function pay()
{
// If the payment method is 'Cash app'
if ($this->payment_method === 'cash_app') {
$this->payment_method = 'cash app';
}

// Implement the payment logic here
$payment = Payment::create([
'order_id' => $this->order->id,
Expand Down
5 changes: 4 additions & 1 deletion app/Models/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ class Payment extends Model
use HasFactory;

protected $fillable = [
'order_id', 'amount', 'payment_method', 'status',
'order_id',
'amount',
'payment_method', //[paypal, cash_app, zelle]
'status',
];

public function order(): BelongsTo
Expand Down
1 change: 0 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
class User extends Authenticatable implements MustVerifyEmail
{
use HasFactory, Notifiable;

/**
* The attributes that are mass assignable.
*
Expand Down
5 changes: 4 additions & 1 deletion resources/views/orders/payment.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class="absolute top-0 right-0 bg-blue-500 text-white p-2 rounded-bl-lg rounded-t
<!-- End We accept -->

<!-- Instructions -->
<h3 class="text-lg font-semibold mb-4">Payment Instructions</h3>
<h3 class="text-lg font-semibold mb-4">
Payment Instructions
</h3>

<ol class="list-decimal list-inside mb-6">
<li>Select your preferred payment method from the dropdown menu below.</li>
<li>Follow the instructions provided for the selected payment method.</li>
Expand Down

0 comments on commit a016f92

Please sign in to comment.