Example #1
0
 /**
  * NVP doesn't support passing discount total as a separate amount - add it as a line item
  *
  * @param array $request
  * @param int $i
  * @return true|null
  */
 protected function _exportLineItems(array &$request, $i = 0)
 {
     if (!$this->_cart) {
         return;
     }
     $this->_cart->isDiscountAsItem(true);
     return parent::_exportLineItems($request, $i);
 }
Example #2
0
 /**
  * Add shipping total as a line item.
  * For some reason PayPal ignores shipping total variables exactly when line items is enabled
  * Note that $i = 1
  *
  * @param array $request
  * @param int $i
  * @return true|null
  */
 protected function _exportLineItems(array &$request, $i = 1)
 {
     if (!$this->_cart) {
         return;
     }
     if ($this->getIsLineItemsEnabled()) {
         $this->_cart->isShippingAsItem(true);
     }
     return parent::_exportLineItems($request, $i);
 }