Web Vouchers Landing Page
You can retrieve information from the Hypersoft web vouchers and display it on your homepage, for example.
Note: Project work subject to planning
This is an area that requires detailed project planning.
The Hypersoft system is a flexible standard solution that can be used in a variety of configurations. The correct implementation of the functions described here requires specialist expertise and a clear comparison of your requirements and expectations.
Please note that not all Hypersoft employees or partners are trained to the same extent in each of these labelled subject areas.
For this reason, we characterise certain content as "project work requiring planning". We would like to ensure that you contact your Hypersoft sales partner or Hypersoft Support at an early stage in order to carry out the necessary planning and coordination.
This structured approach enables us to carefully analyse your requirements and implement them in a targeted manner.
Further documentation: Vouchers, third-party vouchers - All
If you want to display the status of the current credit balance of web vouchers, we provide you with an interface for this. The sum can also only be displayed after entering a pin, the default is without PIN.
To read the voucher data from the Hypersoft portal and display it on a landing page, the interface is called up with the following URL:
https://myhypersoft.de/mobile-people.aspx?KN=<Customer number>&P=<Password>&GN=<Voucher number>&PIN=<Pin
(But see also: Web voucher URL for status request)
<Customer number> | The customer number of the customer at Hypersoft. This parameter is fixed. |
<Password> | The customer's stored interface password at Hypersoft. This parameter is fixed. |
<voucher number> | The 14-digit number of the voucher to be queried. This number is entered by the customer or passed as a parameter to your landing page. |
<Pin> | The 4-digit PIN of the voucher to be queried. This number is entered by the customer or passed as a parameter to your landing page. The decision whether to use a PIN is a global system setting. |
The interface returns a JSON object with all relevant data for the voucher. A valid URL with your data would be for example:
https://myhypersoft.de/mobile-people.aspx?KN=xxxxxxxxxxx&P=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&GN=49012072574964&PIN=7906
Examples of the landing pages...
https://landingpage-hypersoft.de/
Example with invitation amount:
https://landingpage-hypersoft.de/?HYGS=490100115203445625
Example code...
<?php
echo '<br />';
// Read out transferred voucher number with attached PIN
// either via query or via form
$GNPIN = $_GET['HYGS'];
if ($GNPIN == '') {
$GNPIN = $_POST['HYGS'];
}
// no voucher number handed over?
if ($GNPIN == '') {
// then ask for voucher number
echo '<form method="get">';
echo 'Enter coupon number: <input type="text" name="HYGS"><br>'; echo '<inputtype="submit" value="Query coupon number">'; echo '</form>';
} else {
// Kontostand des gutscheins ausgebenecho 'Gutschein-Nr.: '.$GNPIN.'<br />';// PIN und Gutscheinnummer splitten$PIN = substr($GNPIN, -4);$GN = substr($GNPIN, 0, 14);// feste Daten des Kunden$KN = 'xxkdnrxx';$P = 'xxxxpwxxxxxx';// URL für die Abfrage mit SSL$URL = 'https://myhypersoft.de/mobile-people.aspx?KN='.$KN.'&P='.$P.'&PIN='.$PIN.'&GN='.$GN;//echo '$URL: '.$URL.'<br />';// Daten als JSON abfragen und in ein assoziatives Array dekodieren$seite = file_get_contents($URL);$array = json_decode($seite, true);//var_dump($array);echo '<br />';// nur wenn der Status = OK, dann ist die Abfrage in Ordnung// ansonsten Fehler ausgebenif ($array['Status'] != 'OK') {echo 'Fehler: '.$array['Status'];} else {$Kontostand = number_format($array['Kontostand'], 2);echo 'Kontostand: '.$Kontostand.' EUR';}
}
?>
Further documentation: Web-Vouchers
Register discount cards on your own homepage
If you issue discount cards that are set up to require customers to register for use, you can register from your home page. Input fields and messages are available for this purpose. Example of a blank page with all available fields:
Example...
<?php
echo '<br />';
// Read out transferred voucher number with attached PIN
// either via query or via form
$GNPIN = $_GET['HYGS'];
if ($GNPIN == '') {
$GNPIN = $_POST['HYGS'];
}
// read out the e-mail address transferred
// either via query or via form
$mail = $_GET['mail'];
if ($mail == ''') {
$mail = $_POST['mail'];
}
// no voucher number and no mail?
if (($GNPIN == '') || ($mail == '')) {
// then ask for voucher number
echo '<form method="get">';
echo '<table>';
echo '<tr><td>Enter coupon number:</td><td><input type="text" name="HYGS"></td><tr>';
echo '<tr><td>Enter e-mail address:</td><td><input type="text" name="mail"></td><tr>';
echo '<tr><td>Name:</td><td><input type="text" name="Name"></td><tr>';
echo '<tr><td>firstname:</td><td><input type="text" name="firstname"></td><tr>';
echo '<tr><td>Education:</td><td><input type="text" name="Form of address"></td><tr>';
echo '<tr><td>Street:</td><td><input type="text" name="Street"></td><tr>';
echo '<tr><td>PLZ:</td><td><input type="text" name="PLZ"></td><tr>';
echo '<tr><td>location:</td><td><input type="text" name="location"></td><tr>';
echo '<tr><td>Country:</td><td><input type="text" name="Country"></td><tr>';
echo '<tr><td>Telephone:</td><td><input type="text" name="Telephone"></td><tr>';
echo '</table>';
echo '<br>';
echo '<input type="submit" value="Activate coupon.">';
echo '</form>';
} else {
// Output error or positive message
echo 'coupon no.: '.$GNPIN.'<br />';
echo 'Email address: '.$mail.'<br />';
echo 'Name: '.$_GET['Name'].'<br />';
echo 'First name: '.$_GET['First name'].'<br />';
echo 'Salutation: '.$_GET['Salutation'].'<br />';
echo 'Street: '.$_GET['Street'].'<br />';
echo 'PLZ: '.$_GET['PLZ'].'<br />';
echo 'Location: '.$_GET['Location'].'<br />';
echo 'Land: '.$_GET['Land'].'<br />';
echo 'Phone: '.$_GET['Phone'].'<br />';
$Customer data = urlencode($_GET['Name'].'|'.$_GET['First name'].'|'.$_GET['Salutation'].'|'.$_GET['Street'].'|'.$_GET['Postcode'].'|'.$_GET['City'].'|'.$_GET['Country'].'|'.$_GET['City'].'|'.$_GET['City'].'|'.$_GET['Country'].'|'.$_GET['First name'].'|'.$_GET['City'].'||'.$_GET['City'];
// Split PIN and voucher number
$PIN = substr($GNPIN, -4);
$GN = substr($GNPIN, 0, 14);
// fixed data of the customer
//$KN = 'xxxxx';
$KN = 'yyyyy';
$P = 'Passxyzword';
// URL for the query with SSL
$URL = 'https://myhypersoft.de/mobile-people-special-cards.aspx?KN='.$KN.'&P='.$P.'&PIN='.$PIN.'&GN='.$GN.'&M='.$mail.'&KD='.$Customer data;
//echo '$URL: '.$URL.'<br />';
// Query data as JSON and decode it into an associative array
$page = file_get_contents($URL);
$array = json_decode($page, true);
//var_dump($array);
echo '<br />';
// only if the status = OK, then the query is OK
// otherwise output error
if ($array['Status'] != 'OK') {
echo 'Error: '.$array['Status'];
} else {
echo 'Thank you for your activation!<br />A confirmation email has been sent to the email address you entered. Please confirm the activation link in this email, then you can immediately use the discount voucher.';
}
}
?>
Further documentation:
Back to the parent page: MOBILE PEOPLE connections