Fix: Stripping Lunar's Stripe Driver with Boboko's Stripe Payment Driver

This commit is contained in:
2026-09-15 21:38:16 +03:00
parent 4489475840
commit 956e9e88a6
8 changed files with 288 additions and 59 deletions
@@ -0,0 +1,32 @@
<?php
namespace Modules\Core\Payment\Models;
use Lunar\Base\BaseModel;
/**
* First-party replacement for Lunar\Stripe\Models\StripePaymentIntent (the
* lunarphp/stripe package was removed — see Modules\Core\Payment\Support\
* StripeManager's own docblock). Same table (lunar_stripe_payment_intents,
* created by database/migrations/..._create_stripe_payment_intents_table,
* a first-party copy of the vendor migration), including the app-owned
* `context`/`payment_type` columns Modules\Core\Payment\Drivers\
* StripePaymentDriver::handleCallback() needs to recover $context/$type
* across the separate request a webhook arrives on — see that class's own
* docblock for "Async resolution".
*
* Extends Lunar\Base\BaseModel (from lunarphp/core, unaffected by removing
* lunarphp/stripe) purely so table-prefix resolution
* (config('lunar.database.table_prefix')) stays identical to how the
* vendor model resolved it — this table was created under that prefix.
*/
class StripePaymentIntent extends BaseModel
{
protected $table = 'stripe_payment_intents';
protected $guarded = [];
protected $casts = [
'context' => 'array',
];
}