Skip to content

Commit

Permalink
Merge pull request laravel#733 from sdebacker/patch-2
Browse files Browse the repository at this point in the history
[10.0] Allow hasCompletePayment() to check other subscriptions than “default”.
  • Loading branch information
driesvints authored Aug 4, 2019
2 parents 3071d5f + a97655e commit f6acdf4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Billable.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,12 @@ public function subscriptions()
/**
* Determine if the customer's subscription has an incomplete payment.
*
* @param string $subscription
* @return bool
*/
public function hasIncompletePayment()
public function hasIncompletePayment($subscription = 'default')
{
if ($subscription = $this->subscription()) {
if ($subscription = $this->subscription($subscription)) {
return $subscription->hasIncompletePayment();
}

Expand Down

0 comments on commit f6acdf4

Please sign in to comment.