Skip to content

Commit 3bb6e14

Browse files
committed
Fix cancel subscription bug
1 parent b94fc54 commit 3bb6e14

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Http/Controllers/WebhookController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ protected function handleSubscriptionCreate(array $payload): Response
8585
$plan = $data['plan'] ?? null;
8686
if ($plan) {
8787
$subscription = $user->newSubscription($plan['plan_code'], $plan['name']);
88-
$data['id'] = null;
8988

9089
$subscription->add($data);
9190

src/Models/Subscription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function resume(): static
216216
public function asPaystackSubscription(): mixed
217217
{
218218
try {
219-
$subscriptions = PaystackService::customerSubscriptions($this->user->paystack_id);
219+
$subscriptions = PaystackService::customerSubscriptions($this->user->paystack_customer_id);
220220

221221
if (empty($subscriptions)) {
222222
throw new SubscriptionNotFound('The Paystack customer does not have any subscriptions.');

0 commit comments

Comments
 (0)