Need an experienced "PayPal developer" ??

13 replies
I actually need to know first if this can be done.

I currently have Buy It Now buttons for my bookmarks, which you can see throughout my site (just View Source on any of the pages that have a PayPal Buy It Now form on it). I don't "think" I need "shopping carts" or Add to Cart buttons.

What I DO need, if it can be done, is to allow the customers to enter their own quantity of at least 10 and have the code calculate the price each depending on how many they order.

So for instance, if they order from 10-25, the bookmarks are $1.95 each; 26-50, $1.75 each, and so on - on the concept of "the more you buy, the less cheaper they are."

For example, can this section of the code be rewritten to accommodate the above:
<tr><td><input type="hidden" name="on0" value="Price">Price per Set</td></tr><tr><td><select name="os0">
<option value="Set of 10">Set of 10 $15.00</option>
<option value="Set of 25">Set of 25 $37.50</option>
<option value="Set of 50">Set of 50 $62.50</option>
<option value="Set of 75">Set of 75 $90.00</option>
<option value="Set of 100">Set of 100 $115.00</option>
<option value="Set of 125">Set of 125 $137.50</option>
<option value="Set of 150">Set of 150 $150.00</option>
<option value="Set of 175">Set of 175 $166.25</option>
<option value="Set of 200">Set of 200 $180.00</option>
</select> </td></tr>
I've seen PayPal's code variables but I'm clueless as to how to build them into the current Buy It Now codes. :confused:

The way I have things set up now is pretty easy for most of my customers unless/until they need different quantities other than sets I have listed above. In fact, for my last three orders I actually took the orders over the phone, provided a quote and invoiced them through PayPal, whereas they could have easily just ordered online if the order forms were set up properly.

Would someone be able to help me with this? And if so, would you provide a quote to do this?

