Jump to content

Can someone tell me why my pho form code is not showing on the web?


oavs

Recommended Posts

Hi

 

Here is the code. I am no expert in php  :confused:

Thank you for your help.

 

<?php
print'
	<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
		<input name="q0" type="hidden" value="1">
		<input name="submit" type="image" src="https://www.paypal.com/en_AU/i/btn/btn_paynowCC_LG.gif" width="1" height="1" alt="PayPal - The safer, easier way to pay online." border="0" >
		<img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1" >
		<input type="hidden" name="add" value="1" >
		<input type="hidden" name="cmd" value="_s-xclick">
		<input type="hidden" name="business" value="123@xyz.com.au" >
		<input type="hidden" name="item_name" value="Canvas Order" >
		<input type="hidden" name="item_number" value="CAN" > 
		<input type="hidden" name="amount" value="<? echo $total ; ?>">
		<input type="hidden" name="shipping" value="0.00" >
		<input type="hidden" name="buyer_credit_promo_code" value="" >
		<input type="hidden" name="buyer_credit_product_category" value="" >
		<input type="hidden" name="buyer_credit_shipping_method" value="" >
		<input type="hidden" name="buyer_credit_user_address_change" value="" >
		<input type="hidden" name="no_shipping" value="0" >
		<input type="hidden" name="no_note" value="1" >
		<input type="hidden" name="currency_code" value="AUD" >
		<input type="hidden" name="tax" value="0.00" >
		<input type="hidden" name="lc" value="AU" >
		<input type="hidden" name="bn" value="PP-ShopCartBF" >
	</form>';

?>

 

Link to comment
Share on other sites

Actually problem wasn't that. It was a missing PayPal code.

 

<input type="hidden" name="hosted_button_id" value="X3PRABCDEX822L4">

 

Ok Now that is sorted out I have a different but same form issue.

 

Little explanation first.

 

I have a form (like a contact form) which user selects the item and the price. When submitted it is presentaed by another page of the summary of the the order including the total amount.

 

 

What I really really want to do (and this is where your expertise is required) is to place the Total amount into the paypal's form.

 

In the paypay (2nd form page) I do have this

<input type="hidden" name="amount" value="<?php echo $total; ?>">

  and my 'total' field name is also called total in my first form page. I also did this in the first form page


...form here 
...
<input name="total" type="text" class="field text medium" id="total" tabindex="20" value="" maxlength="255" />

</form><?php
$total=$_POST['total'];
?>

So how do I  get the value from my first form into paypal's form on the second page?

 

I'll needed to be  shown please :-)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.