コード例 #1
0
    public function testGetNotification()
    {
        $SofortLibNotification = new Notification();
        $statusNotification = '';
        $this->assertFalse($SofortLibNotification->getNotification($statusNotification));
        $statusNotification = '<?xml version="1.0" encoding="UTF-8"?>
<status_notification>
<transaction>1324-1234-5483-4891</transaction>
<time>2010-04-14T19:01:08+02:00</time>
</status_notification>';
        $notification = '1324-1234-5483-4891';
        $this->assertEquals($notification, $SofortLibNotification->getNotification($statusNotification));
        $statusNotification = '<?xml version="1.0" encoding="UTF-8"?>
<status_test>
<transaction>1324-1234-5483-4891</transaction>
<time>2010-04-14T19:01:08+02:00</time>
</status_test>';
        $this->assertFalse($SofortLibNotification->getNotification($statusNotification));
        $statusNotification = '<?xml version="1.0" encoding="UTF-8"?>
<status_notification>
<nontransaction>1324-1234-5483-4891</nontransaction>
<time>2010-04-14T19:01:08+02:00</time>
</status_notification>';
        $this->assertFalse($SofortLibNotification->getNotification($statusNotification));
    }
コード例 #2
0
ファイル: index.php プロジェクト: 117n-n711/pjmgmt
<?php

$base = "../../";
require_once $base . "functions.php";
require_once $base . "loginCheck.php";
header('Content-type: text/html; charset=UTF-8');
$uid = getUid();
$hash = getCookieHash();
checkCookieHash($uid, $hash);
$noti = new Notification();
$data = $noti->getNotification($uid, $hash);
$returndata["data"] = $data;
add_return_data(1, 1, "Notifications Returned.");
コード例 #3
0
function __autoload($classname)
{
    require_once $classname . '.php';
}
$notification = null;
$email = null;
$paswoord = null;
$connection = new PDO('mysql:host=localhost;dbname=opdracht-file-upload', 'root', 'root');
if (User::validate($connection)) {
    header('location: dashboard.php');
} else {
    if (isset($_SESSION['registratie'])) {
        $email = $_SESSION['registratie']['e-mail'];
        $paswoord = $_SESSION['registratie']['paswoord'];
    }
    $notification = Notification::getNotification();
}
// var_dump($_SESSION);
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Registratie - Oplossing Security Login</title>
	<style>
		
		form ul {
			position: relative;
			left: -40px;
		}
コード例 #4
0
ファイル: main.php プロジェクト: jjsub/samesub
} else {
    ?>
<script>
preload_time_passed = 5;
</script>
<?php 
}
?>
<div id="page" class="container" <?php 
echo (Yii::app()->session->get('site_loaded') != "yes" and (strtolower($this->id) == 'site' and strtolower($this->action->Id) == 'index')) ? 'style="display:none;"' : '';
?>
>
	<div id="header" class="bounded">
		<div id="header_top"><?php 
if (strtolower($this->id) != 'site' or strtolower($this->action->Id) != 'index') {
    echo '<a href="' . Yii::app()->createUrl('site/index') . '">LIVE: ' . Notification::getNotification()->live . '</a>';
}
?>
</div>
		<div id="header_middle">
			<div id="logo">SS</div>
			<div id="main_menu">				
					<div class="navigation">
							<?php 
$this->widget('zii.widgets.CMenu', array('items' => array(array('label' => 'Live', 'url' => array('site/index')), array('label' => 'Add Subject', 'url' => array('subject/add')), array('label' => 'History', 'url' => array('subject/index')), array('label' => Yii::app()->user->isGuest ? 'Login' : 'Manage', 'url' => array(Yii::app()->user->isGuest ? 'site/login' : 'subject/manage')))));
?>
					
					</div>
			</div>
		</div>
		<div class="clear_both"></div>
コード例 #5
0
<?php

namespace Sofort\SofortLib;

