Skip to content

Commit aa6210f

Browse files
committed
Merge pull request #81 from v3labs/express-checkout-subject
Express checkout subject
2 parents 39eec26 + 4909f03 commit aa6210f

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.log
22
.DS_Store
3+
/.idea/
34
/vendor
45
composer.lock
56
composer.phar

src/Omnipay/PayPal/Message/AbstractRequest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ public function setSignature($value)
4949
return $this->setParameter('signature', $value);
5050
}
5151

52+
public function getSubject()
53+
{
54+
return $this->getParameter('subject');
55+
}
56+
57+
public function setSubject($value)
58+
{
59+
return $this->setParameter('subject', $value);
60+
}
61+
5262
public function getSolutionType()
5363
{
5464
return $this->getParameter('solutionType');
@@ -87,6 +97,7 @@ protected function getBaseData($method)
8797
$data['USER'] = $this->getUsername();
8898
$data['PWD'] = $this->getPassword();
8999
$data['SIGNATURE'] = $this->getSignature();
100+
$data['SUBJECT'] = $this->getSubject();
90101

91102
return $data;
92103
}

tests/Omnipay/PayPal/Message/ExpressAuthorizeRequestTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function testGetData()
3939
'returnUrl' => 'https://www.example.com/return',
4040
'cancelUrl' => 'https://www.example.com/cancel',
4141
'notifyUrl' => 'https://www.example.com/notify',
42+
'subject' => '[email protected]',
4243
'headerImageUrl' => 'https://www.example.com/header.jpg',
4344
));
4445

@@ -51,6 +52,7 @@ public function testGetData()
5152
$this->assertSame('https://www.example.com/return', $data['RETURNURL']);
5253
$this->assertSame('https://www.example.com/cancel', $data['CANCELURL']);
5354
$this->assertSame('https://www.example.com/notify', $data['PAYMENTREQUEST_0_NOTIFYURL']);
55+
$this->assertSame('[email protected]', $data['SUBJECT']);
5456
$this->assertSame('https://www.example.com/header.jpg', $data['HDRIMG']);
5557
}
5658

0 commit comments

Comments
 (0)