PHP Classes
elePHPant
Icontem

File: test/piraeus/index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andreas Kollaros  >  Aktive Merchant  >  test/piraeus/index.php  >  Download  
File: test/piraeus/index.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Aktive Merchant
Common interface to process payments with gateways
Author: By
Last change: Remove Logger. By default no sensitive data should be logged. You should use your favorite logger if you want.
Date: 2 months ago
Size: 944 bytes
 

Contents

Class file image Download
<?php
require_once('../../lib/merchant.php');
require_once(
'../login.php');

Merchant_Billing_Base::mode('test');
try {
 
$gateway = new Merchant_Billing_PiraeusPaycenter( array(
   
'acquire_id' => acquire_id,
   
'merchant_id' => merchant_id,
   
'pos_id' => pos_id,
   
'user' => user,
   
'password' => e_password,
   
'channel_type' => channel_type
 
));

 
$cc = new Merchant_Billing_CreditCard( array(
     
"first_name" => "Test",
     
"last_name" => "User",
     
"number" => "4111111111111111",
     
"month" => "01",
     
"year" => "2011",
     
"verification_value" => "123"
   
)
  );

 
$options = array(
     
'order_id' => $gateway->generate_unique_id()
  );

 
$response = $gateway->purchase('1', $cc, $options);
 
  if (
$response->success() ) {
    echo
'Success Authorize<br />';
    echo
$response->message()."<br />";
  } else {
    echo
$response->message();
  }
} catch (
Exception $e) {
  echo
$e->getMessage();
}
?>