Get refunded transaction-fee in webhook

Martho
Contributor
Contributor

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.

 

 

 

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.