feat: add item editing preparation and enhance payment intent handling in PurchaseController
This commit is contained in:
@@ -104,6 +104,19 @@ class PurchaseController extends Controller
|
|||||||
Tenant $tenant,
|
Tenant $tenant,
|
||||||
Purchase $compra,
|
Purchase $compra,
|
||||||
CheckoutService $checkoutService,
|
CheckoutService $checkoutService,
|
||||||
|
): PurchaseResource {
|
||||||
|
$compra = $this->resolveScopedPurchase($tenant, $request->user()->id, $compra);
|
||||||
|
|
||||||
|
return PurchaseResource::make(
|
||||||
|
$checkoutService->prepareItemEditing($compra),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function paymentIntent(
|
||||||
|
PaymentIntentRequest $request,
|
||||||
|
Tenant $tenant,
|
||||||
|
Purchase $compra,
|
||||||
|
CheckoutService $checkoutService,
|
||||||
): JsonResponse {
|
): JsonResponse {
|
||||||
$compra = $this->resolveScopedPurchase($tenant, $request->user()->id, $compra);
|
$compra = $this->resolveScopedPurchase($tenant, $request->user()->id, $compra);
|
||||||
$method = $request->validated('method');
|
$method = $request->validated('method');
|
||||||
|
|||||||
Reference in New Issue
Block a user