예제 #1
0
                $sql_select = "SELECT plFirstName, plSurname, plEmail FROM {$db_prefix}players WHERE plPlayerID = " . $item_number;
                $result = ba_db_query($link, $sql_select);
                $row = ba_db_fetch_assoc($result);
                //Send e-mail
                $sBody = "Your payment for the upcoming event has been received.\n";
                if (PAYPAL_AUTO_MARK_PAID) {
                    $sBody .= "You are now fully booked.\n\n";
                } else {
                    $sBody .= "You will be fully booked once your booking has been confirmed by a system administrator.\n\n";
                }
                $sBody .= "Thank you.\n\n";
                $sBody .= "Player ID: " . PID_PREFIX . sprintf('%03s', $iPlayerID) . "\n";
                $sBody .= "OOC Name: " . $row['plFirstName'] . " " . $row['plSurname'];
                if ($bEmailPaymentReceived) {
                    mail($row['plEmail'], SYSTEM_NAME . ' - payment received', $sBody, "From:" . SYSTEM_NAME . " <" . EVENT_CONTACT_MAIL . ">");
                }
                //Clear any payment requests for this booking
                $sql = "delete from {$db_prefix}paymentrequests where prBookingID = " . $custom;
                $result = ba_db_query($link, $sql);
            }
        } else {
            if (strcmp($res, "INVALID") == 0) {
                // log for manual investigation
                LogError("There was a problem with PayPal payment - PayPal returned 'INVALID' when verifying payment.\n" . "Item name; '{$item_name}'");
                fnMailer("There was a problem with PayPal payment - PayPal returned 'INVALID' when verifying payment." . "Payment will have to be manually processed.\n" . "Item name; '{$item_name}'", True);
            }
        }
    }
    fclose($fp);
}
include 'inc/inc_foot.php';
예제 #2
0
            generatePaypalButton("Event booking - " . $bookinginfo['evEventName'] . " (" . PID_PREFIX . sprintf('%03s', $PLAYER_ID) . ")", $PLAYER_ID, $bookingtotal, $bookinginfo['bkID']);
            echo "</td></tr>";
            echo "<tr><td>Pay another amount:</td><td><input type='text' value='" . $bookingtotal . "' onChange='updatePaypalButton()' id='txtAnotherAmount' class='paypalamount'/>";
            generatePaypalButton("Event booking - " . $bookinginfo['evEventName'] . " (" . PID_PREFIX . sprintf('%03s', $PLAYER_ID) . ") - Partial Payment", $PLAYER_ID, $bookingtotal, $bookinginfo['bkID'], 'anotheramount');
            echo "</td></tr>";
        }
        echo "<tr><td>Request payment by another user:</td><td>";
        echo "<form action='start.php' method='post'><input type=hidden name='hBooking' value='" . $bookinginfo['bkID'] . "' /><input type=text name='txtEmail'/><input type='submit' name='btnSubmit' value='Send Email' /></form>";
        echo "</td></tr>";
        echo "</table>";
    } else {
        echo "<p>Your booking is now complete, as it does not require any payment</p>";
        $bookinginfo['bkDatePaymentConfirmed'] = $today;
    }
} else {
    echo "<p>Your booking has been placed in a queue because {$queuereason}</p>";
    echo "<p>You will be able to pay once it is removed from the queue by an admin.</p>";
    fnMailer("Event booking - " . $eventinfo['evEventName'] . " (" . PID_PREFIX . sprintf('%03s', $PLAYER_ID) . ")\nA booking has been placed in the queue", false);
}
//Save booking info
$sql = "UPDATE {$db_prefix}bookings SET ";
foreach ($bookinginfo as $key => $value) {
    if (!is_numeric($value)) {
        $value = "'" . $value . "'";
    }
    $sql .= "{$key} = {$value},";
}
$sql = substr($sql, 0, -1);
$sql .= " WHERE bkID = " . $bookinginfo['bkID'];
$result = ba_db_query($link, $sql);
include 'inc/inc_foot.php';