PayPal Buttons in facebook

Discussion in 'PHP' started by bikerboy, Apr 13, 2010.

  1. bikerboy

    bikerboy New Member

    Joined:
    Mar 12, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    It is same as any other page.
     
  3. bikerboy

    bikerboy New Member

    Joined:
    Mar 12, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Just make sure you have target="_blank" in the link and it will open in new tab
     
  5. bikerboy

    bikerboy New Member

    Joined:
    Mar 12, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  6. bikerboy

    bikerboy New Member

    Joined:
    Mar 12, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    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:
      <?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>  
     
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
  8. bikerboy

    bikerboy New Member

    Joined:
    Mar 12, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    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
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice