Skip to content

Commit 4476ce1

Browse files
committed
MAGETWO-56347: [Github] #5788 REST API PayPal does not call setExpressCheckout method
- Fixed duplication of algorithm
1 parent cefb039 commit 4476ce1

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

app/code/Magento/Paypal/Model/Express.php

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -676,28 +676,8 @@ public function assignData(\Magento\Framework\DataObject $data)
676676
return $this;
677677
}
678678

679-
if (!empty($additionalData[ExpressCheckout::PAYMENT_INFO_TRANSPORT_TOKEN])) {
680-
$this->getInfoInstance()
681-
->setAdditionalInformation(
682-
ExpressCheckout::PAYMENT_INFO_TRANSPORT_TOKEN,
683-
$additionalData[ExpressCheckout::PAYMENT_INFO_TRANSPORT_TOKEN]
684-
);
685-
}
686-
687-
if (!empty($additionalData[ExpressCheckout::PAYMENT_INFO_TRANSPORT_PAYER_ID])) {
688-
$this->getInfoInstance()
689-
->setAdditionalInformation(
690-
ExpressCheckout::PAYMENT_INFO_TRANSPORT_PAYER_ID,
691-
$additionalData[ExpressCheckout::PAYMENT_INFO_TRANSPORT_PAYER_ID]
692-
);
693-
}
694-
695-
if (!empty($additionalData[ExpressCheckout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT])) {
696-
$this->getInfoInstance()
697-
->setAdditionalInformation(
698-
ExpressCheckout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT,
699-
$additionalData[ExpressCheckout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT]
700-
);
679+
foreach ($additionalData as $key => $value) {
680+
$this->getInfoInstance()->setAdditionalInformation($key, $value);
701681
}
702682
return $this;
703683
}

0 commit comments

Comments
 (0)