Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions wave/src/Http/Controllers/Billing/Webhooks/PaddleWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ public function handler(Request $request)
{
$event = $request->get('event_type', null);

dump('hit the handler');
dump($event);

dump('request');
dump($request);

Log::info('hit the handler');

switch ($event) {
case 'subscription.canceled':
$this->subscriptionCancelled($request);
Expand All @@ -35,7 +27,6 @@ public function handler(Request $request)
}

return response()->json(['message' => 'Webhook handled successfully'], 200);

}

protected function subscriptionCancelled(Request $request)
Expand Down
4 changes: 0 additions & 4 deletions wave/src/Http/Controllers/Billing/Webhooks/StripeWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public function handler(Request $request)
exit();
}

dump($event->type);

if($event->type == 'checkout.session.completed'
|| $event->type == 'checkout.session.async_payment_succeeded') {
$this->fulfill_checkout($event->data->object->id, $event);
Expand Down Expand Up @@ -131,8 +129,6 @@ public function fulfill_checkout($session_id, $event): void
'status' => 'active',
'seats' => 1
]);

//dump($checkout_session);
}
}
}
2 changes: 1 addition & 1 deletion wave/src/Http/Livewire/Billing/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function verifyPaddleTransaction($transactionId){
$transaction = null;

$response = Http::withToken( config('wave.paddle.api_key') )->get($this->paddle_url . '/transactions/' . $transactionId);
dump($response->body());

if ($response->successful()) {
$resBody = json_decode($response->body());
if (isset($resBody->data->status) && ($resBody->data->status == 'paid' || $resBody->data->status == 'completed' || $resBody->data->status == 'ready')) {
Expand Down
1 change: 0 additions & 1 deletion wave/src/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ public function subscription()

public function switchPlans(Plan $plan){
$this->syncRoles([]);
dump('assigned role: ' . $plan->role->name);
$this->assignRole( $plan->role->name );
}

Expand Down
Loading