Thanks very much!!
#developer #experienced #paypal #paypal developer
  • Profile picture of the author x319
    I don't think PayPal has that kind of an option that can change dynamically.. But you can that with some simple JavaScript =)

    Hook a simple "onChange" event to the dropdown menu and have the price be changed dynamically.

    i.e:

    PHP Code:
    <input type="hidden" name="item_name" id="pp_item_name" value="Quantity of 1" />
    <
    input type="hidden" name="amount" id="pp_amount" value="1.95" />
    <
    input type="text" name="f_quantity" onChange="javascript:amtChange(this.value)" value="1" />

    <
    script type="text/javascript">
        var 
    discount_matrix = [
            
    0.0// 0% discount
            
    0.11 // 11% discount
            // and etc...
        
    ];

        function 
    amtChange(amt) {
            var 
    ppin document.getElementById('pp_item_name');
            var 
    ppamt document.getElementById('pp_amount');
            if ((
    amt parseFloat(amt)) > 0) {
                
    ppamt.value = (1.95 amt) * (discount_matrix[floor(amt 25)]);
                
    ppin.value "Quantity of " amt;
            }
        }
    </script> 
    I wouldn't guarantee that code will work but you should get the idea =)
    Signature

    [A Must Have!] URL Shortener with Powerful Features (A REAL Adf.ly Clone) - PM me if your interested!

    {{ DiscussionBoard.errors[3817784].message }}
    • Profile picture of the author ksmusselman
      Thanks Dr. X - only problem - I'm not a programmer. I really have no idea what to do here.

      So how much would you charge to "fix" my code for me? If it's something that I can simply copy/paste into my codes, that would be great.

      In other words, I only need one of my codes to work and I can copy/paste it into my codes on the various pages since all of the codes have the exact sets and prices anyway.

      For instance, here is an entire Buy It Now button code from one of my pages:
      <!--******PAYPAL BUY IT NOW BUTTON:******-->
      <b>Order with PayPal</b>
      <p>

      <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <input type="hidden" name="cmd" value="_s-xclick">
      <input type="hidden" name="hosted_button_id" value="K3S7RKVY8EQJJ">
      <table>
      <tr><td><input type="hidden" name="on0" value="Price">Price per Set</td></tr><tr><td><select name="os0">
      <option value="Set of 10">Set of 10 $15.00</option>
      <option value="Set of 25">Set of 25 $37.50</option>
      <option value="Set of 50">Set of 50 $62.50</option>
      <option value="Set of 75">Set of 75 $90.00</option>
      <option value="Set of 100">Set of 100 $115.00</option>
      <option value="Set of 125">Set of 125 $137.50</option>
      <option value="Set of 150">Set of 150 $150.00</option>
      <option value="Set of 175">Set of 175 $166.25</option>
      <option value="Set of 200">Set of 200 $180.00</option>

      </select> </td></tr>
      <tr><td><input type="hidden" name="on1" value="Designs">Designs</td></tr><tr><td><select name="os1">
      <option value="Custom">Custom</option>
      <option value="Red-Roses-Carriage">Red Roses and Carriage</option>
      <option value="Red-White-Roses">Red and White Roses</option>
      <option value="Orange Rose Book">Orange Rose with Book</option>
      <option value="Red Rose Petals">Red Rose Petals</option>
      <option value="Vintage Rose">Vintage Rose</option>
      <option value="Single Red Rose">Single Red Rose</option>
      <option value="Rosebud">Rosebud</option>
      <option value="Ice Rose">Ice Rose</option>
      <option value="Coffee Theme Rose Print">Coffee Theme Rose Print</option>

      </select> </td></tr>
      <tr><td><input type="hidden" name="on2" value="Verses"><a href="http://www.wedding-favor-bookmarks.com/verses-and-sayings.html" rel="nofollow" target="_blank">Verses</a></td></tr><tr><td><select name="os2">
      <option value="Custom">Custom </option>
      <option value="WB01">WB01 </option>
      <option value="WB02">WB02 </option>
      <option value="WB03">WB03 </option>
      <option value="WB04">WB04 </option>
      <option value="WB05">WB05 </option>
      <option value="WB06">WB06 </option>
      <option value="WB07">WB07 </option>
      <option value="WB08">WB08 </option>
      <option value="WB09">WB09 </option>
      <option value="WB10">WB10</option>
      <option value="WB11">WB11</option>
      <option value="WB12">WB12</option>
      <option value="WB13">WB13</option>
      <option value="WB14">WB14</option>
      <option value="WB15">WB15</option>
      <option value="WB16">WB16</option>
      <option value="WB17">WB17</option>
      <option value="WB18">WB18</option>
      <option value="WB19">WB19</option>
      <option value="WB20">WB20</option>
      <option value="WB21">WB21</option>
      <option value="WB22">WB22</option>
      <option value="WB23">WB23</option>
      <option value="WB24">WB24</option>
      <option value="WB25">WB25</option>
      <option value="WB26">WB26</option>
      <option value="WB27">WB27</option>
      <option value="WB28">WB28</option>
      <option value="WB29">WB29</option>
      <option value="WB30">WB30</option>
      <option value="WB31">WB31</option>
      <option value="WB32">WB32</option>
      <option value="WB33">WB33</option>
      <option value="WB34">WB34</option>
      <option value="WB35">WB35</option>
      </select> </td></tr>
      <tr><td><input type="hidden" name="on3" value="Font"><a href="http://www.wedding-favor-bookmarks.com/support-files/font-selections.pdf" rel="nofollow" target="_blank">Font</a>&nbsp;<small>(Fonts are shown in Lucinda Calligraphy)</small></td></tr><tr><td><select name="os3">
      <option value="Aucoin Light">Aucoin Light </option>
      <option value="Banjomen Open Bold">Banjomen Open Bold </option>
      <option value="Copperplate Gothic">Copperplate Gothic </option>
      <option value="Courier New">Courier New </option>
      <option value="Footlight MT Light">Footlight MT Light </option>
      <option value="French Script">French Script </option>
      <option value="Garamond">Garamond </option>
      <option value="Georgia">Georgia </option>
      <option value="Goudy Old Style">Goudy Old Style </option>
      <option value="Harrington">Harrington </option>
      <option value="Imprint MT Shadow">Imprint MT Shadow </option>
      <option value="Kristen ITC">Kristen ITC </option>
      <option value="Lucinda Calligraphy">Lucinda Calligraphy </option>
      <option value="Monotype Corsiva">Monotype Corsiva </option>
      <option value="Times New Roman">Times New Roman </option>
      <option value="Trebuchet MS">Trebuchet MS </option>
      </select> </td></tr>
      <tr><td><input type="hidden" name="on4" value="Accent">Tassel or Ribbon</td></tr><tr><td><select name="os4"> <option value="tassel">Tassel</option>
      <option value="ribbon">Ribbon</option>
      <option value="none">None</option>


      <tr><td><input type="hidden" name="on5" value="Tassel/Ribbon Colors"><a href="../images/tassel_ribbon_colors.jpg" rel="nofollow" target="_blank">Tassel/Ribbon Colors</a></td></tr><tr><td><select name="os5"> <option value="None">None </option>
      <option value="Black">Black </option>
      <option value="Brown">Dark Brown </option>
      <option value="Dark Green">Dark Green </option>
      <option value="Light Blue">Light Blue </option>
      <option value="Pink">Light Pink </option>
      <option value="Navy Blue">Navy Blue </option>
      <option value="Old Gold">Old Gold </option>
      <option value="Purple">Purple</option>
      <option value="Red">Red </option>
      <option value="White">White</option>
      </select> </td></tr>
      <tr><td><input type="hidden" name="on6" value="Event">Event or Occasion</td></tr><tr><td><select name="os6"> <option value="Wedding">Wedding</option>
      <option value="Birthday">Birthday</option>
      <option value="Graduation">Graduation</option>
      <option value="Baby Shower">Baby Shower</option>
      <option value="Fund Raiser">Fund Raiser</option>
      <option value="Thank You">Thank You</option>
      <option value="Advertising">Advertising</option>
      <option value="memorial">Memorial</option>
      <option value="Other">Other</option>

      </select> </td></tr>
      <tr><td><input type="hidden" name="on7" value="Bride &amp; Groom First Names">Bride &amp; Groom or Other Names</td></tr><tr><td><input type="text" name="os7" maxlength="60"></td></tr>
      <tr><td><input type="hidden" name="on8" value="Wedding Date">Wedding or Event Date</td></tr><tr><td><input type="text" name="os8" maxlength="60"></td></tr>
      <tr><td><input type="hidden" name="on9" value="Verse">Custom Verse or Saying</td></tr><tr><td><input type="text" name="os9" maxlength="300"></td></tr>
      <tr><td><input type="hidden" name="on10" value="Referrer">Please tell us how you heard about us</td></tr><tr><td><input type="text" name="os10" maxlength="300"></td></tr>


      </table>
      <input type="hidden" name="currency_code" value="USD">
      <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
      <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
      </form>

      <!--******END PAYPAL BUY IT NOW BUTTON:******-->


      Pretty much all that changes from one page to the next are the design names and everything else stays the same. So if I can have just one of these codes work correctly, I can update the rest of them myself by just copy/pasting the updates into the other codes.

      Let me know. Thanks!
      Signature
      Do You Vape? Submit a Guest Post! SmokersLogicEcigs.com
      Info Blog about Ecigs & Personal Vaporizers
      {{ DiscussionBoard.errors[3817822].message }}
  • Profile picture of the author wayfarer
    The problem with that is that the script could be manipulated by anyone with the right browser tools. You'll need to make sure the calculations are correct on your end before you ship anything.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[3817837].message }}
    • Profile picture of the author ksmusselman
      Originally Posted by wayfarer View Post

      The problem with that is that the script could be manipulated by anyone with the right browser tools. You'll need to make sure the calculations are correct on your end before you ship anything.
      How would they do that? :confused: I'm not much on the behind-the-scenes stuff here. I actually just about failed C++ in school and never signed up for the rest of the courses to get into php, java or anything code related. I figured I'll just stick to html/css and bookmark design and try to make enough money to pay someone else to do the complicated stuff for me. LOL
      Signature
      Do You Vape? Submit a Guest Post! SmokersLogicEcigs.com
      Info Blog about Ecigs & Personal Vaporizers
      {{ DiscussionBoard.errors[3817866].message }}
      • Profile picture of the author wayfarer
        Originally Posted by ksmusselman View Post

        How would they do that? :confused: I'm not much on the behind-the-scenes stuff here. I actually just about failed C++ in school and never signed up for the rest of the courses to get into php, java or anything code related. I figured I'll just stick to html/css and bookmark design and try to make enough money to pay someone else to do the complicated stuff for me. LOL
        The easiest way for me would be with the Firebug plugin for Firefox, but Chrome can manipulate HTML code on any given webpage out of the box, and so can IE8 and above. Same with Safari, and probably Opera.

        Since the JavaScript given just manipulates HTML attributes, which in turn send quantity and total numbers to your PayPal checkout, I could literally order 100,000 items for $1 if I wanted, just by changing the attributes. Of course you would be under no obligation to ship me that many, I'm just saying, it can be manipulated.
        Signature
        I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
        {{ DiscussionBoard.errors[3818177].message }}
        • Profile picture of the author ksmusselman
          Originally Posted by wayfarer View Post

          The easiest way for me would be with the Firebug plugin for Firefox, but Chrome can manipulate HTML code on any given webpage out of the box, and so can IE8 and above. Same with Safari, and probably Opera.

          Since the JavaScript given just manipulates HTML attributes, which in turn send quantity and total numbers to your PayPal checkout, I could literally order 100,000 items for $1 if I wanted, just by changing the attributes. Of course you would be under no obligation to ship me that many, I'm just saying, it can be manipulated.
          Wow! That's kind of freaky!!

          So how does one protect against that? Or can that even be done? :confused:
          Signature
          Do You Vape? Submit a Guest Post! SmokersLogicEcigs.com
          Info Blog about Ecigs & Personal Vaporizers
          {{ DiscussionBoard.errors[3818197].message }}
          • Profile picture of the author wayfarer
            Originally Posted by ksmusselman View Post

            Wow! That's kind of freaky!!

            So how does one protect against that? Or can that even be done? :confused:
            Anything that's on the client-side (browser) is not secure, and can be manipulated. The only way to make something secure is to do server-side validation. Code that resides on the server cannot be read by just anyone with a browser. For any normal ecommerce site, sales would not be allowed to go through if the information being passed to it was not validated against information or formulas that only exist on the server or attached databases.

            In your case, if your niche is small enough, the simple solution offered may be the best case, since it is less expensive than a real ecommerce solution, but you should take the information passed to you and plug it into your shopping cart page to make sure the numbers are right, before you ship anything.
            Signature
            I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
            {{ DiscussionBoard.errors[3818276].message }}
            • Profile picture of the author ksmusselman
              Originally Posted by wayfarer View Post

              Anything that's on the client-side (browser) is not secure, and can be manipulated. The only way to make something secure is to do server-side validation. Code that resides on the server cannot be read by just anyone with a browser. For any normal ecommerce site, sales would not be allowed to go through if the information being passed to it was not validated against information or formulas that only exist on the server or attached databases.

              In your case, if your niche is small enough, the simple solution offered may be the best case, since it is less expensive than a real ecommerce solution, but you should take the information passed to you and plug it into your shopping cart page to make sure the numbers are right, before you ship anything.
              I see. Yes, I was debating about making my site a full ecommerce site with a legitimate shopping cart and all that but I think my target market might just get more confused. Many of my customers are looking for unique handmade items at a low price point that they don't have to actually make themselves. Most of my traffic comes from women ages 44-65 and some really don't have a lot of computer experience to begin with and it really wouldn't serve anyone to try to get away with say 1000 bookmarks for the price of 10. I mean, what would they do with them, right? :rolleyes:

              But yes, I would notice a discrepancy immediately because each item is completely customized to what that particular client wants.

              Thanks for the explanations! It's been very helpful!
              Signature
              Do You Vape? Submit a Guest Post! SmokersLogicEcigs.com
              Info Blog about Ecigs & Personal Vaporizers
              {{ DiscussionBoard.errors[3818462].message }}
  • Profile picture of the author x319
    lol ^^

    I can do it, but I'm not home right now so don't have much time to work on it. And plus I don't work on small projects - but for the sake of trying to be a good asset to WF I might as well just do it for free =)

    And yea, data manipulation is pretty easy, don't got too much time to explain right now lol
    Signature

    [A Must Have!] URL Shortener with Powerful Features (A REAL Adf.ly Clone) - PM me if your interested!

    {{ DiscussionBoard.errors[3817945].message }}
    • Profile picture of the author ksmusselman
      Originally Posted by x319 View Post

      lol ^^

      I can do it, but I'm not home right now so don't have much time to work on it. And plus I don't work on small projects - but for the sake of trying to be a good asset to WF I might as well just do it for free =)

      And yea, data manipulation is pretty easy, don't got too much time to explain right now lol
      I'd pay you! You don't have to do it for free!
      Signature
      Do You Vape? Submit a Guest Post! SmokersLogicEcigs.com
      Info Blog about Ecigs & Personal Vaporizers
      {{ DiscussionBoard.errors[3818061].message }}
  • Profile picture of the author archwaysocial
    x319
    What would be really cool is if you posted the code here so that we could all use it.
    If you are doing it for free you may as well right?
    {{ DiscussionBoard.errors[3818024].message }}
  • Profile picture of the author kaido
    PayPal has option for custom field which will passed to their server after submission.
    Basically what you have to to is to pass selected option to paypal as custom field that's it. So set up an listener to receive response from paypal and you can automate entire purchase and delivering process.
    Signature

    {{ DiscussionBoard.errors[3818092].message }}
    • Profile picture of the author ksmusselman
      Originally Posted by kaido View Post

      PayPal has option for custom field which will passed to their server after submission.
      Basically what you have to to is to pass selected option to paypal as custom field that's it. So set up an listener to receive response from paypal and you can automate entire purchase and delivering process.
      I'm sorry, kaido. Thank you very much for your suggestion but I have no idea what any of that means. :confused:
      Signature
      Do You Vape? Submit a Guest Post! SmokersLogicEcigs.com
      Info Blog about Ecigs & Personal Vaporizers
      {{ DiscussionBoard.errors[3818129].message }}

Trending Topics