Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
srmklive committed May 12, 2017
1 parent b7d91a6 commit cdde1c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Services/AdaptivePayments.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function setEnvelope()
*/
private function setPayRequestDetails($data)
{
$this->post = $this->setRequestData([
$this->setRequestData([
'actionType' => 'PAY',
'currencyCode' => $this->currency,
'receiverList' => [
Expand All @@ -86,7 +86,9 @@ private function setPayRequestDetails($data)
'cancelUrl' => $data['cancel_url'],
'requestEnvelope' => $this->setEnvelope(),
'feesPayer' => $data['payer'],
])->filter(function ($value, $key) {
]);

$this->post = $this->post->filter(function ($value, $key) {
return (($key === 'feesPayer') && empty($value)) ?: $value;
});
}
Expand Down

0 comments on commit cdde1c0

Please sign in to comment.