Today we talk about how in Magento 2 order PayPal information. In this tutorial, we focus on how to get order PayPal information which includes the PayPal express token and PayPal correlation id. So let start with our example.
[cc lang="php" tab_size="2" lines="40"]
$paymentAdditionalInfo = $order->getPayment()->getAdditionalInformation();
With the heplp of addiotnal information obejct we get paypal expreess token.
$token = $paymentAdditionalInfo['paypal_express_checkout_token'];
With the heplp of addiotnal information obejct we get paypal correlation id.
$correlationId = $paymentAdditionalInfo['paypal_correlation_id'];