Login   Register  
PHP Classes
elePHPant
Icontem

File: psigate.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Harish Chauhan  >  PSIGate  >  psigate.php  >  Download  
File: psigate.php
Role: Example script
Content type: text/plain
Description: Example
Class: PSIGate
Process payment transactions using PSIGate gateway
Author: By
Last change:
Date: 2005-07-10 21:12
Size: 914 bytes
 

Contents

Class file image Download
<?php
include_once("psigate.inc.php");

$psi=new PSIGate("teststore","psigate1234");

$psi->setCustomerEmail("John@smith.com");
$psi->setCustomerCompany("PSiGate");
$psi->setCustomerAddress("123 Main St.","Apt 6");
$psi->setCustomerCity("Toronto");
$psi->setCustomerState("Ontario");
$psi->setCustomerCountry("Canada");
$psi->setCustomerPhone("416-555-2092");
$psi->setCustomerFax("416-555-2091");
$psi->setCustomerPostcode("L5N2B3");
$psi->setComments("");
$psi->setAmount("10.00");
$psi->setCardHoldersName("John Smith");
$psi->setCardNumber("4111111111111111");
$psi->setCardExpiryMonth("02");
$psi->setCardExpiryYear("08");
$psi->setCardCVN("123");
$psi->setOrderID("1235");

if(
$psi->doPayment() == TRANSACTION_OK)
{
    echo 
"Transaction successful. Auth Code: " $psi->getAuthCode();
}
else
{
    echo 
"Error occurred (".$psi->getError()."): " $psi->getErrorMessage();
}
?>