File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ protected function getBaseAuthorizeData()
2626 $ data ['ClientIPAddress ' ] = $ this ->getClientIp ();
2727 $ data ['ApplyAVSCV2 ' ] = $ this ->getApplyAVSCV2 () ?: 0 ;
2828 $ data ['Apply3DSecure ' ] = $ this ->getApply3DSecure () ?: 0 ;
29- $ data ['ReferrerID ' ] = $ this ->getReferrerId ();
29+
30+ if ($ this ->getReferrerId ()) {
31+ $ data ['ReferrerID ' ] = $ this ->getReferrerId ();
32+ }
3033
3134 // billing details
3235 $ data ['BillingFirstnames ' ] = $ card ->getBillingFirstName ();
Original file line number Diff line number Diff line change @@ -52,6 +52,16 @@ public function testGetData()
5252 $ this ->assertSame ('3F7A4119-8671-464F-A091-9E59EB47B80C ' , $ data ['ReferrerID ' ]);
5353 }
5454
55+ public function testGetDataNoReferrerId ()
56+ {
57+ // Default value is equivalent to this:
58+ $ this ->request ->setReferrerId ('' );
59+
60+ $ data = $ this ->request ->getData ();
61+
62+ $ this ->assertArrayNotHasKey ('ReferrerID ' , $ data );
63+ }
64+
5565 public function testGetDataCustomerDetails ()
5666 {
5767 $ card = $ this ->request ->getCard ();
You can’t perform that action at this time.
0 commit comments