-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from Payum/klarna-checkout
Add Klarna Checkout.
- Loading branch information
Showing
7 changed files
with
93 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace Payum\Core\Request; | ||
|
||
class ResponseInteractiveRequest extends BaseInteractiveRequest | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $content; | ||
|
||
/** | ||
* @param string $content | ||
*/ | ||
public function __construct($content) | ||
{ | ||
$this->content = $content; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getContent() | ||
{ | ||
return $this->content; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
namespace Payum\Core\Tests\Request; | ||
|
||
use Payum\Core\Request\ResponseInteractiveRequest; | ||
|
||
class ResponseInteractiveRequestTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function shouldImplementInteractiveRequestInterface() | ||
{ | ||
$rc = new \ReflectionClass('Payum\Core\Request\ResponseInteractiveRequest'); | ||
|
||
$this->assertTrue($rc->implementsInterface('Payum\Core\Request\InteractiveRequestInterface')); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function couldBeConstructedWithUrlAsArgument() | ||
{ | ||
new ResponseInteractiveRequest('html page'); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function shouldAllowGetUrlSetInConstructor() | ||
{ | ||
$expectedContent = 'html page'; | ||
|
||
$request = new ResponseInteractiveRequest($expectedContent); | ||
|
||
$this->assertEquals($expectedContent, $request->getContent()); | ||
} | ||
} |