Skip to content

Commit 45050c8

Browse files
committed
Merge branch 'nullfix' of github.com:jamieburchell/omnipay-sagepay into jamieburchell-opayo-urls
2 parents c38e546 + 0e1a215 commit 45050c8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Message/ServerAuthorizeRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function getData()
3838

3939
// Set the profile only if it is LOW (for iframe use) or NORMAL (for full-page redirects)
4040

41-
$profile = strtoupper($this->getProfile());
41+
$profile = strtoupper($this->getProfile() ?? '');
4242

4343
if ($profile === static::PROFILE_NORMAL || $profile === static::PROFILE_LOW) {
4444
$data['Profile'] = $this->getProfile();

src/Message/ServerCompleteAuthorizeRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getData()
6565
{
6666
// The two signatures to compare.
6767
$signature = $this->getSignature();
68-
$VPSSignature = strtolower($this->httpRequest->request->get('VPSSignature'));
68+
$VPSSignature = strtolower($this->httpRequest->request->get('VPSSignature') ?? '');
6969

7070
if ($VPSSignature !== $signature) {
7171
throw new InvalidResponseException;

src/Traits/ServerNotifyTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trait ServerNotifyTrait
1818
*/
1919
public function getSignature()
2020
{
21-
return strtolower($this->getDataItem('VPSSignature'));
21+
return strtolower($this->getDataItem('VPSSignature') ?? '');
2222
}
2323

2424
/**
@@ -56,7 +56,7 @@ public function buildSignature()
5656
$this->getTransactionId(),
5757
$this->getStatus(),
5858
$this->getTxAuthNo(),
59-
strtolower($this->getVendor()),
59+
strtolower($this->getVendor() ?? ''),
6060
$this->getAVSCV2(),
6161
($this->getTxType() === Response::TXTYPE_TOKEN ? $this->getToken() : ''),
6262
// As saved in the merchant application.

0 commit comments

Comments
 (0)