src/icepay_api_webservice.php
public function getPaymentRefunds($paymentID)
    {
        $obj = new stdClass();

        // Must be in specific order for checksum --
        $obj->Secret = $this->getSecretCode();
        $obj->MerchantID = $this->getMerchantID();
        $obj->Timestamp = $this->getTimeStamp();
        $obj->PaymentID = $paymentID;
        // -----------------------------------------  
        // Generate Checksum
        $obj->Checksum = $this->generateChecksum($obj);

        // Ask for getPaymentRefunds and get response
        $result = $this->client->getPaymentRefunds($obj);

        $result = $result->GetPaymentRefundsResult;
        $refunds = isset($result->Refunds->Refund) ? $result->Refunds->Refund : null;

        $obj->Timestamp = $result->Timestamp;

        if (!is_null($refunds)) {
            // Assign all properties of the DayStatistics object as property of mainObject
            $obj = $this->parseForChecksum($obj, $refunds, true, array("RefundID", "DateCreated", "RefundAmount", "RefundCurrency", "Status"));
        }

        // Unset properties for new Checksum
        unset($obj->Checksum);

        // Verify response data by making a new Checksum
        $Checksum = $this->generateChecksum($obj);

        // Compare Checksums
        if ($result->Checksum != $Checksum)
            throw new Exception('Data could not be verified');

        return (!is_null($refunds)) ? $this->forceArray($refunds) : array();
    }
public function getPaymentRefunds($paymentID)
    {
        $obj = new stdClass();

        // Must be in specific order for checksum --
        $obj->Secret = $this->getSecretCode();
        $obj->MerchantID = $this->getMerchantID();
        $obj->Timestamp = $this->getTimeStamp();
        $obj->PaymentID = $paymentID;
        // -----------------------------------------  
        // Generate Checksum
        $obj->Checksum = $this->generateChecksum($obj);

        // Ask for getPaymentRefunds and get response
        $result = $this->client->getPaymentRefunds($obj);

        $result = $result->GetPaymentRefundsResult;
        $refunds = isset($result->Refunds->Refund) ? $result->Refunds->Refund : null;

        $obj->Timestamp = $result->Timestamp;

        if (!is_null($refunds)) {
            // Assign all properties of the DayStatistics object as property of mainObject
            $obj = $this->parseForChecksum($obj, $refunds, true, array("RefundID", "DateCreated", "RefundAmount", "RefundCurrency", "Status"));
        }

        // Unset properties for new Checksum
        unset($obj->Checksum);

        // Verify response data by making a new Checksum
        $Checksum = $this->generateChecksum($obj);

        // Compare Checksums
        if ($result->Checksum != $Checksum)
            throw new Exception('Data could not be verified');

        return (!is_null($refunds)) ? $this->forceArray($refunds) : array();
    }
public function getPaymentRefunds ( $ paymentID ) { $ obj = new stdClass ( ) ; // Must be in specific order for checksum -- $ obj -> Secret = $ this -> getSecretCode ( ) ; $ obj -> MerchantID = $ this -> getMerchantID ( ) ; $ obj -> Timestamp = $ this -> getTimeStamp ( ) ; $ obj -> PaymentID = $ paymentID ; // -----------------------------------------   // Generate Checksum $ obj -> Checksum = $ this -> generateChecksum ( $ obj ) ; // Ask for getPaymentRefunds and get response $ result = $ this -> client -> getPaymentRefunds ( $ obj ) ; $ result = $ result -> GetPaymentRefundsResult ; $ refunds = isset ( $ result -> Refunds -> Refund ) ? $ result -> Refunds -> Refund : null ; $ obj -> Timestamp = $ result -> Timestamp ; if ( ! is_null ( $ refunds ) ) { // Assign all properties of the DayStatistics object as property of mainObject $ obj = $ this -> parseForChecksum ( $ obj , $ refunds , true , array ( "RefundID" , "DateCreated" , "RefundAmount" , "RefundCurrency" , "Status" ) ) ; } // Unset properties for new Checksum unset ( $ obj -> Checksum ) ; // Verify response data by making a new Checksum $ Checksum = $ this -> generateChecksum ( $ obj ) ; // Compare Checksums if ( $ result -> Checksum != $ Checksum ) throw new Exception ( 'Data could not be verified' ) ; return ( ! is_null ( $ refunds ) ) ? $ this -> forceArray ( $ refunds ) : array ( ) ; }
The GetPaymentRefunds web method allows you to query refund request information that belongs to the payment.

@since version 2.1.0
@access public
@param int $paymentID
The GetPaymentRefunds web method allows you to query refund request information that belongs to the payment .