-
Notifications
You must be signed in to change notification settings - Fork 12
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 #21 from SPie/request-dcc-parameter
Added DCC Data
- Loading branch information
Showing
6 changed files
with
376 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,231 @@ | ||
<?php | ||
|
||
namespace Ixopay\Client\Data\PaymentData; | ||
|
||
class DccData | ||
{ | ||
/** | ||
* @var bool | ||
*/ | ||
private $requestDcc; | ||
|
||
/** | ||
* @var string|null | ||
*/ | ||
private $remoteIdentifier; | ||
|
||
/** | ||
* @var float|null | ||
*/ | ||
private $originalAmount; | ||
|
||
/** | ||
* @var string|null | ||
*/ | ||
private $originalCurrency; | ||
|
||
/** | ||
* @var float|null | ||
*/ | ||
private $convertedAmount; | ||
|
||
/** | ||
* @var string|null | ||
*/ | ||
private $convertedCurrency; | ||
|
||
/** | ||
* @var float|null | ||
*/ | ||
private $conversionRate; | ||
|
||
/** | ||
* @var float|null | ||
*/ | ||
private $markUp; | ||
|
||
/** | ||
* @var string|null | ||
*/ | ||
private $selectedCurrency; | ||
|
||
/** | ||
* @param bool $requestDcc | ||
* | ||
* @return $this | ||
*/ | ||
public function setRequestDcc($requestDcc) | ||
{ | ||
$this->requestDcc = $requestDcc; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function isRequestDcc() | ||
{ | ||
return $this->requestDcc; | ||
} | ||
|
||
/** | ||
* @param string $remoteIdentifier | ||
* | ||
* @return $this | ||
*/ | ||
public function setRemoteIdentifier($remoteIdentifier) | ||
{ | ||
$this->remoteIdentifier = $remoteIdentifier; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getRemoteIdentifier() | ||
{ | ||
return $this->remoteIdentifier; | ||
} | ||
|
||
/** | ||
* @param float $originalAmount | ||
* | ||
* @return $this | ||
*/ | ||
public function setOriginalAmount($originalAmount) | ||
{ | ||
$this->originalAmount = $originalAmount; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return float|null | ||
*/ | ||
public function getOriginalAmount() | ||
{ | ||
return $this->originalAmount; | ||
} | ||
|
||
/** | ||
* @param string $originalCurrency | ||
* | ||
* @return $this | ||
*/ | ||
public function setOriginalCurrency($originalCurrency) | ||
{ | ||
$this->originalCurrency = $originalCurrency; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getOriginalCurrency() | ||
{ | ||
return $this->originalCurrency; | ||
} | ||
|
||
/** | ||
* @param float $convertedAmount | ||
* | ||
* @return $this | ||
*/ | ||
public function setConvertedAmount($convertedAmount) | ||
{ | ||
$this->convertedAmount = $convertedAmount; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return float|null | ||
*/ | ||
public function getConvertedAmount() | ||
{ | ||
return $this->convertedAmount; | ||
} | ||
|
||
/** | ||
* @param string $convertedCurrency | ||
* | ||
* @return $this | ||
*/ | ||
public function setConvertedCurrency($convertedCurrency) | ||
{ | ||
$this->convertedCurrency = $convertedCurrency; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getConvertedCurrency() | ||
{ | ||
return $this->convertedCurrency; | ||
} | ||
|
||
/** | ||
* @param float $conversionRate | ||
* | ||
* @return $this | ||
*/ | ||
public function setConversionRate($conversionRate) | ||
{ | ||
$this->conversionRate = $conversionRate; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return float|null | ||
*/ | ||
public function getConversionRate() | ||
{ | ||
return $this->conversionRate; | ||
} | ||
|
||
/** | ||
* @param float|null $markUp | ||
* | ||
* @return $this | ||
*/ | ||
public function setMarkUp($markUp) | ||
{ | ||
$this->markUp = $markUp; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return float|null | ||
*/ | ||
public function getMarkUp() | ||
{ | ||
return $this->markUp; | ||
} | ||
|
||
/** | ||
* @param string $selectedCurrency | ||
* | ||
* @return $this | ||
*/ | ||
public function setSelectedCurrency($selectedCurrency) | ||
{ | ||
$this->selectedCurrency = $selectedCurrency; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getSelectedCurrency() | ||
{ | ||
return $this->selectedCurrency; | ||
} | ||
} |
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,32 @@ | ||
<?php | ||
|
||
namespace Ixopay\Client\Transaction\Base; | ||
|
||
use Ixopay\Client\Data\PaymentData\DccData; | ||
|
||
interface DccDataInterface | ||
{ | ||
/** | ||
* @param bool $requestDcc | ||
* | ||
* @return $this | ||
*/ | ||
public function setRequestDcc($requestDcc); | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function getRequestDcc(); | ||
|
||
/** | ||
* @param DccData|null $dccData | ||
* | ||
* @return $this | ||
*/ | ||
public function setDccData($dccData); | ||
|
||
/** | ||
* @return DccData|null | ||
*/ | ||
public function getDccData(); | ||
} |
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,58 @@ | ||
<?php | ||
|
||
namespace Ixopay\Client\Transaction\Base; | ||
|
||
use Ixopay\Client\Data\PaymentData\DccData; | ||
|
||
trait DccDataTrait | ||
{ | ||
/** | ||
* @var bool | ||
*/ | ||
private $requestDcc = false; | ||
|
||
/** | ||
* @var DccData|null | ||
*/ | ||
private $dccData = null; | ||
|
||
/** | ||
* @param bool $requestDcc | ||
* | ||
* @return $this | ||
*/ | ||
public function setRequestDcc($requestDcc) | ||
{ | ||
$this->requestDcc = $requestDcc; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function getRequestDcc() | ||
{ | ||
return $this->requestDcc; | ||
} | ||
|
||
/** | ||
* @param DccData|null $dccData | ||
* | ||
* @return $this | ||
*/ | ||
public function setDccData($dccData) | ||
{ | ||
$this->dccData = $dccData; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return DccData | ||
*/ | ||
public function getDccData() | ||
{ | ||
return $this->dccData; | ||
} | ||
} |
Oops, something went wrong.