cancel
Showing results for 
Search instead for 
Did you mean: 

Get refunded transaction-fee in webhook

Highlighted
Contributor

Get refunded transaction-fee in webhook

Hello,

 

I'm using the PHP-SDK. I'm hooking into PAYMENT.SALE.REFUNDED. What I want to get is the refunded transactionfee for this refund. I found RefundDetail::getRefundFromTransactionFee, but how do I get a RefundDetail-Object? My code is like:

 

$resource = $webhookEvent->getResource();
$Refund = \Paypal\Api\Refund::get($resource->id, $api);

So I got an instance of \Paypal\Api\Refund but NOT an instance of \Paypal\Api\RefundDetail.