feat: integrate North Embedded Checkout for bidder payments #1

Merged
rlong merged 26 commits from feature/north-embedded-checkout into master 2026-05-01 10:20:22 -04:00
2 changed files with 23 additions and 1 deletions
Showing only changes of commit 68f75ac2fc - Show all commits
@@ -37,9 +37,17 @@ class NorthCheckoutController extends Controller
public function createSession(Request $request, $bidder_id)
{
$bidder = Bidders::findOrFail($bidder_id);
$winnings = WinningBids::where('winning_bidder_num', $bidder->idbidders)->get();
$winnings = WinningBids::with('items')->where('winning_bidder_num', $bidder->idbidders)->get();
$total_cost = $winnings->sum('winning_cost');
$products = $winnings->map(function($winning) {
return [
'name' => $winning->items->item_desc ?? 'Auction Item',
'price' => (float)$winning->winning_cost,
'quantity' => 1
];
})->toArray();
$apiKey = config('services.north.private_api_key');
$checkoutId = config('services.north.checkout_id');
$profileId = config('services.north.profile_id');
@@ -56,6 +64,7 @@ class NorthCheckoutController extends Controller
'checkoutId' => $checkoutId,
'profileId' => $profileId,
'amount' => (float)$total_cost,
'products' => $products,
]);
if ($response->failed()) {
+13
View File
@@ -1,6 +1,19 @@
@extends('layouts.app')
@section('content')
<style>
#checkout-container {
min-height: 600px;
width: 100%;
margin-top: 20px;
}
/* Ensure the iframe inside the container takes full width */
#checkout-container iframe {
width: 100% !important;
min-height: 600px !important;
}
</style>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">