diff --git a/booking.install b/booking.install index e08a2ff..5cf3165 100644 --- a/booking.install +++ b/booking.install @@ -784,24 +784,24 @@ function booking_schema() { ); $schema['booking_payment'] = array( 'fields' => array( - 'payid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), - 'booking_person_nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), - 'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), - 'booking_mc_gross' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'), - 'booking_mc_currency' => array('type' => 'varchar', 'length' => '10', 'not null' => FALSE), - 'booking_mc_fee' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'), - 'booking_quantity' => array('type' => 'int', 'length' => 11, 'not null' => FALSE, 'default' => 0), - 'booking_invoice' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE), - 'booking_payer_id' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE), - 'booking_payment_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), - 'booking_payment_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), - 'booking_first_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE), - 'booking_last_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE), - 'booking_buyer_email' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE), - 'booking_payer_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), - 'booking_item_name' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE), - 'booking_ipn_track_id' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE)), - 'primary key' => array('payid'), + 'payid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), + 'booking_person_nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), + 'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), + 'booking_mc_gross' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'), + 'booking_mc_currency' => array('type' => 'varchar', 'length' => '10', 'not null' => FALSE), + 'booking_mc_fee' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'), + 'booking_quantity' => array('type' => 'int', 'length' => 11, 'not null' => FALSE, 'default' => 0), + 'booking_invoice' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE), + 'booking_payer_id' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE), + 'booking_payment_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), + 'booking_payment_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), + 'booking_first_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE), + 'booking_last_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE), + 'booking_buyer_email' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE), + 'booking_payer_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), + 'booking_item_name' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE), + 'booking_ipn_track_id' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE)), + 'primary key' => array('payid'), ); $schema['booking_variety_options'] = array( diff --git a/booking.module b/booking.module index 9f52591..f11afe5 100644 --- a/booking.module +++ b/booking.module @@ -871,7 +871,7 @@ function booking_generate_luckynumbers() { $attendees = $attendee_query->fetchAll(); //assuming there's less than 900 people, generate numbers within that range and shuffle the order - $numbers = range(100,650); + $numbers = range(100,750); shuffle($numbers); foreach ($attendees as $attendee) diff --git a/booking.regn_form.inc b/booking.regn_form.inc index 8546711..2bfdeaf 100644 --- a/booking.regn_form.inc +++ b/booking.regn_form.inc @@ -1291,7 +1291,23 @@ function booking_payment_completed_page() global $event; $output = ""; $return_array = array(); - + /* + $parameters = drupal_get_query_parameters(); + + //check if we got a transaction token from paypal + if (isset($parameters['token'])) { + //check to make sure the value is something we're expecting + $paypal_token = $parameters['token']; + if (! preg_match('/^[0-9A-Fa-f\-]+$/', $paypal_token)) { + //parameter from url is not what we were expecting so ignore it and just use the site-wide tokens for this page + $tokens = booking_define_tokens(); + } + else { + //query the payments table to find the attendee that this paypal token belongs to + + } + } + */ //set the page title $bookingTitle = !empty($event->booking_eventname) ? $event->booking_eventname : 'Event'; drupal_set_title($bookingTitle . ' Registration Completed');