original_string: 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;         
      }
code: 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;         
      }
code_tokens: 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 ; }
docstring: Refund  Info
  This method returns the Captured amount, total refunded amount and the amount remaing
  to refund
  
  $refundInfo = $Api->getRefundInfo($param);
docstring_tokens: Refund Info This method returns the Captured amount total refunded amount and the amount remaing to refund