Skip to content

Commit ef0342b

Browse files
committed
fix fresh
1 parent b65e484 commit ef0342b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/HasStripeAccount.php

+4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ public function getStripeAccount(?array $params = [], $opts = null): ?\Stripe\Ac
8989

9090
public function getFreshStripeAccount(?array $params = [], $opts = null): ?\Stripe\Account
9191
{
92+
if (! $this->stripe_account_id) {
93+
return null;
94+
}
95+
9296
$account = $this->stripe()->accounts->retrieve($this->stripe_account_id, $params, $opts);
9397
$this->importFromStripeAccount($account);
9498

src/HasStripeCustomer.php

+4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ public function getStripeCustomer(?array $params = [], $opts = null): ?\Stripe\C
8989

9090
public function getFreshStripeCustomer(?array $params = [], $opts = null): ?\Stripe\Customer
9191
{
92+
if (! $this->stripe_customer_id) {
93+
return null;
94+
}
95+
9296
$customer = $this->stripe()->customers->retrieve($this->stripe_customer_id, $params, $opts);
9397
$this->importFromStripeCustomer($customer);
9498

0 commit comments

Comments
 (0)