33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?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',
|
||
|
|
];
|
||
|
|
}
|