Paypal - non-payment action

mlines

New Member
I have a form with a Paypal payment.

On submission of the form it take the user to Paypal for payment.

If the user pays, everything is fine.

If the user doesnt pay, either by clicking away from within Paypal or by payment failing then I dont get an IPN back which is fine. However, Fabrik has created a record with all the customers submitted details. I only want a Fabrik record formed on successful payment, what is the best way to do this?
 
You can run a custom php file (select in IPN PHP file).
I assume there you can handle failing payments.
If the user is just clicking away I assume you can only clean up manually resp. with a scheduled task deleting all records with some status, missing IPN or whatever.
 
Thanks, I can certainly manually clean up, its just that I was looking for a way to avoid creating the record in the first place.

I will have to look into the PHP.
 
There's no way to avoid creating the record in the first place, simply because of the way PayPal IPN works. It's a callback. Which doesn't happen in "real time". So the form submits, we do the redirect to PayPal, after validating and storing the record. At some point in the future - anything from several seconds to several hours, we get a "callback" from PayPal, ie. they call a specific URL on your server, with the result. Or not, if the person clicked away from PayPal.

We can provide PayPal with a small amount of "custom" data, in our case the list id, form id and row id of the submitted form, which they reflect back to us in the callback. So we can use that data to identify the submitted row this callback relates to, and update the IPN fields in it with the status, amount, etc.

So there's no way to defer writing out the record until after an IPN callback. The form data would just get lost. The size of the custom data PayPal accept for the reflection isn't enough to store the entire submitted form data.

-- hugh
 
Hugh,

Many thanks, that makes complete sense. I will also not create cron delete tasks etc. as I clearly need to wait for delayed payments. Very useful information.

Martin
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top