This topic is locked

Sending data to external payment processor

7/14/2010 10:16:55 PM
PHPRunner General questions
R
robmid author

Sorry, I've got myself tied up in knots with something that is obviously quite basic.
I have a Booking page which is an ADD only page.
There are 3 lots of data ('name' 'product' 'price') to send to an external payment processor via a form (not PayPal) as well as inserting data into a database.
I have looked at the Custom code in PayPal template which sends the info to the Events page via a Button but I'm confused by the PayPal and Categories in the code
I have also tried to exclude the PayPal and Categories info from the form in the Events area without success.
Would it be possible for someone to provide the 'basic' code for the Pay link on the ADD page and also the basic code for a form in the Events area.
Thanks in anticipation.
Cheers.

A
ann 7/16/2010

Rob,
to create pay now button you need to add PayPal form to the Add page:Before display event on the Eventstab:

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=reply&id=51196&image=1&table=forumreplies\">;

</FORM>";



then use After record added event to add button which redirects to the PayPal:

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=reply&id=51196&image=2&table=forumreplies\";

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();\">";