Announcement

Collapse
No announcement yet.

Please help with linking a paypal page to my webpage using php or javascript..!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help with linking a paypal page to my webpage using php or javascript..!

    I am building my first site. I am currently trying to link a paypal payment service. I have a list of milk products with different prices.. that I am trying to link to the paypal site. However, my desire is for a milk product selected to include its respective price on form submission of the paypal form without a client having to type the price into the form. The paypal form I am trying to modify is the following:-

    <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="groceries_sales@mybusiness.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="milk_brand " value=" 1">
    <input type="hidden" name="price" value=" ">
    <input type="hidden" name="currency_code" value="USD">

    <!-- Provide a dropdown menu option field. -->

    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="hidden" name="on0" value="Type"><br />

    <select name="os0">

    <option value="Select a Product">Select a Product for ePayment</option>

    <option value="Frozen Milk">Frozen Milk</option>
    <option value="Powdered Milk ">Powdered Milk</option>
    <option value="Homogenized Milk">Homogenized Milk</option>
    <option value="Fully Skimmed Milk">Skimmed Milk</option>
    <option value="Milk Shake">Milk Shake</option>
    <option value="Butter Milk">Butter Milk</option>
    <option value="Partly Skimmed Milk">Partly Skimmed Milk</option>
    <option value="Unpasteurised Milk">Unpasteurised Milk</option>

    </select> <br />

    <!-- Display the payment button. -->
    <input type="image" name="submit" border="0"
    src="https://www.thcservers.com/images/paypal_cards.jpg" width="230" height="60"
    alt="">


    <img alt="" border="0" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
    </p>
    </form>


    My purpose is to be able to develop a php or javascript that would enable the various prices of milk products to automatically show when a client selects a product by clicking them.. I was wondering if I need to develop a database (milk products vs prices) for the it to work or php could add prices to items on click without a database..?

    I have been looking at php (switch/break) option.. but i have no clue.. especially on how to augment (incorporate) the php element to the code above and onto the whole web page itself..

    Your help and orientation and all other possible solutions are highly appreciated.. please!

    Thank you.

  • #2
    Hi there aldaism66,

    I have coded the"Paypal" form for you.

    It now opens the cart properly.

    Of course, I did not know the item values so
    you will have to edit the HTML yourself.

    If you feel that you are unable to do it then
    don't hesitate to let me know and I will do it
    for you.
    Attached Files
    Last edited by coothead; 06-08-2016, 09:49 PM. Reason: tpynig eorrr


    ~ the original bald headed old fart ~

    Comment


    • #3
      Originally posted by coothead View Post
      If you feel that you are unable to do it then
      don't hesitate to let me know and I will do it
      for you.
      Hmm, That's mighty fine of ye!
      Who needs a Signature?

      Comment


      • #4
        WuponT sarcasm rules OK.


        p.s.

        How are you getting on with your "Turdpress" and "Bootcrap" frameworks?


        ~ the original bald headed old fart ~

        Comment


        • #5
          Originally posted by coothead View Post
          WuponT sarcasm rules OK.


          p.s.

          How are you getting on with your "Turdpress" and "Bootcrap" frameworks?



          Fortunately, I have the pleasure of saying that I continue to dislike wordpress and thankfully don't have to use it at work and definitely don't use it personally!
          Bootstrap on the other hand... Despite my dislike, i have to keep in with the company "Standards" when developing front end "UI'ey" stuff.
          This does not stop me from hanging my head in shame, however!


          And as you continue to beat me to the punch on pretty much every post, i suppose i'll just continue to hide in the shadows...
          Who needs a Signature?

          Comment


          • #6
            Once again it is simply brilliant..! Thanks a lot coothead..

            Comment


            • #7
              Hi there aldaism66,

              stone me, it's over two weeks since I posted your code.

              I thought that you had found a solution elsewhere.



              ~ the original bald headed old fart ~

              Comment

              Working...
              X