Skip to content

Commit

Permalink
code improved
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaz3e committed Nov 25, 2023
1 parent f2085b9 commit 58b1f64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Http/Controllers/User/PeachPaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public function postTransaction(Request $request)
$peachPayment = new PeachPayment();

// Create checkout using the helper
$checkoutId = $peachPayment->createCheckout($amount);
$checkoutData = $peachPayment->createCheckout($amount);

$checkoutId = $checkoutData['checkoutId'];

// Render the payment form
return view('peach-payment::peach-payment.user.post', compact('entityId', 'checkoutId'));
Expand Down
1 change: 0 additions & 1 deletion src/views/peach-payment/user/create.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<form action="{{ route('peachpayment.post') }}" method="get">
@csrf
<input type="text" name="amount" value="10">
<button type="submit">Pay</button>
</form>

0 comments on commit 58b1f64

Please sign in to comment.