Skip to content

Commit dfbc13e

Browse files
authored
Merge pull request #3 from veeqtoh/v1.0.3
V1.0.3
2 parents 6828393 + 3bb6e14 commit dfbc13e

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ class PaystackEventListener
355355
*/
356356
public function handle(WebhookReceived $event): void
357357
{
358-
if ($event->payload['type'] === 'invoice.payment_failed') {
358+
if ($event->payload['event'] === 'invoice.payment_failed') {
359359
// Handle the incoming event...
360360
}
361361
}

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)