Forums

Paypal issue

seanpod 13 May, 2015
Hi guys. Just a simple question (hopefully). I have created a chronoform form which adds up a number of dropdowns, adds total to an invisible box and the paypal redirect takes the total and takes payment. This is all working fine (wahoo, go me!!!). My problem is that the details of the form also must go into a database (which it is also doing) however, it will add to the database even if the payment hasn't been made! Is there a way so that all the details will add to the database only if the person has made the payment? Thanks, any help is well appreciated!
GreyHead 14 May, 2015
Hi seanpod,

There's no simple way to do what you suggest as the PayPal Listener event isn't linked to the form data directly. What I would do is to add a status column to the table set it to 'unpaid' or empty when the form submits, save the data; then when the payment is confirmed update the status to 'paid'.

Bob
seanpod 14 May, 2015
Thanks for the answer, it has me baffled at the moment. The site is working perfectly otherwise (I had to use my own php to add to database rather than the add to database part as the basic won't do what I need it to do), I think it's a simple matter of comparing paypal payments to database to confirm it's paid! Do you think using the paypal pro rather than the redirect will help solve this? I appreciate any help.
Max_admin 17 May, 2015
Answer
Please check this tutorial:
http://www.chronoengine.com/faqs/57-cfv4/cfv4-actions/2583-how-to-use-the-paypal-redirect-action.html

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
seanpod 18 May, 2015
Thank you for that, the big issue is that there is two forms, The IPN only returns to one of those! I may have to create a second paypal account. I think it's as close to a result as I can get though. Thanks!
GreyHead 18 May, 2015
Hi seanpod,

You can set a return_url in the data sent to PayPal to get the IPN return to any form event that you choose.

The return URL set in your PayPal account is only used if there isn't one set for any transaction.

Bob
This topic is locked and no more replies can be posted.