Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bakura10 committed Feb 19, 2015
1 parent ef9390a commit 0d04d93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* [BC] Set default Stripe API to "2015-02-18" version (note: this version brings several important breaking changes
in how you use Stripe API).
* Fix a bug when changing the API version at runtime did not properly updated the descriptor.

# 2.13.0

Expand Down
2 changes: 2 additions & 0 deletions src/Client/StripeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ public function setApiVersion($version)
$descriptor = __DIR__ . '/ServiceDescription/Stripe-v1.3.php';
}

// Note that we need to recreate a whole new CompositeFactory whenever the version is changed
$this->setCommandFactory(new CompositeFactory());
$this->setDescription(ServiceDescription::factory($descriptor));
}

Expand Down

0 comments on commit 0d04d93

Please sign in to comment.