Zen Cart Logo
Forums / General Questions / Where do I tie an action to PayPal Status?

Where do I tie an action to PayPal Status?

Locked

Views: 855

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
17 Apr 2009, 1:27 AM
#1
jaxbakers avatar

jaxbakers

New Zenner

Join Date:
Mar 2006
Location:
Jacksonville Fl
Posts:
73
Plugin Contributions:
0

Where do I tie an action to PayPal Status?

Zen Cart 1.3.8a new install, Apache/2.2.11, PHP v5.2.9

First, my website works just great! my "problem" is in locating where to put the call to a function.

This is my challenge, this installation is a membership site and members may extend their membership by purchasing a 12 month extension via the shopping cart. I have added a field to the zen_customers table called customers_expire, this field has their enrollment date in a date format yyyy-mm-dd.

We have the PayPal Website Pro service and use PayPal exclusively. I have built a function that will calculate a new expiration date and update the zen_customers table and in general testing it works perfectly BUT I just cannot seem to find where to put it so that when the payment status Completed is returned by PayPal it will do the update.

So far, I've tried using the files in the includes/module/payments/paypal folder and the ipn_main_handler files with no success, in the zen_paypal table it says module_mode is paypalwpp.
I want to use the function to update based on eCheck cleared and Completed statuses. Has anyone else tried this? Any and all suggestions would be welcome.

Thanks,

Andy

17 Apr 2009, 5:49 PM
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: Where do I tie an action to PayPal Status?

You could add your function call into the after_process() function in the paypalwpp module.

just after line 811:

    zen_db_perform(TABLE_PAYPAL, $paypal_order);

add your call:

if($this->payment_status == 'Completed' {

// add your function call here....

}