Developerguide

Page 277

VirtualMerchant Developer Guide

Document #VRM-0002-D

Simple PHP mySQL Configuration Script The following PHP page assumes that a mySQL database named CFG_DB exists with a table titled ELAVON_CFG. This script pulls the merchant information from the database and displays the data to the screen. The purpose of this script is to demonstrate pulling merchant configuration data from a mySQL database and table creation only. Table Creation SQL Script: CREATE TABLE ` ELAVON_CFG ` ( `MERCH_ID` text NOT NULL, `MERCH_USER` text NOT NULL, `MERCH_PIN` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Table Creation PHP Script: $sql = 'CREATE TABLE ` ELAVON_CFG ` (' . ' `MERCH_ID` TEXT NOT NULL, ' . ' `MERCH_USER` TEXT NOT NULL, ' . ' `MERCH_PIN` TEXT NOT NULL' . ' )' . ' TYPE = myisam';

Fields existing in the table are as follows:

Table Population Script INSERT INTO `elavon_cfg` ( `MERCH_ID` , `MERCH_USER` , `MERCH_PIN` ) VALUES ( 'XXXXXX', 'XXXXXX', 'XXXXXX' ); Note: The Values section above containing the XXXXX should be replaced with your actual merchant ID, merchant user, and merchant PIN.

Š Elavon, Incorporated 2014. All Rights Reserved

Page 277 of 289


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.