/**
 * Retrieves arbitrary fees for the payment
 *
 * @since 1.5
 * @param int $payment_id Payment ID
 * @param string $type Fee type
 * @return mixed array if payment fees found, false otherwise
 */
function edd_get_payment_fees($payment_id = 0, $type = 'all')
{
    $payment = new EDD_Payment($payment_id);
    return $payment->get_fees($type);
}