Buy Now
Sign in

Simple paypal form

giupi , March 12 2014
G
giupi
Hello,

I have a form to get event registration. With this form I actually can get user data, receive a confirmation email both to me and the user, store the data on a database table.

What I would like to have is a way to get the user paying the subscrition event fee via paypal, using the form I already set up.

I tried to use the Redirect URL this way:

1) 01.jpg

2) 02.jpg

But I get this error

03.jpg

Who can help me solving this? What am I missing?

Who can quote me this job?

I searched both on forum and FAQ but I did not find any instruction...

I know there is a specific paypal plugin; but I only need to have simple form to get money. I know that this way there will be no syncro with data collected and payments, and that I will have to manually link table data with paypal payment, but I don't mind.

Thank you in advance;
Attachments
01.jpg
01.jpg
(34.2 KiB)
151 Downloads/Views
02.jpg
02.jpg
(28.01 KiB)
144 Downloads/Views
03.jpg
03.jpg
(72.18 KiB)
141 Downloads/Views
calculus00
Hello giupi,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How to post information from a Chronoform to ZoHo
What are the 'Easy Form' and 'Form' Wizards?
How can I add a mask to format a form input?
P.S: I'm just an automated service
I'm an automated service, my answers may help, but they may not be accurate.
GreyHead
Hi giupi,

My Italian isn't too good but doesn't that message say that there is a problem with the Email address? Are you sure that the PayPal account is set up on this address?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
G
giupi
Hello,

thanks for your answer,

yes the email is correct: it is the same I log-in in paypal account; it looks strange to me that the address in the error page is displayed info%40****.it

I also tried with my personal paypal account (different from the first I used) but I get the same error.

Is there any setting I have to put in the redirect user?

Some years ago I did what I'm trying to do now, with chronoform 3, and I managed to get it...

I don't want to use paypal plugin since I did not know either how to activate IPN on my paypal account...

I copied what is displayed on this post http://www.chronoengine.com/forums/posts/f2/t94486/redirect-url-problem.html?hilit=paypal

Thanks for your kind help...
GreyHead
Hi giupi,

The %40 etc. are url-encoded versions of the @ in the email address. PayPal should have no problem with this. Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here - or in a PM if you prefer.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
G
giupi
I dropped the debug at the very beginning of the "on submit" event; after submitting the data I was not redirected to the (error) paypal account, but i got this result:

Data Array: 
Array
(
[option] => com_chronoforms
[chronoform] => convegno25ott2013
[event] => submit
[Itemid] =>
[nome] => giuseppe
[cognome] => MENNO
[indirizzo] => via del mancino 62
[citta] => Lanciano (CH)
[cellulare] => 3289530352
[email] => santapupa@gmail.com
[luogonascita] => lanciano
[datanascita] => 10/10/66
[codicefiscale] => dmn
[posizione] => Socio SIRM iscritto alla sezione
[disciplina] => radiodiagnostica
[qualifica] => Libero Professionista
[quotaiscrizione] => 100
[input_submit_5] => Submit
[d2691945754c62624ff046a0871c024d] => 1
)
Validation Errors:
Array
(
)
Debug Data
redirect_url
redirect_url_target_url: https://www.paypal.com/it/cgi-bin/webscr
Redirect URL: https://www.paypal.com/it/cgi-bin/webscr?cmd=_xclick&business=giupi.geo%2540yahoo.com¤cy_code=EUR&item_name=&amount=100
redirect_user
redirect_user_target_url: http://
Redirect URL (click to continue):
https://www.paypal.com/it/cgi-bin/webscr?cmd=_xclick&business=giupi.geo%2540yahoo.com¤cy_code=EUR&item_name=&amount=100
email
3
Result
An email has been SENT successfully from (Studio Eventi & Congressi)info@eventiecongressi.it to santapupa@gmail.com
Body


The paypal business @yahoo is the (second) paypal account I tested, and it's a working account, as well the first info@ I used.

Thanks again for your help
admin
Hi giupi,

You can test using the "PayPal redirect - trial" action, you don't have to setup the IPN, that's optional based on your needs, see if it will work that way or not, you may also enable the debug of that action to compare the query string used to redirect!

Regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
GreyHead
Hi guipi,

