This topic is locked

Sending data to external payment processor

3/31/2012 6:35:10 PM
PHPRunner General questions
J
Jeroef author

Im trying to add this to add page.
Add page:Before display

echo "<FORM name=xclick action=\"https://www.paypal.com/cgi-bin/webscr\"; method=post target=_blank>

<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">

<input type=\"hidden\" name=\"business\" value=\"test@test.com\">

<input type=\"hidden\" name=\"currency_code\" value=\"USD\">

<input type=\"hidden\" name=\"item_name\" value=\"\">

<input type=\"hidden\" name=\"amount\" value=\"\">

<input type=\"hidden\" name=\"cancel_return\" value=\"http://test.com/2\">;

<input type=\"hidden\" name=\"return\" value=\"http://test.com/3\">;

<input type=\"hidden\" name=\"notify_url\" value=\"http://test.com/1\">;

<input type=\"hidden\" name=\"item_number\" value=\"\">

<input type=\"hidden\" name=\"image_url\" value=\"https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=19325&image=1&table=forumtopics\">;

</FORM>";


and After record added

echo "<INPUT type=image alt=\"Make payments with PayPal - it's fast, free and secure!\"

src=\"https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=19325&image=2&table=forumtopics\";

align=right border=0 name=xclick

onclick=\"javascript:

document.forms.xclick.item_name.value='".$values["product"]."';

document.forms.xclick.amount.value=".$values["price"].";

document.forms.xclick.item_number.value=".$values["Id"].";

document.forms.xclick.submit();\">";


The button is there but nothing happend when i click it.

What can be wrong?
/Regards Roger

C
cgphp 4/1/2012

Why do you echo the button in the "After record added" event? Don't echo the html code directly to the page but assign it to a template var.

J
Jeroef author 4/1/2012



Why do you echo the button in the "After record added" event? Don't echo the html code directly to the page but assign it to a template var.


Can u give a example pls?