Updates to manual payments processing page

This commit is contained in:
2014-03-06 18:41:39 +11:00
parent 894ab1aba4
commit fec1c040d5
2 changed files with 35 additions and 7 deletions

View File

@@ -114,17 +114,19 @@ function booking_manual_payment_admin_submit($form, &$form_state) {
if ($form_state['values']['payment-type'] != '' && $form_state['values']['payment-custom-amount'] == '0.00')
{
//look up the price relating to the price id selected
$price_query = db_query("SELECT price.booking_price, price.booking_late_price " .
$price_query = db_query("SELECT price.booking_price, price.booking_late_price, price.booking_price_descrip " .
"FROM {booking_price} price " .
"WHERE price.pid = :pid ",
array(':pid' => $form_state['values']['payment-type']))
->fetchObject();
$price = $form_state['values']['booking_earlybird'] == true ? $price_query->booking_price : $price_query->booking_late_price;
$description = $price_query->booking_price_descrip;
}
elseif ($form_state['values']['payment-custom-amount'] != '0.00' && is_numeric($form_state['values']['payment-custom-amount']))
{
$price = $form_state['values']['payment-custom-amount'];
$description = "Custom Amount";
}
else
{
@@ -181,7 +183,7 @@ function booking_manual_payment_admin_submit($form, &$form_state) {
'booking_last_name' => $person->booking_lastname,
'booking_buyer_email' => '',
'booking_payer_status' => '',
'booking_item_name' => '',
'booking_item_name' => $description,
'booking_ipn_track_id' => '',
))
->execute();