Skip to content

Commit ff487d9

Browse files
committed
Add addressOverride parameter
1 parent 1a543e9 commit ff487d9

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

src/Omnipay/PayPal/Message/AbstractRequest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ public function setAllowNote($value)
112112
return $this->setParameter('allowNote', $value);
113113
}
114114

115+
public function getAddressOverride()
116+
{
117+
return $this->getParameter('addressOverride');
118+
}
119+
120+
public function setAddressOverride($value)
121+
{
122+
return $this->setParameter('addressOverride', $value);
123+
}
124+
115125
protected function getBaseData($method)
116126
{
117127
$data = array();

src/Omnipay/PayPal/Message/ExpressAuthorizeRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function getData()
2828
$data['BRANDNAME'] = $this->getBrandName();
2929
$data['NOSHIPPING'] = $this->getNoShipping();
3030
$data['ALLOWNOTE'] = $this->getAllowNote();
31+
$data['ADDROVERRIDE'] = $this->getAddressOverride();
3132

3233
$card = $this->getCard();
3334
if ($card) {

tests/Omnipay/PayPal/Message/ExpressAuthorizeRequestTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function testGetDataWithoutCard()
3939
'headerImageUrl' => 'https://www.example.com/header.jpg',
4040
'noShipping' => 0,
4141
'allowNote' => 0,
42+
'addressOverride' => 0,
4243
'brandName' => 'Dunder Mifflin Paper Company, Inc.',
4344
));
4445

@@ -54,6 +55,7 @@ public function testGetDataWithoutCard()
5455
$this->assertSame('https://www.example.com/header.jpg', $data['HDRIMG']);
5556
$this->assertSame(0, $data['NOSHIPPING']);
5657
$this->assertSame(0, $data['ALLOWNOTE']);
58+
$this->assertSame(0, $data['ADDROVERRIDE']);
5759
$this->assertSame('Dunder Mifflin Paper Company, Inc.', $data['BRANDNAME']);
5860
}
5961

@@ -70,6 +72,7 @@ public function testGetDataWithCard()
7072
'headerImageUrl' => 'https://www.example.com/header.jpg',
7173
'noShipping' => 2,
7274
'allowNote' => 1,
75+
'addressOverride' => 1,
7376
'brandName' => 'Dunder Mifflin Paper Company, Inc.',
7477
));
7578

@@ -97,6 +100,7 @@ public function testGetDataWithCard()
97100
'LANDINGPAGE' => null,
98101
'NOSHIPPING' => 2,
99102
'ALLOWNOTE' => 1,
103+
'ADDROVERRIDE' => 1,
100104
'PAYMENTREQUEST_0_AMT' => '10.00',
101105
'PAYMENTREQUEST_0_CURRENCYCODE' => 'AUD',
102106
'PAYMENTREQUEST_0_INVNUM' => '111',

0 commit comments

Comments
 (0)