Skip to content

Commit

Permalink
Fixed CreateCharge to create captured charges by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul committed Dec 22, 2016
1 parent 87684a4 commit f7a1cbb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class Charge
/**
* @var bool
*/
private $captured = false;
private $captured;

public function __construct($id)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/Resource/CreateCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CreateCharge extends AbstractStripeResource
private $currency;

/** @var bool */
private $capture = false;
private $capture = true;

/**
* @param Token|Card|Customer $sourceOrCustomer
Expand Down
1 change: 1 addition & 0 deletions test/Functional/CreateChargeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ private static function assertValidCharge(array $charge)
{
self::assertArrayHasKey('id', $charge);
self::assertTrue(Charge::isValidIdentifier($charge['id']));
self::assertTrue($charge['captured']);
}
}

0 comments on commit f7a1cbb

Please sign in to comment.