Jump to content
Larry Ullman's Book Forums

Necuima

Members
  • Content Count

    359
  • Joined

  • Last visited

  • Days Won

    7

Necuima last won the day on April 24 2020

Necuima had the most liked content!

Community Reputation

18 Good

About Necuima

  • Rank
    Advanced Member

Recent Profile Visitors

1741 profile views
  1. This is now in production. I've attached the code for anyone else who might be in a similar situation. if ($local) { // development echo <<<DD1 <!-- DEVELOPMENT TEST!!!--> <div class="paypal_box"> <!-- right-shifts the div --> <!-- first the PayPal Logo - see: https://www.paypal.com/us/webapps/mpp/logo-center --> <img class="PP_logo" src="./images/PP_logo.jpg" alt="PayPal Logo"> <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <inp
  2. Hi Larry, I just want to say "Thanks" for the guidance from this book and also the E-Commerce book. I followed a lot of the e-commerce guidance for a shopping cart, PayPal and used MySQL joins as per this book and eventually all went well. Cheers from Oz, Necuima
  3. I got there in the end after going down many 'blind alleys'. <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_blank"> <input type="hidden" name="cmd" value="_xclick"> <!-- <input type="hidden" name="cmd" value="_cart"> --> <input type="hidden" name="business" value="xxxx@yyyy.com.au"> <input type="hidden" name="item_name" value="Item Description"> <input type="hidden" name="item_number" value=""> <input type="hidden" name="amount" value="$total"> <input type="hidd
  4. Hi Larry, From SO the second code should not have the HTML form tags so I removed them but it still does not work. I have also tried that code just in a simple HTML script but still no access to PP. I would prefer to use the first script as at least it got me to PayPal if only I could find a way to set the currency to Australian dollars! This must be a common thing to do - have a shopping cart in your PHP code and then just interface to PayPal with a single amount to process the financial transaction. I have done similar with Stripe and that works fine but, as mentioned, the website owner
  5. Hi Larry, Found some more code which displays the button nicely but even though the yellow PayPal bar shows the link/hand icon it goes nowhere. I do have a developer id etc but don't know where to paste it. <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_blank"> <div id="smart-button-container" style="width: 60%; margin-left: 21%;"> <div style="text-align: left"><label class="checkout_form_mt_right v_align_top" for="description">Item:&nbsp;&nbsp;&nbsp;</label><input type="text" name="descr
  6. Hi Larry, I am following your design in part 3 of the book to create a cart which is all fine - great guidance! But the website owner insists that the payment will be via PayPal (PP). I have looked at part 2 where you use PayPal but with fixed amounts. I am trying to create a button/link to PP for a variable amount and in Australian dollars. The code works fine as long as I do not try to change the currency. I also need to add 'thankyou' and 'cancel' links back to the website but I can't seem to do that either. I have Googled for hours without finding the solution. <!-- n
  7. Hi Nootkan, The issue that I am trying to help you with is the definition of the PHP variables whose names start with $color_ For example, unless $_POST['color'] == 'red') is true, the PHP variable $color_red will not get set. But you try and use it in the print statement whether it is defined or not. But you are better off following Larry's guidance and set just one $color variable. Cheers
  8. if the color is not red, then $color_red is not getting defined. You need something like: $color_red = ""; $color_yellow = ""; $color_green = ""; $color_blue = ""; Up front before you do the tests so that the variables are defined even if they are empty.
  9. Hi, You have a problem with the double quotes in your final print statement. Your first statement will end at the color:red unless you escape the double quotes around that style or use single quotes at that point. Cheers, Necuima
  10. OK, if you look in "browse" for the PHP6 book it is the latest post in that topic. Sorry, it is under my name.
  11. It looks like you have created the database but have you created the tables? Cheers, Necuima
  12. So glad that you got it to work for you. As mentioned, it has always worked flawlessly for me, both in my development environment and in production. Best wishes, Necuima
×
×
  • Create New...