|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* MIT License |
|
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Yves\Computop\Converter; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\ComputopApiResponseHeaderTransfer; |
|
|
|
|
|
|
11
|
|
|
use Generated\Shared\Transfer\ComputopPayPalInitResponseTransfer; |
|
|
|
|
|
|
12
|
|
|
use SprykerEco\Shared\Computop\Config\ComputopApiConfig; |
|
13
|
|
|
|
|
14
|
|
|
class InitPayPalConverter extends AbstractInitConverter |
|
15
|
|
|
{ |
|
16
|
|
|
/** |
|
17
|
|
|
* @param array $decryptedArray |
|
18
|
|
|
* @param \Generated\Shared\Transfer\ComputopApiResponseHeaderTransfer $header |
|
19
|
|
|
* |
|
20
|
|
|
* @return \Spryker\Shared\Kernel\Transfer\TransferInterface |
|
21
|
|
|
*/ |
|
22
|
|
|
protected function createResponseTransfer(array $decryptedArray, ComputopApiResponseHeaderTransfer $header) |
|
23
|
|
|
{ |
|
24
|
|
|
$responseTransfer = new ComputopPayPalInitResponseTransfer(); |
|
25
|
|
|
$responseTransfer->fromArray($decryptedArray, true); |
|
26
|
|
|
$responseTransfer->setHeader($header); |
|
27
|
|
|
$responseTransfer->setEmail($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::EMAIL)); |
|
28
|
|
|
$responseTransfer->setFirstName($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::FIRST_NAME)); |
|
29
|
|
|
$responseTransfer->setLastName($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::LAST_NAME)); |
|
30
|
|
|
//optional fields |
|
31
|
|
|
$responseTransfer->setTransactionId($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::TRANSACTION_ID)); |
|
32
|
|
|
$responseTransfer->setRefNr($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::REF_NR)); |
|
33
|
|
|
$responseTransfer->setInfoText($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::INFO_TEXT)); |
|
34
|
|
|
$responseTransfer->setBillingAgreementId($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::BILLING_AGREEMENT_ID)); |
|
35
|
|
|
$responseTransfer->setPhone($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::PHONE)); |
|
36
|
|
|
$responseTransfer->setAddressStreet($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::ADDRESS_STREET)); |
|
37
|
|
|
$responseTransfer->setAddressStreet2($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::ADDRESS_STREET2)); |
|
38
|
|
|
$responseTransfer->setAddressCity($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::ADDRESS_CITY)); |
|
39
|
|
|
$responseTransfer->setAddressState($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::ADDRESS_STATE)); |
|
40
|
|
|
$responseTransfer->setAddressZip($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::ADDRESS_ZIP)); |
|
41
|
|
|
$responseTransfer->setBillingAddressCity($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::BILLING_AGREEMENT_ID)); |
|
42
|
|
|
$responseTransfer->setBillingAddressCountryCode($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::BILLING_ADDRESS_COUNTRY_CODE)); |
|
43
|
|
|
$responseTransfer->setBillingAddressState($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::BILLING_ADDRESS_STATE)); |
|
44
|
|
|
$responseTransfer->setBillingAddressStreet($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::BILLING_ADDRESS_STREET)); |
|
45
|
|
|
$responseTransfer->setBillingAddressStreet2($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::BILLING_ADDRESS_STREET2)); |
|
46
|
|
|
$responseTransfer->setBillingAddressZip($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::BILLING_ADDRESS_ZIP)); |
|
47
|
|
|
$responseTransfer->setBillingName($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::BILLING_NAME)); |
|
48
|
|
|
$responseTransfer->setPayerId($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::PAYER_ID)); |
|
49
|
|
|
$responseTransfer->setIsFinancing($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::IS_FINANCING)); |
|
50
|
|
|
$responseTransfer->setFinancingFeeAmount($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::FINANCING_FEE_AMOUNT)); |
|
51
|
|
|
$responseTransfer->setFinancingMonthlyPayment($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::FINANCING_MONTHLY_PAYMENT)); |
|
52
|
|
|
$responseTransfer->setFinancingTerm($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::FINANCING_TERM)); |
|
53
|
|
|
$responseTransfer->setFinancingTotalCost($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::FINANCING_TOTAL_COST)); |
|
54
|
|
|
$responseTransfer->setGrossAmount($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::GROSS_AMOUNT)); |
|
55
|
|
|
$responseTransfer->setFeeAmount($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::FEE_AMOUNT)); |
|
56
|
|
|
$responseTransfer->setSettleAmount($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::SETTLE_AMOUNT)); |
|
57
|
|
|
$responseTransfer->setTaxAmount($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::TAX_AMOUNT)); |
|
58
|
|
|
$responseTransfer->setExchangeRate($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::EXCHANGE_RATE)); |
|
59
|
|
|
$responseTransfer->setMcFee($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::MC_FEE)); |
|
60
|
|
|
$responseTransfer->setMcGross($this->computopApiService->getResponseValue($decryptedArray, ComputopApiConfig::MC_GROSS)); |
|
61
|
|
|
|
|
62
|
|
|
return $responseTransfer; |
|
63
|
|
|
} |
|
64
|
|
|
} |
|
65
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths