function fn_gift_certificates_paypal_express_get_order_data(&$data, &$order_data, &$product_index) { if (!empty($data['gift_certificates'])) { foreach ($data['gift_certificates'] as $cart_id => $gift_certificate) { if (!empty($gift_certificate['extra']) && isset($gift_certificate['extra']['exclude_from_calculate']) && $gift_certificate['extra']['exclude_from_calculate'] == 'PR') { //Gift certificate was added as bonus with promotion continue; } $order_data['L_PAYMENTREQUEST_0_NAME' . $product_index] = __('gift_certificate'); $order_data['L_PAYMENTREQUEST_0_NUMBER' . $product_index] = $cart_id; $order_data['L_PAYMENTREQUEST_0_DESC' . $product_index] = fn_paypal_substr(fn_paypal_express_get_certificate_data($gift_certificate)); $order_data['L_PAYMENTREQUEST_0_QTY' . $product_index] = 1; $order_data['L_PAYMENTREQUEST_0_AMT' . $product_index] = $gift_certificate['amount']; $product_index++; } } }
function fn_gift_certificates_paypal_express_get_order_data(&$data, &$order_data, &$product_index) { if (!empty($data['gift_certificates'])) { foreach ($data['gift_certificates'] as $cart_id => $gift_certificate) { $order_data['L_PAYMENTREQUEST_0_NAME' . $product_index] = __('gift_certificate'); $order_data['L_PAYMENTREQUEST_0_NUMBER' . $product_index] = $cart_id; $order_data['L_PAYMENTREQUEST_0_DESC' . $product_index] = fn_paypal_express_get_certificate_data($gift_certificate); $order_data['L_PAYMENTREQUEST_0_QTY' . $product_index] = 1; $order_data['L_PAYMENTREQUEST_0_AMT' . $product_index] = $gift_certificate['amount']; $product_index++; } } }