Update
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
use App\Helpers\FirstParty\Stripe\StripeHelper;
|
||||
use App\Models\UserUsage;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Laravel\Cashier\Events\WebhookReceived;
|
||||
|
||||
class WatermarkUsageHelper
|
||||
@@ -22,11 +21,11 @@ private static function handleInvoicePaid(WebhookReceived $event)
|
||||
{
|
||||
$object = $event->payload['data']['object'];
|
||||
|
||||
//dump($object);
|
||||
// dump($object);
|
||||
|
||||
$accept_statuses = ['paid', 'partially_paid'];
|
||||
|
||||
if (!in_array($object['status'], $accept_statuses)) {
|
||||
if (! in_array($object['status'], $accept_statuses)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -36,7 +35,7 @@ private static function handleInvoicePaid(WebhookReceived $event)
|
||||
foreach ($object['lines']['data'] as $line_item) {
|
||||
$stripe_price_id = $line_item['pricing']['price_details']['price'];
|
||||
|
||||
//dd($stripe_price_id);
|
||||
// dd($stripe_price_id);
|
||||
|
||||
$subscription_config = PurchaseHelper::getSubscriptionPlanByStripePriceID($stripe_price_id);
|
||||
|
||||
@@ -57,7 +56,7 @@ private static function handleInvoicePaid(WebhookReceived $event)
|
||||
}
|
||||
}
|
||||
|
||||
//dd($subscription_config);
|
||||
// dd($subscription_config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user