public function getRefundAmountInfo($param){

        $chargeHistory = $this->getChargeHistory($param);
        $charges = $chargeHistory->getCharges();
        $chargesArray = $charges->toArray();
        $totalRefunded = 0;

        foreach($chargesArray as $num => $values) {
            if (in_array(CheckoutApi_Client_Constant::STATUS_CAPTURE,$values)){  
                $capturedAmount = $values[ 'value' ];
            }

            if (in_array(CheckoutApi_Client_Constant::STATUS_REFUND,$values)){  
                    $totalRefunded += $values[ 'value' ];
            }
        }

        $refundInfo = array(
            'capturedAmount' => $capturedAmount,
            'totalRefunded' => $totalRefunded,
            'remainingAmount' => $capturedAmount - $totalRefunded
        );

        return $refundInfo;         
    }
public function getRefundAmountInfo($param){

        $chargeHistory = $this->getChargeHistory($param);
        $charges = $chargeHistory->getCharges();
        $chargesArray = $charges->toArray();
        $totalRefunded = 0;

        foreach($chargesArray as $num => $values) {
            if (in_array(CheckoutApi_Client_Constant::STATUS_CAPTURE,$values)){  
                $capturedAmount = $values[ 'value' ];
            }

            if (in_array(CheckoutApi_Client_Constant::STATUS_REFUND,$values)){  
                    $totalRefunded += $values[ 'value' ];
            }
        }

        $refundInfo = array(
            'capturedAmount' => $capturedAmount,
            'totalRefunded' => $totalRefunded,
            'remainingAmount' => $capturedAmount - $totalRefunded
        );

        return $refundInfo;         
    }
public function getRefundAmountInfo ( $ param ) { $ chargeHistory = $ this -> getChargeHistory ( $ param ) ; $ charges = $ chargeHistory -> getCharges ( ) ; $ chargesArray = $ charges -> toArray ( ) ; $ totalRefunded = 0 ; foreach ( $ chargesArray as $ num => $ values ) { if ( in_array ( CheckoutApi_Client_Constant :: STATUS_CAPTURE , $ values ) ) { $ capturedAmount = $ values [ 'value' ] ; } if ( in_array ( CheckoutApi_Client_Constant :: STATUS_REFUND , $ values ) ) { $ totalRefunded += $ values [ 'value' ] ; } } $ refundInfo = array ( 'capturedAmount' => $ capturedAmount , 'totalRefunded' => $ totalRefunded , 'remainingAmount' => $ capturedAmount - $ totalRefunded ) ; return $ refundInfo ; }
Refund  Info
This method returns the Captured amount, total refunded amount and the amount remaing
to refund

$refundInfo = $Api->getRefundInfo($param);
Refund Info This method returns the Captured amount total refunded amount and the amount remaing to refund