Skip to content

Commit

Permalink
Renames to client
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrrill committed Dec 24, 2015
1 parent abeec06 commit f283e6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions lib/Paymill/Models/Request/Checksum.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ class Checksum extends Base
/**
* Client identifier
*
* @var string $_clientId
* @var string $_client
*/
private $_clientId;
private $_client;

/**
* Reusable payment
Expand Down Expand Up @@ -157,9 +157,9 @@ function __construct()
*
* @return $this
*/
public function setClientId($clientId)
public function setClient($client)
{
$this->_clientId = $clientId;
$this->_client = $client;

return $this;
}
Expand All @@ -169,9 +169,9 @@ public function setClientId($clientId)
*
* @return string
*/
public function getClientId()
public function getClient()
{
return $this->_clientId;
return $this->_client;
}

/**
Expand Down Expand Up @@ -683,8 +683,8 @@ public function parameterize($method)
$parameterArray['reusable_payment_description'] = $this->getReusablePaymentDescription();
}

if($this->getClientId()) {
$parameterArray['client_id'] = $this->getClientId();
if($this->getClient()) {
$parameterArray['client'] = $this->getClient();
}

// Unite params:
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/Paymill/Models/Request/ChecksumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function tearDown()
public function setGetTest()
{
$sample = array(
'client_id' => 'client_88a388d9dd48f86c3136',
'client' => 'client_88a388d9dd48f86c3136',
'checksum_type' => Checksum::TYPE_PAYPAL,
'checksum_action' => Checksum::ACTION_TRANSACTION,
'amount' => '200',
Expand Down Expand Up @@ -95,7 +95,7 @@ public function setGetTest()
);

$this->_model
->setClientId($sample['client_id'])
->setClient($sample['client'])
->setChecksumType($sample['checksum_type'])
->setChecksumAction($sample['checksum_action'])
->setAmount($sample['amount'])
Expand All @@ -112,7 +112,7 @@ public function setGetTest()
->setReusablePaymentDescription($sample['reusable_payment_description'])
;

$this->assertEquals($this->_model->getClientId(), $sample['client_id']);
$this->assertEquals($this->_model->getClient(), $sample['client']);
$this->assertEquals($this->_model->getChecksumType(), $sample['checksum_type']);
$this->assertEquals($this->_model->getChecksumAction(), $sample['checksum_action']);
$this->assertEquals($this->_model->getAmount(), $sample['amount']);
Expand Down Expand Up @@ -162,7 +162,7 @@ public function parameterizeTestGetOne(Checksum $model)
public function parameterizeTestCreate(Checksum $model)
{
$parameterArray = array();
$parameterArray['client_id'] = 'client_88a388d9dd48f86c3136';
$parameterArray['client'] = 'client_88a388d9dd48f86c3136';
$parameterArray['checksum_type'] = Checksum::TYPE_PAYPAL;
$parameterArray['checksum_action'] = Checksum::ACTION_TRANSACTION;
$parameterArray['amount'] = '200';
Expand Down

0 comments on commit f283e6f

Please sign in to comment.