2021年3月20日星期六

Create a PayPal Button for variable amount and in Australian dollars

I am creating a shopping cart using PHP and HTML and that all works fine. But I would appreciate some help in creating a PayPal(PP) button that caters for a variable amount (i.e., the total in the cart) and changing the currency to Australian dollars (AUD). When I submit the code below it all works fine as long as I do not try to change the currency which defaults to US$. I also need to set up a return 'thanks' URL and a 'cancel' URL. I have Googled for hours but so far have not found a solution that works for me.

Any help will be most appreciated and thanking you in anticipation.

<!-- now the button -->          <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_blank">             <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="hidden" name="handling" value="0.00">             <input type="hidden" name="shipping" value="0.00">             <!-- <input type="hidden" name="currency_code" value="AUD"> -->             <input type="hidden" name="lc" value="AU">             <input type="hidden" name="bn" value="PP-BuyNowBF">             <input type="image" src="https://www.paypalobjects.com/en_AU/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">                  <img alt="" border="0" src="https://www.paypalobjects.com/en_AU/i/scr/pixel.gif" width="1" height="1">             <input type="hidden" name="add" value="1">          </form>  
https://stackoverflow.com/questions/66727948/create-a-paypal-button-for-variable-amount-and-in-australian-dollars March 21, 2021 at 09:05AM

没有评论:

发表评论