Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   PayPal Buttons in facebook (http://www.go4expert.com/forums/paypal-buttons-facebook-t21740/)

bikerboy 13Apr2010 08:20

PayPal Buttons in facebook
 
Hi Everyone,

I was wondering if any buddy new how to add PayPal payment buttons in a facebook app.I try adding it but it will only go back to the same page the button was on.

Thanks very much in advance.

shabbir 13Apr2010 08:33

Re: PayPal Buttons in facebook
 
It is same as any other page.

bikerboy 13Apr2010 08:37

Re: PayPal Buttons in facebook
 
nope i thought so to when i add it to fvace book page it opens the same page im on in facebook dont go to paypal

shabbir 13Apr2010 09:10

Re: PayPal Buttons in facebook
 
Just make sure you have target="_blank" in the link and it will open in new tab

bikerboy 13Apr2010 09:31

Re: PayPal Buttons in facebook
 
That did not work either still went back to the same page i was on.

Would you like me to post the page that im working on so you can see if there is something stoping it?

Thanks

bikerboy 13Apr2010 10:07

Re: PayPal Buttons in facebook
 
Ok i did figure out that it has something to do with the page im not sure what but it does work on a couple other pages but i need it to work on this one any help would be great thanks in advance.

Here is the page
PHP Code:

  <?php
 
include("includes/config.php");
 include(
"includes/process.php");
 include(
"css/stylesheet.php");
?>
 
<title><?php echo($application_name)?></title>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><?php include("header.php"); ?></td>
  </tr>
  <tr>
    <td></td>
  </tr>
</table>
<TABLE class=infobox cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <TD class=headerbar colSpan=2>THE GODFATHER </TD></TR>
  <TR>
    <TD style="VERTICAL-ALIGN: top" class=picturebox>&nbsp;</TD>
    <TD style="PADDING-RIGHT: 30px; VERTICAL-ALIGN: top"><?php
 
if($error!="")
 {
 
?><?php echo $err ErrorMessage($error);?> <?php
 
}
 
?></TD>
  </TR>
  <TR>
    <TD style="VERTICAL-ALIGN: top" class=picturebox>&nbsp;</TD>
    <TD style="PADDING-RIGHT: 30px; VERTICAL-ALIGN: top"> <?php
  
echo '<form id="OfferForm" name="OfferForm" method="post" action="">
    <input type="hidden" name="OfferPage"  id="OfferPage" value="1" />
    <input type="hidden" name="OfferOperation"  id="OfferOperation" value="" />
    <input name="HealOption"  id="HealOption" type="hidden" value="" />
    <input type="hidden" name="OfferCash"  id="OfferCash" value="'
.($appSetting["offer_cash_offer_per_level"]*$user["level"]).'" />
'
;
  
?></TD>
  </TR>
  <TR>
    <TD style="VERTICAL-ALIGN: top" class=picturebox>&nbsp;</TD>
    <TD style="PADDING-RIGHT: 30px; VERTICAL-ALIGN: top">
      <DIV style="FONT-SIZE: 16px; FONT-WEIGHT: bold">You have (<?php echo $user["king_author_points"]?> 
<?php echo($favorpoints_name)?>) favor points 
      to spend </DIV>
      <P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px; FONT-SIZE: 12px">The 
      Godfather can give you refills and upgrades in exchange for favor points. 
      Get favor points by completing the offers below. </P>
      <TABLE style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 10px" 
      class="skillstable rewardtable" cellSpacing=0 cellPadding=0 
        width="96%">
        <TBODY>
        
        
        <TR>
          <TD width="58%" noWrap class=label>ENERGY REFILL <?php echo $appSetting["offer_point_for_heal"];?> <?php echo($favorpoints_name)?>.</TD>
          <TD width="42%"><?php
    
  
    
if($user["king_author_points"]>=$appSetting["offer_point_for_heal"])
 {
$disable='';}else{$disable 'disabled="disabled"';} 
    
    
    echo 
'<input name="SubmitOfferHeal" id="SubmitOfferHeal" onClick="document.getElementById(\'OfferOperation\').setValue(\'Heal\');document.getElementById(\'HealOption\').setValue(\'Energy\');" type="submit"  '.$disable.' value="Accept for '.$appSetting["offer_point_for_heal"].' '.$favorpoints_name.'!" />';
    
?></TD>
        </TR>
        <TR>
          <TD class=label noWrap>STAMINA REFILL <?php echo $appSetting["offer_point_for_heal"];?> <?php echo($favorpoints_name)?></TD>
          <TD><SPAN style="FONT-SIZE: 13px"><?php
    
if($user["king_author_points"]>=$appSetting["offer_point_for_heal"])
 {
$disable='';}else{$disable 'disabled="disabled"';}     
    
    echo 
'<input name="SubmitOfferHealStamina" id="SubmitOfferHealStamina" onClick="document.getElementById(\'OfferOperation\').setValue(\'Heal\');document.getElementById(\'HealOption\').setValue(\'Stemina\');" type="submit"  '.$disable.' value="Accept for '.$appSetting["offer_point_for_heal"].' '.$favorpoints_name.'!" />';
    
?></TD></TR>
        <TR>
          <TD class=label noWrap>HEALTH REFILL <?php echo $appSetting["offer_point_for_heal"];?> <?php echo($favorpoints_name)?></TD>
          <TD><?php
        
if($user["king_author_points"]>=$appSetting["offer_point_for_heal"])
 {
$disable='';}else{$disable 'disabled="disabled"';}     
    
    echo 
'<input name="SubmitOfferHealHealth" id="SubmitOfferHealHealth" onClick="document.getElementById(\'OfferOperation\').setValue(\'Heal\');document.getElementById(\'HealOption\').setValue(\'Health\');" type="submit"  '.$disable.' value="Accept for '.$appSetting["offer_point_for_heal"].' '.$favorpoints_name.'!" />';
    
?></TD></TR>
        <TR>
          <TD class=label noWrap>$<?php echo number_format(($appSetting["offer_cash_offer_per_level"]*$user["level"]), 0'.'',');?> MORE MONEY FOR <?php echo $appSetting["offer_point_for_heal"];?> 
                        <?php echo($favorpoints_name)?>.</TD>
          <TD><?php
    
if($user["king_author_points"]>=$appSetting["offer_point_for_cash"])
  {
$disable='';}else{$disable 'disabled="disabled"';} 
 
    
    echo 
'<input name="SubmitOfferCash" id="SubmitOfferCash" type="submit" '.$disable.' onclick="document.getElementById(\'OfferOperation\').setValue(\'Cash\');" value="Accept for '.$appSetting["offer_point_for_cash"].' '.$favorpoints_name.'!" />';
    
?></TD>
        </TR>
        <TR>
          <TD class=label noWrap>(1) MORE FAMILY MEMBER <?php echo($favorpoints_name)?></TD>
          <TD> <?php
    
if($user["king_author_points"]>=$appSetting["offer_point_for_member"])
  {
$disable='';}else{$disable 'disabled="disabled"';}  
    
    echo 
'<input name="SubmitOfferMember" id="SubmitOfferMember" type="submit" '.$disable.' onclick="document.getElementById(\'OfferOperation\').setValue(\'Member\');" value="Accept for '.$appSetting["offer_point_for_member"].' '.$favorpoints_name.'!" />';
    
?></TD>
        </TR>
        <TR>
          <TD class=label noWrap>OFFERS YOU TO LEVEL UP <?php echo $appSetting["offer_point_for_level_up"];?> <?php echo($favorpoints_name)?>.</TD>
          <TD> <?php
    
if($user["king_author_points"]>=$appSetting["offer_point_for_level_up"])
 {
$disable='';}else{$disable 'disabled="disabled"';}     
    
    echo 
'<input name="SubmitOfferHealLevel" id="SubmitOfferHealLevel" onClick="document.getElementById(\'OfferOperation\').setValue(\'LevelUp\');document.getElementById(\'HealOption\').setValue(\'Level Up\');" type="submit"  '.$disable.' value="Accept for '$appSetting["offer_point_for_level_up"].' '.$favorpoints_name.'!" />';
    
?></TD>
        </TR>
        <TR>
          <TD class=label noWrap> INCREASE YOUR ENEGY LEVEL BY 1 FOR <?php echo $appSetting["offer_point_for_energy_up"];?> <?php echo($favorpoints_name)?></TD>
          <TD><?php
    
if($user["king_author_points"]>=$appSetting["offer_point_for_energy_up"])
 {
$disable='';}else{$disable 'disabled="disabled"';}     
    
    echo 
'<input name="SubmitOfferHealStamina" id="SubmitOfferHealStamina" onClick="document.getElementById(\'OfferOperation\').setValue(\'HealLevel\');document.getElementById(\'HealOption\').setValue(\'Energy\');" type="submit"  '.$disable.' value="Accept for '.$appSetting["offer_point_for_energy_up"].' '.$favorpoints_name.'!" />';
    
?></TD>
        </TR>
        <TR>
          <TD class=label noWrap> INCREASE YOUR STAMINA LEVEL BY 1 FOR <?php echo $appSetting["offer_point_for_endurance_up"];?> <?php echo($favorpoints_name)?></TD>
          <TD> <?php
    
if($user["king_author_points"]>=$appSetting["offer_point_for_endurance_up"])
 {
$disable='';}else{$disable 'disabled="disabled"';}     
    
    echo 
'<input name="SubmitOfferHealStamina" id="SubmitOfferHealStamina" onClick="document.getElementById(\'OfferOperation\').setValue(\'HealLevel\');document.getElementById(\'HealOption\').setValue(\'Stemina\');" type="submit"  '.$disable.' value="Accept for '.$appSetting["offer_point_for_endurance_up"].' '.$favorpoints_name.'!" />';
    
?></TD>
        </TR>
        <TR>
          <TD class=label noWrap>INCREASE YOUR HEATH  LEVEL BY 1 FOR <?php echo $appSetting["offer_point_for_health_up"];?> <?php echo($favorpoints_name)?></TD>
          <TD><?php
    
if($user["king_author_points"]>=$appSetting["offer_point_for_health_up"])
 {
$disable='';}else{$disable 'disabled="disabled"';}     
    
    echo 
'<input name="SubmitOfferHealStamina" id="SubmitOfferHealStamina" onClick="document.getElementById(\'OfferOperation\').setValue(\'HealLevel\');document.getElementById(\'HealOption\').setValue(\'Health\');" type="submit"  '.$disable.' value="Accept for '.$appSetting["offer_point_for_health_up"].' '.$favorpoints_name.'!" />';
    
?></TD></TR>
        <TR>
          <TD class=label noWrap></TD>
          <TD>&nbsp;</TD>
        </TR>
        <TR>
          <TD class=label noWrap></TD>
          <TD> 
  
  </TD>
        </TR>
      </TBODY></TABLE>
      <span style="TEXT-ALIGN: center; MARGIN-TOP: 5px; COLOR: #666">
      <?php include_once("footer.php");?>
      </span></TD>
  </TR></TBODY></TABLE>


shabbir 13Apr2010 16:11

Re: PayPal Buttons in facebook
 
See this - http://www.facebook.com/topic.php?ui...526&topic=5345

bikerboy 13Apr2010 17:36

Re: PayPal Buttons in facebook
 
thanks for that but i need to add it to the page i added for players to buy points for the game i almost have done


All times are GMT +5.5. The time now is 23:56.