src/Omnipay/Ecopayz/Message/CompletePurchaseRequest.php
public function createResponse($status, $errorCode, $errorDescription)
    {
        $document = new \DOMDocument('1.0', 'utf-8');
        $document->formatOutput = false;

        $response = $document->appendChild(
            $document->createElement('SVSPurchaseStatusNotificationResponse')
        );

        $result = $response->appendChild(
            $document->createElement('TransactionResult')
        );

        $result->appendChild(
            $document->createElement('Description', $errorDescription)
        );

        $result->appendChild(
            $document->createElement('Code', $errorCode)
        );

        $response->appendChild(
            $document->createElement('Status', $status)
        );

        $authentication = $response->appendChild(
            $document->createElement('Authentication')
        );

        $checksum = $authentication->appendChild(
            $document->createElement('Checksum', $this->getMerchantPassword())
        );

        $checksum->nodeValue = $this->calculateXmlChecksum($document->saveXML());

        return $document->saveXML();
    }
public function createResponse($status, $errorCode, $errorDescription)
    {
        $document = new \DOMDocument('1.0', 'utf-8');
        $document->formatOutput = false;

        $response = $document->appendChild(
            $document->createElement('SVSPurchaseStatusNotificationResponse')
        );

        $result = $response->appendChild(
            $document->createElement('TransactionResult')
        );

        $result->appendChild(
            $document->createElement('Description', $errorDescription)
        );

        $result->appendChild(
            $document->createElement('Code', $errorCode)
        );

        $response->appendChild(
            $document->createElement('Status', $status)
        );

        $authentication = $response->appendChild(
            $document->createElement('Authentication')
        );

        $checksum = $authentication->appendChild(
            $document->createElement('Checksum', $this->getMerchantPassword())
        );

        $checksum->nodeValue = $this->calculateXmlChecksum($document->saveXML());

        return $document->saveXML();
    }
public function createResponse ( $ status , $ errorCode , $ errorDescription ) { $ document = new \ DOMDocument ( '1.0' , 'utf-8' ) ; $ document -> formatOutput = false ; $ response = $ document -> appendChild ( $ document -> createElement ( 'SVSPurchaseStatusNotificationResponse' ) ) ; $ result = $ response -> appendChild ( $ document -> createElement ( 'TransactionResult' ) ) ; $ result -> appendChild ( $ document -> createElement ( 'Description' , $ errorDescription ) ) ; $ result -> appendChild ( $ document -> createElement ( 'Code' , $ errorCode ) ) ; $ response -> appendChild ( $ document -> createElement ( 'Status' , $ status ) ) ; $ authentication = $ response -> appendChild ( $ document -> createElement ( 'Authentication' ) ) ; $ checksum = $ authentication -> appendChild ( $ document -> createElement ( 'Checksum' , $ this -> getMerchantPassword ( ) ) ) ; $ checksum -> nodeValue = $ this -> calculateXmlChecksum ( $ document -> saveXML ( ) ) ; return $ document -> saveXML ( ) ; }
Respond to Ecopayz confirming or rejecting the payment.

One of the following status codes:
- InvalidRequest
- OK
- Confirmed
- Cancelled

@param  string $status           The ecopayz status code
@param  int    $errorCode        The merchant error code
@param  string $errorDescription The merchant error description
@return string response
Respond to Ecopayz confirming or rejecting the payment .