I need help. I used this as a guide. When my user fills out and pays for something on my site using a product form the information they supplied in the form (other than their payment) is not being sent to PayPal. So I built this module to send the information using the module I'm supposed to hook into. However, it throws no errors but still sends no data to PayPal.
if ($payment_method['base'] == 'commerce_paypal_wpp') {
$order_wrapper = entity_metadata_wrapper('commerce_order',
$order);
$shipping_info = $order_wrapper->customer_profile_billing-
>commerce_customer_address->value();
$nvp += array(
'ORGANIZATION' => $shipping_info['field_organization'],
'NAME' => $shipping_info['field_name'],
);
}
}
Am I perhaps referencing my user-entered data incorrectly?
Here's how the fields show with dpm($form) [before the user submits the form]:
Name:
$form['customer_profile_billing']
['commerce_customer_address']['und'][0]'name_block']['name_line']
Organization:
$form['customer_profile_billing']['field_organization']