PHP Classes

File: 2co_ipn.php

Recommend this page to a friend!
  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, and 2CO
Author: By
Last change: N/A
Date: 13 years ago
Size: 513 bytes


Class file image Download

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

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

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

// Specify your authorize login and secret

// Enable test mode if needed

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