Check required fields before running an event
This is an open discussion with 2 replies, filed under General.
Search
How about using filters which run after the event has saved?
In your event check the result is successful
if ($result->getAttribute("result") == "success"){ //PAYPAL Logic }
return $result;
Create an account or sign in to comment.
So I am in the middle of rewriting the paypal extension to use the new Paypal REST API and one of the current issues I am having is that a request will fire when the event runs even if symphony returns an error because some of the required fields are not filled out. I could hard code the field names in the extension so the request doesn't run but it would be nice if it could detect the required fields based on the section we are saving to. Any ideas?