require __DIR__ . '/../vendor/autoload.php';
// Enter your configuration key.
// You only can create a new configuration key by creating a new Gateway project in your account at sofort.com
$configkey = '12345:123456:edc788a4316ce7e2ac0ede037aa623d7';
// read the notification from php://input  (http://php.net/manual/en/wrappers.php.php)
// this class should be used as a callback function
$SofortLib_Notification = new Notification();
$TestNotification = $SofortLib_Notification->getNotification(file_get_contents('php://input'));
//echo $SofortLib_Notification->getTransactionId();
//echo '<br />';
//echo $SofortLib_Notification->getTime();
//echo '<br />';
$SofortLibTransactionData = new TransactionData($configkey);
// If SofortLib_Notification returns a transaction_id:
$SofortLibTransactionData->addTransaction($TestNotification);
//$SofortLibTransactionData->addTransaction(array('00907-01222-50F00112-D86E', '00907-01222-50EFFC79-7E33'));
//$SofortLibTransactionData->addTransaction(array('00907-37660-51D2CD5E-8182'));
//$SofortLibTransactionData->addTransaction('00907-01222-51ADD8C9-86C8');
// By default without setter Api version 1.0 will be used due to backward compatibility, please set ApiVersion to
// latest version. Please note that the response might have a different structure and values For more details please
// see our Api documentation on https://www.sofort.com/integrationCenter-ger-DE/integration/API-SDK/
$SofortLibTransactionData->setApiVersion('2.0');
//$SofortLibTransactionData->setTime('2012-11-14T18:00+02:00', '2012-12-13T00:00+02:00');
//$SofortLibTransactionData->setNumber(5, 1);
$SofortLibTransactionData->sendRequest();
$output = array();
$methods = array('getAmount' => '', 'getAmountRefunded' => '', 'getCount' => '', 'getPaymentMethod' => '', 'getConsumerProtection' => '', 'getStatus' => '', 'getStatusReason' => '', 'getStatusModifiedTime' => '', 'getLanguageCode' => '', 'getCurrency' => '', 'getTransaction' => '', 'getReason' => array(0, 0), 'getUserVariable' => 0, 'getTime' => '', 'getProjectId' => '', 'getRecipientHolder' => '', 'getRecipientAccountNumber' => '', 'getRecipientBankCode' => '', 'getRecipientCountryCode' => '', 'getRecipientBankName' => '', 'getRecipientBic' => '', 'getRecipientIban' => '', 'getSenderHolder' => '', 'getSenderAccountNumber' => '', 'getSenderBankCode' => '', 'getSenderCountryCode' => '', 'getSenderBankName' => '', 'getSenderBic' => '', 'getSenderIban' => '');
コード例 #6
0
ファイル: bookings.php プロジェクト: Outlaw11A/SDP2015
        $startDate = strtotime($value->starting);
        $endDate = strtotime($value->ending);
        $startTime = date("g:ia", $startDate);
        $endTime = date("g:ia", $endDate);
        $date = date("jS M Y", $startDate) . ': ' . $startTime . ' - ' . $endTime;
        $location = null;
        if ($page['campuses'] != null) {
            foreach ($page['campuses'] as $campus) {
                if ($value->campusID == $campus->id) {
                    $location = $campus->campus;
                }
            }
        }
        // if booking archived field does not have a date
        if ($value->BookingArchived == null && $startDate > $currentTime && $value->canceled === null && $value->attended === null) {
            $page['bookings'][] = ['bookingId' => $value->BookingId, 'workshopId' => $value->workshopID, 'workshopSetId' => $value->WorkShopSetID, 'topic' => $value->topic, 'description' => $value->description, 'date' => $date, 'campus' => $location, 'startDate' => $startDate, 'reminders' => Notification::getNotification($value->BookingId)];
        } elseif ($value->BookingArchived == null && $value->canceled == null && $startDate < $currentTime) {
            $attendance = Attendance::getAttendance($value->BookingId);
            $cutoff = $startDate + 259200;
            if ($cutoff > $currentTime) {
                $cutoff = false;
            } else {
                $cutoff = true;
            }
            $page['pastbookings'][] = ['bookingId' => $value->BookingId, 'workshopId' => $value->workshopID, 'workshopSetId' => $value->WorkShopSetID, 'topic' => $value->topic, 'description' => $value->description, 'date' => $date, 'campus' => $location, 'attendance' => $attendance, 'cutoff' => $cutoff, 'startDate' => $startDate];
        }
    }
    usort($page['bookings'], 'compareStartDate');
    usort($page['pastbookings'], 'compareStartDateReverse');
} else {
    $page['bookings'] = null;