def METHOD_NAME(self, refund):
    (trans, reason) = self._find_invoice_transaction(refund.invoice)
    if not trans:
        raise Exception(reason)
    api = PaypalAPI(self)
    refund.payment_reference = api.refund_transaction(
        trans.paypaltransid,
        refund.fullamount,
        refund.fullamount == refund.invoice.total_amount,
        '{0} refund {1}'.format(settings.ORG_SHORTNAME, refund.id),
    )
    # At this point, we succeeded. Anything that failed will bubble
    # up as an exception.
    return True