-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tom Oram
committed
Nov 21, 2013
1 parent
095796f
commit 1aeaf40
Showing
8 changed files
with
233 additions
and
66 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
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,40 @@ | ||
<?php | ||
|
||
namespace SclZfCartSagepay\Service; | ||
|
||
use SclZfCartSagepay\Encryption\Cipher; | ||
use SclZfCartSagepay\Options\ConnectionOptions; | ||
use SclZfCartSagepay\Service\CryptService; | ||
|
||
class CallbackService | ||
{ | ||
private $cipher; | ||
|
||
private $options; | ||
|
||
private $cryptService; | ||
|
||
/** | ||
* Set collaborator objects. | ||
* | ||
* @param Cipher $cipher | ||
* @param ConnectionOptions $options | ||
* @param CryptService $cryptService | ||
*/ | ||
public function __construct( | ||
Cipher $cipher, | ||
ConnectionOptions $options, | ||
CryptService $cryptService | ||
) { | ||
$this->cipher = $cipher; | ||
$this->options = $options; | ||
$this->cryptService = $cryptService; | ||
} | ||
|
||
public function processResponse($encryptedData) | ||
{ | ||
$data = $this->cipher->decrypt($encryptedData, $this->options->getPassword()); | ||
|
||
var_dump($this->cryptService->processResponseData($data)); | ||
} | ||
} |
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
Oops, something went wrong.