Skip to content

Commit

Permalink
Fixed subscription process
Browse files Browse the repository at this point in the history
  • Loading branch information
spitfire305 committed Apr 24, 2024
1 parent e3c477e commit f9502e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Services/PayPalService.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function subscribe(string $pledge): void

$sub = new Subscription();
$sub->user_id = $this->user->id; // @phpstan-ignore-line

Check failure on line 91 in app/Services/PayPalService.php

View workflow job for this annotation

GitHub Actions / PHP 8.3

No error to ignore is reported on line 91.
$sub->name = 'kanka'; // @phpstan-ignore-line
$sub->type = 'kanka'; // @phpstan-ignore-line

Check failure on line 92 in app/Services/PayPalService.php

View workflow job for this annotation

GitHub Actions / PHP 8.3

No error to ignore is reported on line 92.
$sub->stripe_id = 'manual_sub_' . uniqid(); // @phpstan-ignore-line

Check failure on line 93 in app/Services/PayPalService.php

View workflow job for this annotation

GitHub Actions / PHP 8.3

No error to ignore is reported on line 93.
$sub->stripe_status = 'canceled'; // @phpstan-ignore-line

Check failure on line 94 in app/Services/PayPalService.php

View workflow job for this annotation

GitHub Actions / PHP 8.3

No error to ignore is reported on line 94.
$sub->stripe_price = 'paypal_' . $this->user->pledge; // @phpstan-ignore-line

Check failure on line 95 in app/Services/PayPalService.php

View workflow job for this annotation

GitHub Actions / PHP 8.3

No error to ignore is reported on line 95.
Expand Down
2 changes: 1 addition & 1 deletion app/Services/SubscriptionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public function sourceCharge(array $payload)

\Laravel\Cashier\Subscription::create([
'user_id' => $this->user->id,
'name' => 'kanka',
'type' => 'kanka',
'stripe_id' => $source->method . '_' . $source->id,
'stripe_status' => 'active',
'stripe_price' => $source->plan(),
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function asUser(bool $subscribed = false): self

$sub = new Subscription();
$sub->user_id = $user->id; // @phpstan-ignore-line
$sub->name = 'kanka'; // @phpstan-ignore-line
$sub->type = 'kanka'; // @phpstan-ignore-line
$sub->stripe_id = 'manual_sub_' . uniqid(); // @phpstan-ignore-line
$sub->stripe_status = 'canceled'; // @phpstan-ignore-line
$sub->stripe_price = 'paypal_' . $user->pledge; // @phpstan-ignore-line
Expand Down

0 comments on commit f9502e4

Please sign in to comment.