subscription page updated
This commit is contained in:
@@ -34,6 +34,7 @@ class StripeWebhookController extends Controller
|
||||
|
||||
// Verify the webhook signature for security
|
||||
$secret = config('constants.subscription.webhook_secret'); // Your webhook secret key
|
||||
|
||||
$payload = $request->getContent();
|
||||
$sigHeader = $request->header('Stripe-Signature');
|
||||
$event = null;
|
||||
@@ -61,7 +62,7 @@ class StripeWebhookController extends Controller
|
||||
|
||||
|
||||
|
||||
|
||||
Log::info("webhook called");
|
||||
$stripe = new \Stripe\StripeClient($stripeSecret);
|
||||
|
||||
if ($event->type === 'checkout.session.completed') {
|
||||
@@ -127,12 +128,12 @@ class StripeWebhookController extends Controller
|
||||
|
||||
|
||||
|
||||
//Log::info('Subscription Taken Successfully by ' . $getCaregiverData->iamprincipal->user_name);
|
||||
Log::info('Subscription Taken Successfully by ');
|
||||
DB::commit();
|
||||
} catch (\Exception $e) {
|
||||
// Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage());
|
||||
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage());
|
||||
// return response()->json(['error' => __('something_went_wrong')], 500);
|
||||
//Log::error('Customer Subscription Checkout session function failed: ' . $e->getMessage());
|
||||
Log::error('Customer Subscription Checkout session function failed: ' . $e->getMessage());
|
||||
DB::rollBack();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user