drewjoh/phpPayPal — Issue #7: Items not including in set_express_checkout()
Author: javadecaf
Created: 2012-01-23 16:06:27+00:00
State: open

First off, thanks for writing and sharing a great piece of code! In testing, I discovered that the items were not being displayed on the Express Checkout screen, a problem that was easily fixed, once I figured out how to do it. I simply copied your items processing loop from the do_direct_payment method into the set_express_checkout() method.

As a side note, I actually started with the version of the items processing loop found in do_express_checkout_payment(), but got an error because the TAXAMT NVP was missing from the output. The do_direct_payment() method included this NVP, so I used it instead, but it looks to me like TAXAMT might ought to have been included in do_express_checkout_payment() as well. I haven't completed testing on my implementation, so I don't know whether it will make any difference in my application or not. In any case, I wonder if you might want to consider moving the items processing loop to its own function, which would make problems such as this easier to fix. You may very well have good reasons for not doing it this way - just thought I'd make the suggestion. Thanks again and keep up the good work!