File: example.php

Recommend this page to a friend!
  Classes of Vinay Yadav  >  skipjack  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Authorization Example
Class: skipjack
Skipjack payment transaction handling class.
Author: By
Last change:
Date: 17 years ago
Size: 1,508 bytes
 

Contents

Class file image Download
<?php
 
/**
  * This script demonstrates the use of skipjack class,
  * for authorization of payments through Skipjack gateway
  *
  * Authorization script
  *
  */
 
require("SkipJack.php");

 
$sk = new SkipJack;

 
/**
  * Set cURL path - default is set to /usr/bin/curl
  */
  //$sk->curlPath = "";

 
$sk->Debug = 0;

 
$postData = array(
                    
'Serialnumber' => "000894011005",
                    
'sjname' => "Vinay",
                    
'Email' => "vinay@sanisoft.com",
                    
'Streetaddress'=>"111111",
                    
'City'=>"Nagpur",
                    
'State'=>"Maharastra",
                    
'Zipcode'=>"44444",
                    
'Ordernumber'=>"123",
                    
'Accountnumber'=>"5499990123456781",
                    
'cvv2'=>"999",
                    
'Month'=>"12",
                    
'Year'=>"2010",
                    
'Transactionamount'=>"50.00",
                    
'Orderstring'=>"1||1||1||~",
                    
'Shiptophone'=>"1234566576"
                  
);

 
$statusArr = $sk->checkAuthorization($postData);

 
$status = $statusArr[0];
 
$statusMsg = $statusArr[1];

  print(
"Returned Status: [$status] $statusMsg");

 
/**
   if $status == 1
        then
            the transaction usccessfully completed
        otherwise
            the value of $status corresponds to the error code supplied by
            Skipjack integration guide.

    Anyway, you can check the error message by using $statusMsg
  */
?>


For more information send a message to info at phpclasses dot org.