CREATE TABLE IF NOT EXISTS `transactionrequests` (
  `PaygateId` varchar(11) NOT NULL,
  `Reference` varchar(80) NOT NULL,
  `Amount` varchar(11) NOT NULL,
  `Currency` char(3) NOT NULL,
  `ReturnURL` varchar(255) NOT NULL,
  `TransactionDate` varchar(19) NOT NULL,
  `EmailAddress` varchar(255) NOT NULL,
  `Checksum` varchar(32) NOT NULL,
  `ClientName` varchar(50) NOT NULL,
  `ContactNumber` varchar(50) NOT NULL,
  `InvoiceNumber` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



CREATE TABLE IF NOT EXISTS `transactionresponses` (
  `PaygateId` varchar(11) NOT NULL,
  `Reference` varchar(80) NOT NULL,
  `TransactionStatus` char(1) NOT NULL,
  `ResultCode` varchar(11) NOT NULL,
  `AuthCode` varchar(10) NOT NULL,
  `Amount` varchar(11) NOT NULL,
  `ResultDescription` varchar(80) NOT NULL,
  `TransactionId` varchar(11) NOT NULL,
  `RiskIndicator` char(2) NOT NULL,
  `Checksum` varchar(32) NOT NULL,
  `ChecksumCalculated` varchar(32) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

ALTER TABLE `transactionrequests`
 ADD PRIMARY KEY (`Reference`);

