I have developed a PayPal integration for a few clients, one of them, however, is having this problem where the returned amount if off by one cent (short $0.01).
I am using the latest paypal/rest-api-sdk-php
composer packages, and the total to pay that shows up during the PayPal payment steps appears correct. I am getting the paid amount using the following code:
$ppPayId = $_REQUEST['paymentId'];
$payment = PP\Payment::get($ppPayId, $this->apiCtx);
$amount = $payment->transactions[0]->amount->getTotal();
I need some advice on how to troubleshoot this issue further. I am unable to reproduce this in my sandbox environment; it only happens on the customer's live account.