Skip to content

Commit 1a92eed

Browse files
committed
Merge branch 'feature/additionalWalletData' into v3
2 parents c5c2eeb + 2954421 commit 1a92eed

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

src/Data/PaymentData/WalletData.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class WalletData extends PaymentData {
2121
protected $walletOwnerFirstName;
2222
/** @var string */
2323
protected $walletOwnerLastName;
24+
/** @var string */
25+
protected $walletOwnerCountryCode;
2426

2527
/**
2628
* @return string
@@ -111,4 +113,20 @@ public function setWalletOwnerLastName($walletOwnerLastName)
111113
$this->walletOwnerLastName = $walletOwnerLastName;
112114
}
113115

116+
/**
117+
* @return string
118+
*/
119+
public function getWalletOwnerCountryCode()
120+
{
121+
return $this->walletOwnerCountryCode;
122+
}
123+
124+
/**
125+
* @param string $walletOwnerCountryCode
126+
*/
127+
public function setWalletOwnerCountryCode($walletOwnerCountryCode)
128+
{
129+
$this->walletOwnerCountryCode = $walletOwnerCountryCode;
130+
}
131+
114132
}

src/Data/Result/WalletData.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ class WalletData extends ResultData {
3535
*/
3636
protected $walletOwnerLastName;
3737

38+
/**
39+
* @var string
40+
*/
41+
protected $walletOwnerCountryCode;
42+
3843
/**
3944
* @return string
4045
*/
@@ -113,6 +118,21 @@ public function setWalletOwnerLastName($walletOwnerLastName)
113118
$this->walletOwnerLastName = $walletOwnerLastName;
114119
}
115120

121+
/**
122+
* @return string
123+
*/
124+
public function getWalletOwnerCountryCode()
125+
{
126+
return $this->walletOwnerCountryCode;
127+
}
128+
129+
/**
130+
* @param string $walletOwnerCountryCode
131+
*/
132+
public function setWalletOwnerCountryCode($walletOwnerCountryCode)
133+
{
134+
$this->walletOwnerCountryCode = $walletOwnerCountryCode;
135+
}
116136

117137
/**
118138
* @return array
@@ -132,6 +152,10 @@ public function toArray() {
132152
$result['walletOwnerLastName'] = $this->walletOwnerLastName;
133153
}
134154

155+
if (!empty($this->walletOwnerCountryCode)) {
156+
$result['walletOwnerCountryCode'] = $this->walletOwnerCountryCode;
157+
}
158+
135159
return $result;
136160
}
137161

src/Json/JsonGenerator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ protected function createPaymentData($paymentData){
474474
if (!empty($paymentData->getWalletOwnerLastName())) {
475475
$data['walletData']['walletOwnerLastName'] = $paymentData->getWalletOwnerLastName();
476476
}
477+
478+
if (!empty($paymentData->getWalletOwnerCountryCode())) {
479+
$data['walletData']['walletOwnerCountryCode'] = $paymentData->getWalletOwnerCountryCode();
480+
}
477481
}
478482

479483
return $data;

src/Json/JsonParser.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ protected function parseReturnData($returnData) {
348348
$walletData->setWalletType($this->arrGet($returnData, 'walletType'));
349349
$walletData->setWalletOwnerFirstName($this->arrGet($returnData, 'walletOwnerFirstName'));
350350
$walletData->setWalletOwnerLastName($this->arrGet($returnData, 'walletOwnerLastName'));
351+
$walletData->setWalletOwnerCountryCode($this->arrGet($returnData, 'walletOwnerCountryCode'));
351352

352353
return $walletData;
353354

src/Xml/Parser.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,9 @@ protected function parseReturnData(\DOMNode $node) {
576576
case 'walletOwnerLastName':
577577
$walletData->setWalletOwnerLastName($child->nodeValue);
578578
break;
579+
case 'walletOwnerCountryCode':
580+
$walletData->setWalletOwnerCountryCode($child->nodeValue);
581+
break;
579582
default:
580583
break;
581584
}

0 commit comments

Comments
 (0)