sitemap  |  contact

Sakic.Net Forum
08 January 2009, 18:12 *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Introducing AJAX Scroller - Joomla News Slider Module: http://www.sakic.net/news/introducing_ajax_scroller/
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Only 10 credits posting to db  (Read 1231 times)
billybojangles
Newbie
*
Posts: 3


View Profile
« on: 12 November 2008, 21:30 »

Hello

I need some help please..  No matter what option I choose from the drop down after the payment is sent via PayPal the user account is ONLY credited 10 vodes.

I noticed right under my amount list that
<input type="hidden" name="item_number" value="1" /> and in the vodes.php I found this

// process the payment

            if ($item_number == 1) {

               // Vodes

               // 10 Euros = 100 vodes
               $credit = ceil($payment_amount)*10;

Am I suppose to change that? or redefine the item_number somehow?


Here is my vodes.html.php

<?php
/**
* @Vodes
* @Copyright (C) 2005 Emir Sakic, http://www.sakic.net
* @All Rights Reserved
*/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

global $vode_config;

class HTML_vodes {

   function header() {
?>

<table class="contentpaneopen">
   <tr>
      <td class="contentheading" width="100%">Buy Credits</td>
   </tr>
</table>
<table class="contentpaneopen">
   <tr>
      <td valign="top">
<?php
   }

   function footer() {
?>
      </td>
   </tr>
</table>
<table border="0" align="center"><tbody><tr><td><p><img src="images/stories/level1.png" border="0" /> </p><p>&nbsp;</p></td><td> </td><td><p><img src="images/stories/level2.png" border="0" /> </p><p>&nbsp;</p></td></tr><tr><td> </td><td> </td><td> </td></tr><tr><td><p><img src="images/stories/level3.png" border="0" /></p><p>&nbsp;</p></td><td> </td><td><p> <img src="images/stories/level4.png" border="0" /></p><p>&nbsp;</p></td></tr></tbody></table>
<?php
   }

   function display_vodes_form($item) {
      global $my, $vode_config;

      echo _VODE_INTRO;
      echo "<br /><br />";

      if (!$my->username) {
         echo "<font color=\"red\"><b>"._VODE_NOT_LOGGED_IN."</b><br />";
         echo _VODE_PAY_INFO;
         echo "</font><br /><br />";
      }
?>
<script language="JavaScript" type="text/javascript">
<!--
function checkform(){
   if ((document.payment.os0.value=='') || (document.payment.os0.value==' ')){
      alert('<?php echo _VODE_USERNAME_EMPTY; ?>');
      return false;
   } else {
      return true;
   }
}
//-->
</script>

<?php
   if ($vode_config->sandbox == 1) {
?>
<form name="payment" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" onsubmit="javascript: return checkform();">
<input type="hidden" name="business" value="<?php echo $vode_config->sandbox_email; ?>" />
<?php
   } else {
?>
<form name="payment" action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="javascript: return checkform();">
<input type="hidden" name="business" value="<?php echo $vode_config->paypal_email; ?>" />
<?php
   }
?>
<b><?php echo _VODE_VODES; ?></b><br />
<br />
<b><?php echo _VODE_AMOUNT; ?>:</b><br />
<select name="amount">
<option value="14.95">14.95 &#36; (15 <?php echo _VODE_VODES; ?>)</option>
<option value="27.95">27.95 &#36; (30 <?php echo _VODE_VODES; ?>)</option>
<option value="0.99">.99 &#36; (50 <?php echo _VODE_VODES; ?>)</option>
<option value="89.95">89.95 &#36; (100 <?php echo _VODE_VODES; ?>)</option>
</select>
<input type="hidden" name="item_number" value="1" />
<input type="hidden" name="item_name" value="Credits" />
<br />
<br />
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="on0" value="username" />
<b><?php echo _VODE_USERNAME_LABEL; ?>:</b><br />
<input type="text" class="inputbox" size="20" name="os0" value="<?php echo $my->username; ?>" /><br />
<small><?php echo _VODE_USERNAME_CHECK; ?></small><br />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="notify_url" value="<?php echo $GLOBALS['mosConfig_live_site']; ?>/index.php?option=com_vodes&task=paypal" />
<input type="hidden" name="return" value="<?php echo $GLOBALS['mosConfig_live_site']; ?>/index.php?option=com_vodes&amp;task=complete" />
<input type="hidden" name="cancel_return" value="<?php echo $GLOBALS['mosConfig_live_site']; ?>/index.php?option=com_vodes&amp;task=cancel" />
<input type="hidden" name="tax" value="0" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="no_shipping" value="1" />
<br />
<input type="image" src="components/com_vodes/images/x-click-but23.gif" border="0" name="submit" alt="Payments with PayPal - it's fast, free and secure!" />
</form>

<?php echo _VODE_FOOTER; ?><br />
<?php
   }

   function display_complete() {
?>
      <p><b><font color="#FF0000"><?php echo _VODE_THANKS; ?></font></b><br />
      <br />
      <?php echo _VODE_COMPLETE; ?></p>
<?php
   }

   function display_cancel() {
?>
      <p><b><font color="#FF0000"><?php echo _VODE_CANCELLED; ?></font></b><br />
      <br />
      <?php echo _VODE_TRY_LATER; ?></p>
<?php
   }

}

?>
Logged
billybojangles
Newbie
*
Posts: 3


View Profile
« Reply #1 on: 17 November 2008, 05:02 »

Wow that's awesome support 4 days and no help!  I'll make sure to promote your product.. 
Logged
rakib
Newbie
*
Posts: 22


View Profile
« Reply #2 on: 16 November 2008, 16:59 »

I guess only changing
Code:
$credit = ceil($payment_amount)*10;
to
$credit = 10;
in vodes.php would suffice.
Logged
Saka
Administrator
Hero Member
*****
Posts: 1,352


View Profile WWW
« Reply #3 on: 19 November 2008, 04:45 »

Wow that's awesome support 4 days and no help!  I'll make sure to promote your product.. 
Remember this is a free component, nobody has any obligation to sit here and answer your questions, especially not about modifying the code.

Rakib, thanks for your answers.
« Last Edit: 19 November 2008, 04:48 by Saka » Logged

Pages: [1]
  Print  
 
Jump to: