PHP Classes

File: 2co_start.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Md Emran Hasan  >  Payment Gateway Library  >  2co_start.php  >  Download  
File: 2co_start.php
Role: Example script
Content type: text/plain
Description: 2Checkout (2CO) initiate
Class: Payment Gateway Library
Accept payments with Paypal, and 2CO
Author: By
Last change: N/A
Date: 6 years ago
Size: 663 bytes


Class file image Download

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

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

// Specify your 2CheckOut vendor id
$my2CO->addField('sid', 'YOUR_VENDOR_ID');

// Specify the order information
$my2CO->addField('cart_order_id', rand(1, 100));
$my2CO->addField('total', '9.99');

// Specify the url where will send the IPN
$my2CO->addField('x_Receipt_Link_URL', 'http://YOUR_HOST/payment/twoco_ipn.php');
$my2CO->addField('tco_currency', 'USD');
$my2CO->addField('custom', 'muri');

// Enable test mode if needed

// Let's start the train!