There's something odd happening with the URL - sorry, I missed that earlier. It looks as though this part is being re-encoded by something else.
business=giupi.geo%2540yahoo.com¤cy_code=
We've seen something similar once before and then the form was being run in a module that 'sanitized' the data before it was submitted. This might be a similar problem.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
G
giupi
@Max: I tried to use " - Trial" and I got no error (though I got the wrong amount since it's a trial).

I used Paypal sandbox so I suppose it's normal to get wrong name and password error when I tried to log-in in the paypal account to complete the payment; for the same reason I could not either verify the return to the site to complete the data submitting.

How much does it cost the PayPal Redirect action? And how can I get it?

@Bob: What could I do to solve that strange re-encoding?

Meanwhile I made a test by creating from the very scratch a very simple test form, without any stuff other than the minimum to make it work; same error result

I found this post http://www.chronoengine.com/forums/posts/f2/t94652/paypal-does-not-return-to-website-after-payment.html?hilit=paypal where someone experienced my same cy_code problem (I get a "%2540" problem more).

Thanks for your answer
admin
Hi guipi,

Ok, regarding the encoding issue, I think it only happens when the url is rendered on the page (hence the 2nd encoding), but actually the url used for the redirection should be fine, please put the url below in your browser's address bar after fixing the problems in it:
https://www.paypal.com/it/cgi-bin/webscr?cmd=_xclick&business=giupi.geo%2540yahoo.com&currency_code=EUR&item_name=&amount=100


Does it work ?

Regarding the PayPal redirect, why test with a sandbox account ? you already have a problem related to the account in PayPal, so we need to make sure everything is running well using your live account, please make a test purchase for $1 using the real account and let us know what happens.

The PayPal subscription price is listed on the "Subscriptions" page from the top menu, and after purchase you should contact me to get the patch file which fixes the amount problem!

Regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
G
giupi
Hello Max,

the url you provided still causes the error (I did not understand what/how should I fix)

Anyway as for the paypal plugin, it seems to work (except for the amount). I made a couple of 2€ payment, but I coul not go further: after the payment nothing happened, so I did not manage to store the form data on the table, neither I could get any thank you page or email.

This is the actions/events config:

Senzanome.png

I read the FAQ "How to use the PayPal Redirect Action" but I did not understand how to << setup the "Notify URL" to the url of the "ipn" event which should be like this: http://www.YOUR-DOMAIN.com/index.php?option=com_chronoforms&chronoform=FORM_NAME&event=ipn
>>

Besides I did not manage to activate the IPN on my PP account (I searched over the whole profile but no option is there: I only found "to activate the IPN go to instruments menu of your profile": no trace of it...)

I would be glad to buy the plugin, but I would also like to be able to make it work.

If I will not get to configure all the form, I will have to build a simple form to store data and a thank you page with a paypal button on it to get the money.
Attachments
Senzanome.png
Senzanome.png
(15.63 KiB)
97 Downloads/Views
admin
Under your PayPal account config area, there must be some place to enable the IPN (instant payment notification) service and enter the url for the ipn event of your form, please double check this, it should be easy to find.

Regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
G
giupi
Ok I found the way to activate the blooody IPN (via english help: the italian one was completely wrong - they said to go to instruments. No way! You have to go instead to "profile" (selecting the parent item) and then "selling preferences").

Anyway I have set up the notification URL to http://www.*****.it/it/index.php?option=com_chronoforms&chronoform=raduno25ott2013-Copy&event=ipn (copy/pasted link - the form is called "***2013-Copy" because is a copy of a previuos one) and enabled the IPN.

Senzanome.jpg

I made another test payment of 2€, but I did not understand how can I return to my site after payment so I can store data, receive email and see thank you page, since on the help is stated: "You should NOT add this url in the "return url" of the "PayPal Redirect" action, the IPN event is setup to run in the background by a call from PayPal, not using the user's browser"

How can I get back after the payment?

That's how I configured the form events/action

Senzanome2.jpg

Is there anything missing?

I noticed that a record was stored in the DB table, but it's empty except for the cf_* fields

Moreover the cronology of IPNs shows a record corresponding to the test payment I've made.

Thank you in advance for your patience
Attachments
Senzanome.jpg
Senzanome.jpg
(67.2 KiB)
95 Downloads/Views
Senzanome2.jpg
Senzanome2.jpg
(82.09 KiB)
98 Downloads/Views
admin
Great news!

You can either add the email and db save BEFORE the "PayPal redirect", which would always work before the user pays.

Or add them like you have them now, in the listener, to insure that no data is saved/sent before the user pays successfully!

However, in the 2nd case, you will not have the form data available, please check the last part in the redirect FAQ, it explains how to store an initial record before redirecting then load the data again later in order to get the form data!

You will need a "db save" before the redirect, then to setup the custom parameter value, then a "db record loader" at the top of the "on verified".

Regarding the return, the return url should be some url on your website, not the form itself, like an article page saying "thank you, we will send you an email shortly..etc".

Regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
G
giupi
Ok I'm almost done... I validated the purchase of PP plugin: 2co ############** - email payment: REMOVED***

Will you send me the patch please?

As for the IPN, I dropped it: it's too difficult for me to configure all the ipn event stuff; Dbase after/before, recall the dbase, email before and/or after IPN... aaarghhh!!!

I could have used the simple redirect URL/User, but it seems not working because of the bloody bad encoding of the bloody link or whatever...

I will make do with the simple form that gets the data and let people make the payment (hoping that there will be no payment failures); I will manually insert the payments in my Access database when they will be done.

BTW: Is there any _simple_ way to receive the ID of the record (i.e. the cf_id) in the Paypal payment notification email (NOT the bloody IPN, but the simple email you receive when someone sends you money)? This way I will be able to identify faster the person that made the payment.

Thanks in advance
admin
Hi giupi,

I'm not sure if you can customize the email coming from PayPal, you can pass the "cf_id" to the paypal, which we also use for the IPN loading later, but I don't know if this variable can be included in the email.

In order top pass it, just use a custom code action after the "db save" and before the "paypal redirect", and add this code:

<?php
$form->data["custom"] = $form->data["chronoform_data_cf_id"];


Then in your PayPal redirect "Extra params" box, add this:
custom=custom

that should pass the cf_id to paypal under the "custom" parameter.

Regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!