Closed (fixed)
Project:
Commerce PayPal
Version:
7.x-1.x-dev
Component:
PayPal WPP
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2012 at 15:10 UTC
Updated:
18 Sep 2012 at 22:01 UTC
When Billing information is disabled on Checkout settings, using WPP payment method results in EntityMetadataWrapperException: Unknown data property commerce_customer_address. in EntityStructureWrapper->getPropertyInfo() (line 340 of /var/www/kickstart1/sites/all/modules/entity/includes/entity.wrapper.inc). error.
Just discussed it with Haza, and we're thinking about 2-part verification here:
hook_requirements() for commerce_paypal_wpp - verifying that Billing information is not disabled,commerce_checkout_builder_form with new validation function doing the same verification as above.Any thoughts on this?
I could do a patch for it, unless someone already has it fixed?
Comments
Comment #1
rszrama commentedI don't think we can reliably know in advance whether or not an order is going to have a billing profile with an address field on it prior to the point at which we actually attempt payment. The problem is that the billing profile could have been populated any number of ways that don't involve using the core "Billing information" checkout pane - Address Book with default addresses, custom Rules based on user profile fields, or just custom code working through one of many hooks.
The best we can hope for here is to just check before trying to get the address data from the order and fail if it couldn't be found. The PayPal WPP API requires these values to process payments, so I've added an error message that indicates this if the address couldn't be found. I'll update the documentation as well.
Commit: http://drupalcode.org/project/commerce_paypal.git/commitdiff/09c776e