hi

 

i have worked on this payment gateway and its similar to any other gateways. 
Using curl.

 

Yes you have to sign up to get sampel code. 

 

from sample code:

 

this is the return data...

if (strlen($SECURE_SECRET) > 0 && $_GET["vpc_TxnResponseCode"] != "7" && 
$_GET["vpc_TxnResponseCode"] != "No Value Returned") {

    $md5HashData = $SECURE_SECRET;

    // sort all the incoming vpc response fields and leave out any with no value
    foreach($_GET as $key => $value) {
        if ($key != "vpc_SecureHash" or strlen($value) > 0) {
            $md5HashData .= $value;
        }
    }

    // Validate the Secure Hash (remember MD5 hashes are not case sensitive)
 // This is just one way of displaying the result of checking the hash.
 // In production, you would work out your own way of presenting the result.
 // The hash check is all about detecting if the data has changed in transit.
    if (strtoupper($vpc_Txn_Secure_Hash) == strtoupper(md5($md5HashData))) {
        // Secure Hash validation succeeded, add a data field to be displayed
        // later.
        $hashValidated = "<FONT 
color='#00AA00'><strong>CORRECT</strong></FONT>";
    } else {
        // Secure Hash validation failed, add a data field to be displayed
        // later.
        $hashValidated = "<FONT color='#FF0066'><strong>INVALID 
HASH</strong></FONT>";
        $errorExists = true;
    }
} else {
    // Secure Hash was not validated, add a data field to be displayed later.
    $hashValidated = "<FONT color='orange'><strong>Not Calculated - No 
'SECURE_SECRET' present.</strong></FONT>";
}

 

function getResponseDescription($responseCode) {

    switch ($responseCode) {
        case "0" : $result = "Transaction Successful"; break;
        case "?" : $result = "Transaction status is unknown"; break;
        case "1" : $result = "Unknown Error"; 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 System 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 (OrderInfo)"; 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;
}

 

Thanks

Mohammed

www.safitech.com


 
> Date: Wed, 1 Apr 2009 14:21:38 +1300
> Subject: [phpug] Re: Looking for anyone who's used ANZ eGate payment processor
> From: [email protected]
> To: [email protected]
> 
> 
> Hi,
> 
> As long as this is a live interface to process a credit card, nearly
> all payment processors work the same way. You post some XML data to
> them and they return XML with "yes" or "no" and an error message. You
> should be able to plan the cost based on this.
> 
> HTH,
> Kind Regards,
> 
> Jochen Daum
> 
> Chief Automation Officer
> Automatem Ltd
> 
> Phone: 09 630 3425
> Mobile: 021 567 853
> Email: [email protected]
> Skype: jochendaum
> Website: www.automatem.co.nz
> 
> 
> 
> On Wed, Apr 1, 2009 at 2:10 PM, Tim Oliver <[email protected]> wrote:
> >
> > Anyone know anything about 'ANZ eGate Server Hosted' as seen here?
> >
> > http://www.eftpos.co.nz/cms_display.php?sn=96&st=1&pg=3091
> >
> > I'm guessing it's similar to DPS's PX Pay, but it appears that you have
> > to sign up for it before you have access to any technical info, so it's
> > tricky to plan work for.
> >
> > thanks,
> >
> > --
> > Tim Oliver
> > Software Engineer
> >
> > 160 Cashel Street (Level 2)
> > PO Box 22 128  Christchurch  New Zealand
> > P +64 3 377 0007  F +64 3 377 6582
> > E [email protected]
> >
> > www.e2media.co.nz
> >
> >
> > >
> >
> 
> > 

_________________________________________________________________
Who's buying you chocolate this easter? Find someone to be sweet to you at 
Match.com 
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Enz%2Emsn%2Ecom%2Fchannel%2Findex%2Easpx%3Ftrackingid%3D1048628&_t=773568480&_r=nzWINDOWSliveMAILemailTAGLINES&_m=EXT
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to