Problem developing a payment addon [RESOLVED]


I’m developing a payment addon in GravityForms which redirect to an external platform to pay and then redirect to my payment addon to check if the payment was succesfull or it was not valid.

The problem here is that I’m not sure how should I process the callback from the payment platform.

I tried to use the function callback (extending GFPaymentAddOn) but it doesn’t work.

So i redirect to a custom php file return.php inside my payment extension. My idea is use the function GFAPI::update_entry_property to update the payment status in this file but I’m not able to load the gravityforms library in a custom php file inside my addon.

I add to my custom php file:

include ‘class-gf-redsys.php’;

Where class-gf-redsys.php begins with:


class GFRedsys extends GFPaymentAddOn {

But it doesn’t works.

Any idea about what I’m doing wrong or what should I do?

Thanks in advance.

Best regards.

I answer myself, I added:


to my custom php file and the function GFAPI::update_entry_property worked.

1 Like

Thank you for the update.