[Solved] Manage a php form plugin with a paypal form plugin

georgie

Member
Hello

I use the Paypal plugin.

I add a "status" field which changes automatically with a PHP form plugin, to inform the status of the payment ( "In progress" by default, before payment, then "Confirmed", after payment).
I need this to allow or prohibit changes if paiment is done or not.

I do:
Code:
$formModel->updateFormData('my_table___status_field' , 'Confirmed' , true);

It works.
But if a user cancels a payment (return keyboard for example), the "status" field is still filled (with "Confirmed" so).

I tried to modify the options of the PHP plugin form (Start of submission, End, after ...), but without success.

Can you help me ? Is it a way to not run my PHP if paiment is cancelled ? Or another way to inform the status of a paiment in a list ?

THX
 
The best way of setting the status is to use the IPN handling.

Is there some reason you don't use the "IPN Status" field we provide in the PayPal settings?

That should automatically handle setting statuses like Completed, Pending, Cancelled, etc.

-- hugh
 
Ok, I will try.

I have no reason to not use IPN, I just want to use a status field to filter my lists (a list for paiment pending, a list for paiment confirmed...).
It will be possible with IPN ?
 
Should be. We provide those IPN field options so the plugin can record the values we get from PayPal. The status field gets set during the initial transaction, usually either Completed or Pending, then updated if PayPal update the transaction in the future, like pending to Completed, or Canceled, etc.

Make sure you specify a txnid field as well.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top