CREATE TABLE IF NOT EXISTS `{WPDB_PREFIX}tblight_payment_plg_paypal` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `order_id` smallint(5) UNSIGNED DEFAULT NULL,
    `order_number` char(64) DEFAULT NULL,
    `paymentmethod_id` smallint(5) UNSIGNED DEFAULT NULL,
    `payment_name` varchar(5000) DEFAULT NULL,
    `payment_order_total` decimal(15,5) NOT NULL DEFAULT 0.00000,
    `payment_currency` char(3) DEFAULT NULL,
    `cost_per_transaction` decimal(10,2) DEFAULT NULL,
    `cost_percent_total` decimal(10,2) DEFAULT NULL,
    `prepayment_percent` decimal(10,2) DEFAULT NULL,
    `first_payer_refund_percentage` int(11) NOT NULL,
    `paypal_custom` varchar(255) DEFAULT NULL,
    `paypal_response_mc_gross` decimal(10,2) DEFAULT NULL,
    `paypal_response_mc_currency` char(10) DEFAULT NULL,
    `paypal_response_invoice` char(32) DEFAULT NULL,
    `paypal_response_protection_eligibility` char(128) DEFAULT NULL,
    `paypal_response_payer_id` char(13) DEFAULT NULL,
    `paypal_response_tax` decimal(10,2) DEFAULT NULL,
    `paypal_response_payment_date` char(28) DEFAULT NULL,
    `paypal_response_payment_status` char(50) DEFAULT NULL,
    `paypal_response_pending_reason` char(50) DEFAULT NULL,
    `paypal_response_mc_fee` decimal(10,2) DEFAULT NULL,
    `paypal_response_payer_email` char(128) DEFAULT NULL,
    `paypal_response_last_name` char(64) DEFAULT NULL,
    `paypal_response_first_name` char(64) DEFAULT NULL,
    `paypal_response_business` char(128) DEFAULT NULL,
    `paypal_response_receiver_email` char(128) DEFAULT NULL,
    `paypal_response_transaction_subject` char(128) DEFAULT NULL,
    `paypal_response_residence_country` char(2) DEFAULT NULL,
    `paypal_response_txn_id` char(32) DEFAULT NULL,
    `paypal_response_txn_type` char(32) DEFAULT NULL,
    `paypal_response_parent_txn_id` char(32) DEFAULT NULL,
    `paypal_response_case_creation_date` char(32) DEFAULT NULL,
    `paypal_response_case_id` char(32) DEFAULT NULL,
    `paypal_response_case_type` char(32) DEFAULT NULL,
    `paypal_response_reason_code` char(32) DEFAULT NULL,
    `paypalresponse_raw` text DEFAULT NULL,
    `created_on` datetime NOT NULL,
    `created_by` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
    `modified_on` datetime NOT NULL,
    `modified_by` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
    PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Payment Paypal Table';