@@ -27,7 +27,6 @@ class StripeWebhookController extends Controller
|
||||
{
|
||||
// dd("ssssss",$request);
|
||||
Log::info('Stripe Webhook Received= in getWebhook ');
|
||||
Log::info('Stripe Webhook Received: ' . $request->getContent());
|
||||
}
|
||||
public function handleWebhook(Request $request)
|
||||
{
|
||||
@@ -137,6 +136,9 @@ class StripeWebhookController extends Controller
|
||||
$upcoming_invoice = $stripe->invoices->upcoming([
|
||||
'subscription' => $referralUserSubscriptionData->subscription_id, // use retrieved id from subscription
|
||||
]);
|
||||
Log::info("UPCOMING INVOICE");
|
||||
|
||||
Log::info($upcoming_invoice);
|
||||
$referralUserSubscriptionData->current_period_start = date('Y-m-d H:i:s', $SubscriptionObject->current_period_start);
|
||||
$referralUserSubscriptionData->current_period_end = date('Y-m-d H:i:s', $SubscriptionObject->current_period_end);
|
||||
$referralUserSubscriptionData->next_payment_date = date('Y-m-d H:i:s', $upcoming_invoice->next_payment_attempt);
|
||||
|
||||
@@ -11,30 +11,7 @@ class Subscriptions extends Model
|
||||
|
||||
protected $table = 'subscriptions';
|
||||
protected $guarded = [];
|
||||
protected $fillable =
|
||||
[
|
||||
'id',
|
||||
'subscription_product_xid',
|
||||
'iam_principal_xid',
|
||||
'amount',
|
||||
'stripe_customer_id',
|
||||
'payment_intent_id',
|
||||
'payment_intent_client_secret',
|
||||
'subscription_id',
|
||||
'subscription_status',
|
||||
'current_period_start',
|
||||
'current_period_end',
|
||||
'status',
|
||||
'next_payment_date',
|
||||
'is_cancelled_subscription',
|
||||
'cancelled_at',
|
||||
'is_active',
|
||||
'deleted_at',
|
||||
'created_by',
|
||||
'modified_by',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
];
|
||||
|
||||
|
||||
public function subscription()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user