News:

Looking for documentation? Take a look on our wiki

Main Menu

Payment module sequence question

Started by tnine, April 21, 2006, 04:41:13 AM

Previous topic - Next topic

tnine

I'm trying to fix an error with the pay pal payment module and I have some questions.

The payment module contains the following code

tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");.

This is always returning 0, it seems as if the order_tax  and order_shipping_tax columns are not selected in the query that is executed before the pay pal module's php code is called.  If I view the last row in the table (the order I'm processing), both of these values are populated before I click the "Confirm Order" button.  This leads me to two questions.

1.   Where is the code for the payment modules stored after it is entered from the admin interface?

2.   Where is the logic that performs the query on the order before the payment module is executed?

Thanks for the help, once I get this figured out, I think that basic pay pal integration including IPN will be finished and solid for the 1.0.5 bundle release. I will submit a zip with the newest files, I haven't had time to perform a cvs patch from the 1.0.4 tag in CVS.  I would ultimately like to add invoice items in the future, but that is a phase 2, I just want to get total + taxs working for phase 1.

Thanks,
Todd

simbo1905

payment configuration items are usually stored in a file ending .cfg.php with a basename that matches the .php that it configures.

i am using the paypal module unmodified and tax goes to into PayPal fine. tax is a bit complicated in virtuemart. there are a few interrelating options.

in such situation there is no substitue for setting a breakpoint and stepping through the code. i read that you are a java guy. eclipse has a php debugger http://sourceforge.net/project/showfiles.php?group_id=57621 but i have not tried it - it will become a core component so it is worth checking out http://www.eclipse.org/proposals/php-ide/. personally i use eclipse to program and debug j2ee and zend studio to program and debug php.


tnine

Well.  I've tried using the php debugger in eclipse, but I'm having some major problems.  I can debug, but I have a couple of questions.

1. I can only debug 1 file at a time.  For instance, I can put a breakpoint in index.php and debug if I hit index.php.  But I cannot put a breakpoint in the virtuemart parser and then hit index.php, the debugger will not stop at the breakpoint.  This makes is very difficult to use the phpeclipse, do you have any info on how to get around this?

2. Zend studio looks like it is a great app, Zend is also releasing a set of plugins for eclipse eventuallty.  Can I get a free version of Zend studio?

In the meantime, I'm going to install the zend ide and we'll see how it goes

http://www.zend.com/phpide

simbo1905

Quote from: tnine on May 01, 2006, 13:10:34 PM
1. I can only debug 1 file at a time.  For instance, I can put a breakpoint in index.php and debug if I hit index.php.  But I cannot put a breakpoint in the virtuemart parser and then hit index.php, the debugger will not stop at the breakpoint.  This makes is very difficult to use the phpeclipse, do you have any info on how to get around this?
i use zend studio so i dont know.
Quote from: tnine on May 01, 2006, 13:10:34 PM
2. Zend studio looks like it is a great app, Zend is also releasing a set of plugins for eclipse eventuallty.  Can I get a free version of Zend studio?
i bought a version so i don't know - it was not a lot of money and certainly worth the time that it has saved me.