diff --git a/src/Services/AdaptivePayments.php b/src/Services/AdaptivePayments.php index 5cc07098..1f5f7c0f 100644 --- a/src/Services/AdaptivePayments.php +++ b/src/Services/AdaptivePayments.php @@ -76,7 +76,7 @@ private function setEnvelope() */ private function setPayRequestDetails($data) { - $this->setRequestData([ + $this->post = $this->setRequestData([ 'actionType' => 'PAY', 'currencyCode' => $this->currency, 'receiverList' => [ @@ -86,10 +86,8 @@ private function setPayRequestDetails($data) 'cancelUrl' => $data['cancel_url'], 'requestEnvelope' => $this->setEnvelope(), 'feesPayer' => $data['payer'], - ]); - - $this->post = $this->post->filter(function ($value, $key) { - return (($key === 'feesPayer') && empty($value)) ?: $value; + ])->filter(function ($value, $key) { + return (($key === 'feesPayer') && empty($value)) ? null : $value; }); }