Hello,
I'm doing a form that redirects to paypal.
Everything works fine, but the price is always wrong.
I did not understand if I have to buy the plugin paypal to fix this error or something if I'm wrong in the operation.
Thanks for the reply!!
I just have to make a simple payment with paypal.
The form is as follows:
UPLOAD FILE -> redirects to paypal payment of € 1 -> thank you page
On the FAQ it says:
Note: if you need simple to accept payments from PayPal then you can do that with the free redirect URL and redirect user actions.
Can you help me better understand how to set redirect URL and redirect user actions? Or is there a tutorial that explains it?
Hi creositi,
If the amount is fixed the simplest way is to create a PayPal hosted button in your PayPal account and add that to a Thank You page in your form.
If you want to do an automatic redirection then you need to work out what parameters you need to send to PayPal - check with their docs. They will be entries like _xclick, amount, etc. . .
Then use the ReDirect URL action to build the URL you need to send these + the ReDirect User action to actually do the redirection.
Bob
Perfect, it worked with the redirect!
I ask also other things.
- As I said I have to do to upload a file and then payment. Is possible, however, that the file is loaded only after the user has really paid?
- How do I decide on which page of the website should be directed to the user after they pay?
Hi creosoti,
You can include a redirect_url in the parameters you send to PayPal and that will decide which page they are redirected to after payment. But note that this doesn't tell you if the payment succeeded.
If you want to know if the payment has succeeded then you need to use one of the more advanced PayPal options with Instant Payment Notification (IPN); this is more complicated than a simple redirect as there are 'behind the scenes' exchanged with PayPal to check that the request is correct and then confirm the payment status. If you need this you can do it with the paid PayPal actions for ChronoForms. The trial versions are OK for development but randomise the amount.
Bob
I purchased the package for paypal.
I validated the code but it still gives me the wrong amount.
How so?
I use chronoform 4, I went to VALIDATE INSTALLATION, I selected CHRONOFORM ULTIMATE VALIDATION SUBSCRIPTION and enter your codes.
Hi creositi,
I'm not exactly sure how Max handles the PayPal action purchases, I think that he should send you a patched version of the action that you install will the Action installer icon.
The ChronoForms Ultimate Subscription is something quite different so that shouldn't work.
Bob
Thank you,
is now working, for the v4 Max had to send the files.
I need another help please.
The form is as I said so:
upload file -> redirect paypal -> only if the payment was successful then the file is saved, otherwise not
upload file and redirect paypal works perfectly.
I entered are in the paypal IPN and placed on Upload Files in paypal ipn listener. But in spite of paypal to send the IPN, the file is not saved in the folder I have chosen.
Is there something wrong?
Hi creositi,
only if the payment was successful then the file is saved
You can't do that. The file has to be uploaded from the user's computer when the form is first submitted. The IPN Listener is a completely separate transaction with PayPal's servers, it doesn’t know *anything* about the data from the form (unless you make the data available).
What I think you need to do here is to upload the file when the User submits the file. Possibly you do that upload to an 'unconfirmed' folder. Then in the PayPal IPN action you can set that up so that if the payment is successful then file is moved to a 'confirmed' folder; and if the payment fails the file is deleted.
Doing this is not too difficult but requires some coding and careful planning. In particular you need to remember that PayPal confirmation may be delayed in some cases, and there can be more than one Listener transaction.
Bob
Thank you.
This solution would be fine also.
Save the file to a temporary folder and then move it in case the payment is confirmed and delete it if no payment is confirmed.
How do I make this code?
Ok, there's this:
upload Moves an uploaded file to a destination folder
upload(string $src, string $dest, boolean $use_streams = false) : boolean
arguments
$ src
string The name of the php (temporary) uploaded file
$ dest
string The path (including filename) to move the uploaded file to
$ use_streams
boolean True to use streams
Response
boolean True on success
But, as I use it?
I enter UPLOAD FILE in ON SUBMIT and insert PAYPAL LISTEREN in ON IPN with FULL CUSTOM CODE?
But just as I insert the code? For example, in the UPLOAD FILE file will be loaded into the folder JOOMLA_PATH/images/temporary. A confirmation of payment has to go JOOMLA_PATH/images/confirmed
How exactly do I write the code?
Hi Creo,
If you know the file name saved by CF then you can get it at the Listener confirmed event then use it to move the file to destination path.
I will check your site shortly!
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Unfortunately, I will not know the name of the file. Doing the opposite? And that is if the user pay before and after payment do the redirect to the upload page? Can I do an automatic redirect? Without requiring the user to click anything?
Hi Creo,
The file name can be obtained after the upload files action, here is the code:
<?php
$form->data["file_name"] = $form->files["upload"]["name"];
I had to write the following line in the "PayPal redirect" extra params in order to pass the file name to PayPal:
custom=file_name
Then the file can be copied at the listener success event:
<?php
copy(JPATH_SITE.DS.'components'.DS.'com_chronoforms'.DS.'uploads'.DS.$form->form_details->name.DS.$form->data["file_name"], JPATH_SITE.DS.'images'.DS.'confirmed'.DS.$form->data["file_name"]);
I'm not sure about the automatic redirect!
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?