Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeoscom committed May 1, 2020
1 parent 4ecac67 commit e64b511
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Message/PaymentIntents/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public function getData()

$data['confirm'] = $this->getConfirm() ? 'true' : 'false';

if ($this->getReturnUrl()) {
if ($this->getConfirm() && !$this->getOffSession()) {
$this->validate('returnUrl');
$data['return_url'] = $this->getReturnUrl();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/PaymentIntents/AuthorizeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testGetData()
$this->assertSame(array('foo' => 'bar'), $data['metadata']);
$this->assertSame(100, $data['application_fee']);
$this->assertSame('off_session', $data['setup_future_usage']);
$this->assertSame(true, $data['off_session']);
$this->assertSame('true', $data['off_session']);
}

/**
Expand Down

0 comments on commit e64b511

Please sign in to comment.