PHP Classes

File: authorize_start.php

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


Class file image Download

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

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

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

// Specify the url where will send the user on success/failure
$myAuthorize->addField('x_Receipt_Link_URL', 'http://YOUR_HOST/payment/authorize_success.php');

// Specify the url where will send the IPN
$myAuthorize->addField('x_Relay_URL', 'http://YOUR_HOST/payment/authorize_ipn.php');

// Specify the product information
$myAuthorize->addField('x_Description', 'T-Shirt');
$myAuthorize->addField('x_Amount', '9.99');
$myAuthorize->addField('x_Invoice_num', rand(1, 100));
$myAuthorize->addField('x_Cust_ID', 'muri-khao');

// Enable test mode if needed

// Let's start the train!