Skip to content

Commit

Permalink
Merge pull request #704 from laravel/fix-setup-intent
Browse files Browse the repository at this point in the history
[10.0] Fix createSetupIntent
  • Loading branch information
taylorotwell authored Jul 18, 2019
2 parents e8df891 + cf07166 commit 42490cf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/Billable.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,6 @@ public function invoicesIncludingPending(array $parameters = [])
*/
public function createSetupIntent(array $options = [])
{
if ($this->stripe_id) {
$options['customer'] = $this->stripe_id;
}

return StripeSetupIntent::create(
$options, Cashier::stripeOptions()
);
Expand Down
2 changes: 0 additions & 2 deletions tests/Integration/PaymentMethodsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ class PaymentMethodsTest extends IntegrationTestCase
public function test_we_can_start_a_new_setup_intent_session()
{
$user = $this->createCustomer('we_can_start_a_new_setup_intent_session');
$customer = $user->createAsStripeCustomer();

$setupIntent = $user->createSetupIntent();

$this->assertInstanceOf(StripeSetupIntent::class, $setupIntent);
$this->assertEquals($customer->id, $setupIntent->customer);
}

public function test_we_can_add_payment_methods()
Expand Down

0 comments on commit 42490cf

Please sign in to comment.