PHP Classes

File: authorize_ipn.php

Recommend this page to a friend!
  Classes of Md Emran Hasan   Payment Gateway Library   authorize_ipn.php   Download  
File: authorize_ipn.php
Role: Example script
Content type: text/plain
Description: Authorize.net IPN
Class: Payment Gateway Library
Accept payments with Paypal, Authorize.net and 2CO
Author: By
Last change: N/A
Date: 15 years ago
Size: 585 bytes
 

Contents

Class file image Download
<?php

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

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

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

// Specify your authorize login and secret
$myAuthorize->setUserInfo('YOUR_LOGIN', 'YOUR_SECRET_KEY');

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

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