Skip to content

Commit 1753433

Browse files
author
mbeech
committed
Update DirectAuthorizeRequest.php
Send empty values for state instead of null
1 parent dcde939 commit 1753433

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Omnipay/SagePay/Message/DirectAuthorizeRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function getBaseAuthorizeData()
3434
$data['BillingAddress2'] = $card->getBillingAddress2();
3535
$data['BillingCity'] = $card->getBillingCity();
3636
$data['BillingPostCode'] = $card->getBillingPostcode();
37-
$data['BillingState'] = $card->getBillingCountry() === 'US' ? $card->getBillingState() : null;
37+
$data['BillingState'] = $card->getBillingCountry() === 'US' ? $card->getBillingState() : '';
3838
$data['BillingCountry'] = $card->getBillingCountry();
3939
$data['BillingPhone'] = $card->getBillingPhone();
4040

@@ -45,7 +45,7 @@ protected function getBaseAuthorizeData()
4545
$data['DeliveryAddress2'] = $card->getShippingAddress2();
4646
$data['DeliveryCity'] = $card->getShippingCity();
4747
$data['DeliveryPostCode'] = $card->getShippingPostcode();
48-
$data['DeliveryState'] = $card->getShippingCountry() === 'US' ? $card->getShippingState() : null;
48+
$data['DeliveryState'] = $card->getShippingCountry() === 'US' ? $card->getShippingState() : '';
4949
$data['DeliveryCountry'] = $card->getShippingCountry();
5050
$data['DeliveryPhone'] = $card->getShippingPhone();
5151
$data['CustomerEMail'] = $card->getEmail();

0 commit comments

Comments
 (0)