fix: old code will display default gold + prices when not set up

This fixes undefined constants problem when a person pulls the new code
but fails to set up prices and gold amounts for PLUS packages.
This commit is contained in:
Martin Ambrus
2017-10-04 09:57:31 +02:00
parent 65fd25e1aa
commit 52c0640b2f
5 changed files with 149 additions and 112 deletions
+29 -22
View File
@@ -100,30 +100,37 @@ $name = $session->uid;
<td class="pic">
<img src="img/bezahlung/paypal.jpg" style="99px; height:99px;" alt="Package A" />
<div>Gold : <?php echo PLUS_PACKAGE_A_GOLD; ?><br />Cost : <?php echo PLUS_PACKAGE_A_PRICE . ' ' . PAYPAL_CURRENCY; ?><br />Wait: 24 hours</div>
<div>
Gold : <?php echo (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : 60); ?>
<br />
Cost : <?php echo (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>
<br />
Wait: 24 hours
</div>
</td>
<td class="desc">Initiate Payment by Paypal <br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<td class="desc">
Initiate Payment by Paypal
<br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo PAYPAL_EMAIL; ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package A Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo str_replace(",", ".", PLUS_PACKAGE_A_PRICE); ?>">
<input type="hidden" name="currency_code" value="<?php echo PAYPAL_CURRENCY; ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package A Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_A_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_A_PRICE) : '1,99'); ?>">
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<br />
More Info about PayPal can be found here: <br />
+29 -22
View File
@@ -98,30 +98,37 @@ $free = $session->uid;
<td class="pic">
<img src="img/bezahlung/paypal.jpg" style="99px; height:99px;" alt="Package B" />
<div>Gold : <?php echo PLUS_PACKAGE_B_GOLD; ?><br />Cost : <?php echo PLUS_PACKAGE_B_PRICE . ' ' . PAYPAL_CURRENCY; ?><br />Wait: 24 hours</div>
<div>
Gold : <?php echo (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : 120); ?>
<br />
Cost : <?php echo (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>
<br />
Wait: 24 hours
</div>
</td>
<td class="desc">Initiate Payment by Paypal <br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<td class="desc">
Initiate Payment by Paypal
<br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo PAYPAL_EMAIL; ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package B Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo str_replace(",", ".", PLUS_PACKAGE_B_PRICE); ?>">
<input type="hidden" name="currency_code" value="<?php echo PAYPAL_CURRENCY; ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package B Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_B_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_B_PRICE) : '4,99'); ?>">
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<br />
More Info about PayPal can be found here: <br />
+31 -23
View File
@@ -98,36 +98,44 @@ $free = $session->uid;
<td class="pic">
<img src="img/bezahlung/paypal.jpg" style="99px; height:99px;" alt="Package C" />
<div>Gold : <?php echo PLUS_PACKAGE_C_GOLD; ?><br />Cost : <?php echo PLUS_PACKAGE_C_PRICE . ' ' . PAYPAL_CURRENCY; ?><br />Wait: 24 hours</div>
<div>
Gold : <?php echo (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : 360); ?>
<br />
Cost : <?php echo (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>
<br />
Wait: 24 hours
</div>
</td>
<td class="desc">Initiate Payment by Paypal <br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<td class="desc">
Initiate Payment by Paypal
<br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo PAYPAL_EMAIL; ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package C Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo str_replace(",", ".", PLUS_PACKAGE_C_PRICE); ?>">
<input type="hidden" name="currency_code" value="<?php echo PAYPAL_CURRENCY; ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package C Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_C_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_C_PRICE) : '9,99'); ?>">
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<br />
More Info about PayPal can be found here: <br />
<a href="#" onclick="window.open('https://www.paypal.com/en/cgi-bin/webscr?cmd=xpt/cps/popup/OLCWhatIsPayPal-outside','external','scrollbars=yes,status=yes,resizable=yes,toolbar=yes,width=800,height=600');return false;">More Info</a>
<br />
</td> </tr>
</td>
</tr>
</tbody>
</table>
<!--
+29 -22
View File
@@ -72,30 +72,37 @@ $free = $session->uid;
<td class="pic">
<img src="img/bezahlung/paypal.jpg" style="99px; height:99px;" alt="Package D" />
<div>Gold : <?php echo PLUS_PACKAGE_D_GOLD; ?><br />Cost : <?php echo PLUS_PACKAGE_D_PRICE . ' ' . PAYPAL_CURRENCY; ?><br />Wait: 24 hours</div>
<div>
Gold : <?php echo (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : 1000); ?>
<br />
Cost : <?php echo (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>
<br />
Wait: 24 hours
</div>
</td>
<td class="desc">Initiate Payment by Paypal <br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<td class="desc">
Initiate Payment by Paypal
<br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo PAYPAL_EMAIL; ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package D Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo str_replace(",", ".", PLUS_PACKAGE_D_PRICE); ?>">
<input type="hidden" name="currency_code" value="<?php echo PAYPAL_CURRENCY; ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package D Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_D_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_D_PRICE) : '19,99'); ?>">
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<br />
More Info about PayPal can be found here: <br />
+31 -23
View File
@@ -43,36 +43,44 @@ $free = $session->uid;
<td class="pic">
<img src="img/bezahlung/paypal.jpg" style="99px; height:99px;" alt="Package E" />
<div>Gold : <?php echo PLUS_PACKAGE_E_GOLD; ?><br />Cost : <?php echo PLUS_PACKAGE_E_PRICE . ' ' . PAYPAL_CURRENCY; ?><br />Wait: 24 hours</div>
<div>
Gold : <?php echo (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : 2000); ?>
<br />
Cost : <?php echo (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>
<br />
Wait: 24 hours
</div>
</td>
<td class="desc">Initiate Payment by Paypal <br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<td class="desc">
Initiate Payment by Paypal
<br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo PAYPAL_EMAIL; ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package E Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo str_replace(",", ".", PLUS_PACKAGE_E_PRICE); ?>">
<input type="hidden" name="currency_code" value="<?php echo PAYPAL_CURRENCY; ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?>">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo SERVER_NAME . ' Package E Gold Pack'; ?>">
<input type="hidden" name="amount" value="<?php echo (defined('PLUS_PACKAGE_E_PRICE') ? str_replace(",", ".", PLUS_PACKAGE_E_PRICE) : '49,99'); ?>">
<input type="hidden" name="currency_code" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png"
alt="Buy Now">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
<br />
More Info about PayPal can be found here: <br />
<a href="#" onclick="window.open('https://www.paypal.com/en/cgi-bin/webscr?cmd=xpt/cps/popup/OLCWhatIsPayPal-outside','external','scrollbars=yes,status=yes,resizable=yes,toolbar=yes,width=800,height=600');return false;">More Info</a>
<br />
</td> </tr>
</td>
</tr>
</tbody>
</table>
<!--