function _uc_paypal_product_details in Ubercart 6.2
Same name and namespace in other branches
- 5 payment/uc_paypal/uc_paypal.module \_uc_paypal_product_details()
- 7.3 payment/uc_paypal/uc_paypal.module \_uc_paypal_product_details()
Returns the description and subtotal of the products on an order.
4 calls to _uc_paypal_product_details()
- uc_paypal_ec_checkout in payment/
uc_paypal/ uc_paypal.module - Redirects if a customer selects PayPal Express Checkout as a payment method.
- uc_paypal_ec_form_submit in payment/
uc_paypal/ uc_paypal.module - Submit handler for uc_paypal_ec_form().
- uc_paypal_ec_submit_form_submit in payment/
uc_paypal/ uc_paypal.module - Additional submit handler for uc_cart_checkout_review_form().
- uc_paypal_wpp_charge in payment/
uc_paypal/ uc_paypal.module - Processes a credit card payment through Website Payments Pro.
File
- payment/
uc_paypal/ uc_paypal.module, line 1101 - Integrates various PayPal payment services and Instant Payment Notifications (IPN) with Ubercart!
Code
function _uc_paypal_product_details($items) {
$desc = '';
$subtotal = 0;
if (!empty($items)) {
foreach ($items as $item) {
if (!empty($desc)) {
$desc .= ' / ';
}
$desc .= $item->qty . 'x ' . $item->title;
$subtotal += $item->qty * $item->price;
}
}
return array(
$desc,
$subtotal,
);
}