Login   Register  
PHP Classes
elePHPant
Icontem

File: 2co_ipn.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Md Emran Hasan  >  Payment Gateway Library  >  2co_ipn.php  >  Download  
File: 2co_ipn.php
Role: Example script
Content type: text/plain
Description: 2Checkout (2CO) IPN
Class: Payment Gateway Library
Accept payments with Paypal, Authorize.net and 2CO
Author: By
Last change: N/A
Date: 2009-03-04 13:02
Size: 513 bytes
 

Contents

Class file image Download
<?php

// Include the paypal library
include_once ('TwoCo.php');

// Create an instance of the authorize.net library
$my2CO = new TwoCo();

// Log the IPN results
$my2CO->ipnLog TRUE;

// Specify your authorize login and secret
$my2CO->setSecret('YOUR_SECRET_KEY');

// Enable test mode if needed
$my2CO->enableTestMode();

// Check validity and write down it
if ($my2CO->validateIpn())
{
    
file_put_contents('2co.txt''SUCCESS');
}
else
{
    
file_put_contents('2co.txt'"FAILURE\n\n" $my2CO->ipnData);
}