File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed
Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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. ' );
You can’t perform that action at this time.
0 commit comments