src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerPayPal.class.php
protected static function GetPayPalErrorMessage($aMessageData)
    {
        $aMsg = array();
        if (array_key_exists('curl_error_no', $aMessageData)) {
            $aMsg[] = 'Error Number: '.$aMessageData['curl_error_no'];
            $aMsg[] = 'Error Message: '.$aMessageData['curl_error_msg'];
        } elseif (count($aMessageData) > 0) {
            $aMsg[] = 'Ack: '.$aMessageData['ACK'];
            $aMsg[] = 'Correlation ID: '.$aMessageData['CORRELATIONID'];
            $aMsg[] = 'Version: '.$aMessageData['VERSION'];
            $count = 0;
            while (isset($aMessageData['L_SHORTMESSAGE'.$count])) {
                $aMsg[] = 'Error Number: '.$aMessageData['L_ERRORCODE'.$count];
                $aMsg[] = 'Short Message: '.$aMessageData['L_SHORTMESSAGE'.$count];
                $aMsg[] = 'Long Message: '.$aMessageData['L_LONGMESSAGE'.$count];
                $count = $count + 1;
            }
        } else {
            $aMsg[] = 'Problem communicating with PayPal. See log for details.';
        }
        $sMsg = implode("\n", $aMsg);
        $sMsg = nl2br($sMsg);

        return $sMsg;
    }
protected static function GetPayPalErrorMessage($aMessageData)
    {
        $aMsg = array();
        if (array_key_exists('curl_error_no', $aMessageData)) {
            $aMsg[] = 'Error Number: '.$aMessageData['curl_error_no'];
            $aMsg[] = 'Error Message: '.$aMessageData['curl_error_msg'];
        } elseif (count($aMessageData) > 0) {
            $aMsg[] = 'Ack: '.$aMessageData['ACK'];
            $aMsg[] = 'Correlation ID: '.$aMessageData['CORRELATIONID'];
            $aMsg[] = 'Version: '.$aMessageData['VERSION'];
            $count = 0;
            while (isset($aMessageData['L_SHORTMESSAGE'.$count])) {
                $aMsg[] = 'Error Number: '.$aMessageData['L_ERRORCODE'.$count];
                $aMsg[] = 'Short Message: '.$aMessageData['L_SHORTMESSAGE'.$count];
                $aMsg[] = 'Long Message: '.$aMessageData['L_LONGMESSAGE'.$count];
                $count = $count + 1;
            }
        } else {
            $aMsg[] = 'Problem communicating with PayPal. See log for details.';
        }
        $sMsg = implode("\n", $aMsg);
        $sMsg = nl2br($sMsg);

        return $sMsg;
    }
protected static function GetPayPalErrorMessage ( $ aMessageData ) { $ aMsg = array ( ) ; if ( array_key_exists ( 'curl_error_no' , $ aMessageData ) ) { $ aMsg [ ] = 'Error Number: ' . $ aMessageData [ 'curl_error_no' ] ; $ aMsg [ ] = 'Error Message: ' . $ aMessageData [ 'curl_error_msg' ] ; } elseif ( count ( $ aMessageData ) > 0 ) { $ aMsg [ ] = 'Ack: ' . $ aMessageData [ 'ACK' ] ; $ aMsg [ ] = 'Correlation ID: ' . $ aMessageData [ 'CORRELATIONID' ] ; $ aMsg [ ] = 'Version: ' . $ aMessageData [ 'VERSION' ] ; $ count = 0 ; while ( isset ( $ aMessageData [ 'L_SHORTMESSAGE' . $ count ] ) ) { $ aMsg [ ] = 'Error Number: ' . $ aMessageData [ 'L_ERRORCODE' . $ count ] ; $ aMsg [ ] = 'Short Message: ' . $ aMessageData [ 'L_SHORTMESSAGE' . $ count ] ; $ aMsg [ ] = 'Long Message: ' . $ aMessageData [ 'L_LONGMESSAGE' . $ count ] ; $ count = $ count + 1 ; } } else { $ aMsg [ ] = 'Problem communicating with PayPal. See log for details.' ; } $ sMsg = implode ( "\n" , $ aMsg ) ; $ sMsg = nl2br ( $ sMsg ) ; return $ sMsg ; }
renders a paypal response error message.

@param $aMessageData

@return string
renders a paypal response error message .