Paypal form

Huski 08 Jun, 2010
Hi

Am a bit confused with what I have read through the forum on Paypal.

Basically what I want to do is to send a client who needs to pay me something a URL to a page on my website where they can complete their details, submit through to Paypal, then back to the website again. Preferably I would be able to manipulate the URL string to at least put in the amount they need to pay - this is not essential but would be a bonus.

I have seen things on redirect (but can't seem to find a plugin for it) and there is the Paypal API - have no idea where to get the actual details this requires and it says in the tooltip I need a licence to be able to use it.

Any help appreciated.
Cheers
GreyHead 08 Jun, 2010
Hi Huski,

The ReDirect plugin is the best way to do this. It's a part of the standard installation of the current ChronoForms version. Check the box by the form name then click the Plug in name in the column at the left side of the Forms Manager.

You can use the PayPal 'Return' parameter to bring the client back to your site.

Bob

PS The PayPal API lets you collect user Credit Card details and send those on to PayPal - it's most unlikely that you need to do that.
Huski 09 Jun, 2010
Hi Greyhead

Didn't have the ReDirect plugin - had to upgrade to the latest version - so now have it.

Now have to have a go at setting it up.

Cheers - Huski
Huski 09 Jun, 2010
Ok

Have set up the form, is going to database ok, sending me emails, and I think I have set up the redirect section properly - but on submit am not going to PAYPAL. Whole thing is confusing to me (paypal side of things) and can't seem to make much sense even after trawling this forum.

Am getting a debug output
-----------------------------
Form passed first SPAM check OK
Form passed the submissions limit (if enabled) OK
Form passed the Image verification (if enabled) OK
Form passed the server side validation (if enabled) OK
$_POST Array: Array ( [first_name] => Test [last_name] => Lastnam [Contact] => 12341234 [Reference_No] => 12334DD [Payment_Type] => Payment of deposit for service [amount] => 590.34 [chrono_verification] => tfpmj [button_2] => Submit [8afad48f82b132aa380f15e592da72a4] => 1 [1cf1] => 2a61d5eba89d869c655f66dfbcb0a7e7 [chronoformname] => CreditCard )
$_FILES Array: Array ( )
Form passed the plugins step (if enabled) OK
An email has been SENT successfully from [email]XXXX@Xxxx.com[/email] to [email]xxxx@xxxx.comebug[/email] End
-----------------------------

Have I missed turning something one?

Cheers
GreyHead 09 Jun, 2010
Hi Huski,

You probably haven't enabled the Plugin on the Form Plugins tab (a green bar is enabled). That's the most common cause of plugins not working.

Bob
Huski 09 Jun, 2010
Aah - I see - its a bit confusing. I clicked on the tick icon against the plugins and the tick turned to red cross and the highlight was green, but with the redirect, the tick was green and the highlight red - swapped it around - and that makes it work.

Ok - all sorted - just a few more tweaks to go and should be done.

By the way, do you know if I can send an email link to a client to click to go the credit card form and add their name, reference number, amount to pay in the URL string so the form opens with the details already populated

Cheers
GreyHead 09 Jun, 2010
Hi Huski,

You can send almost anything to PayPal to pre-populate the data. You just need to use the correct parameter names. See their doc 'HTML Variables for Website Payments Standard' for a list.

Bob
Huski 10 Jun, 2010
Thanks Bob,

What I mean is sending a link to the form on my website that has some of the field data in the URL (so it pre populates the form). I have done this with other forms using asp in the past, but not sure how to do it with Joomla or chronoforms and if it can be done.

For example

http://www.website.com/index.php?option=com_chronocontact&chronoformname=CreditCard&amount=345.00

So that when the user opens the form up, the amount of 345.00 is put into the amount field. I would also want to add reference number, and other data in the URL as well.

I have tried and it doesn't seem to work - can this be done?

Cheers - huski
GreyHead 10 Jun, 2010
Hi Huski,

<?php
if ( !$mainframe->isSite() ) {return;}
$amount = JRequest::getFloat('amount', '0', 'get');
?>
. . .
<input type='text' name='amount' id='amount' value='<?=$amount?>' />
. . .

Bob
Huski 11 Jun, 2010
Perfect - that works.

Cheers - Huski
This topic is locked and no more replies can be posted.