lib/recurly/invoice.php
public function refundAmount($amount_in_cents, $refund_method = 'credit_first') {
    $doc = $this->createDocument();

    $root = $doc->appendChild($doc->createElement($this->getNodeName()));
    $root->appendChild($doc->createElement('refund_method', $refund_method));
    $root->appendChild($doc->createElement('amount_in_cents', $amount_in_cents));

    return $this->createRefundInvoice($this->renderXML($doc));
  }
public function refundAmount($amount_in_cents, $refund_method = 'credit_first') {
    $doc = $this->createDocument();

    $root = $doc->appendChild($doc->createElement($this->getNodeName()));
    $root->appendChild($doc->createElement('refund_method', $refund_method));
    $root->appendChild($doc->createElement('amount_in_cents', $amount_in_cents));

    return $this->createRefundInvoice($this->renderXML($doc));
  }
public function refundAmount ( $ amount_in_cents , $ refund_method = 'credit_first' ) { $ doc = $ this -> createDocument ( ) ; $ root = $ doc -> appendChild ( $ doc -> createElement ( $ this -> getNodeName ( ) ) ) ; $ root -> appendChild ( $ doc -> createElement ( 'refund_method' , $ refund_method ) ) ; $ root -> appendChild ( $ doc -> createElement ( 'amount_in_cents' , $ amount_in_cents ) ) ; return $ this -> createRefundInvoice ( $ this -> renderXML ( $ doc ) ) ; }
Refunds an open amount from the invoice and returns a collection of refund invoices
@param int $amount_in_cents amount in cents to refund from this invoice
@param string $refund_method indicates the refund order to apply, valid options: {'credit_first','transaction_first'}, defaults to 'credit_first'
@return object Recurly_Invoice a new refund invoice
@throws Recurly_Error
Refunds an open amount from the invoice and returns a collection of refund invoices