switched to paddle inline checkout, removed paypal and most of stripe. added product sync between app and paddle.
This commit is contained in:
@@ -16,6 +16,7 @@ class PackagePurchase extends Model
|
||||
'tenant_id',
|
||||
'event_id',
|
||||
'package_id',
|
||||
'provider',
|
||||
'provider_id',
|
||||
'price',
|
||||
'type',
|
||||
@@ -78,14 +79,14 @@ class PackagePurchase extends Model
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($purchase) {
|
||||
if (!$purchase->tenant_id) {
|
||||
if (! $purchase->tenant_id) {
|
||||
throw new \Exception('Tenant ID is required for package purchases.');
|
||||
}
|
||||
|
||||
if (!$purchase->purchased_at) {
|
||||
if (! $purchase->purchased_at) {
|
||||
$purchase->purchased_at = now();
|
||||
}
|
||||
$purchase->refunded = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user